capistrano-deploy-block 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f392d073d0234b8dc56e7490758717c6ee59fa6
|
4
|
+
data.tar.gz: b19d6fd2b167c4ac8a3bb291309a0725a7e79a1d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 25b4d92dc19071487a9e107a52871c32f52a6aeb46f6b51da6befd6f6d49e776dea5cb47744c8b7d414445a560042fb9549f8136293b40b6777a8ab4cbeba129
|
7
|
+
data.tar.gz: 645aee421ca3a82ea5d464d2d3c30a6ff255d1e723410af760718ea0e6c140de07e8cc4ff16509710c8dbaae9d3d6d3d05e01307b109517fb8b045caab4295b8
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/deploy_block.rake', __FILE__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
namespace :load do
|
2
|
+
task :defaults do
|
3
|
+
# Message displayed to users who attempt to deploy when deploys are blocked
|
4
|
+
set :deploy_block_message, -> { "#{local_user} blocked deploys at #{Time.now}" }
|
5
|
+
|
6
|
+
# File created on the deploy_block_host to signal that a deploy is blocked
|
7
|
+
set :deploy_block_file, -> { File.join(shared_path, 'deploy-block') }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
namespace :deploy do
|
12
|
+
desc 'Block deploys'
|
13
|
+
task :block do
|
14
|
+
on fetch(:deploy_block_host) do
|
15
|
+
execute(:echo, "\"#{fetch(:deploy_block_message)}\"", "> #{fetch(:deploy_block_file)}")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'Check if deploys have been blocked'
|
20
|
+
task :check_for_block do
|
21
|
+
on fetch(:deploy_block_host) do
|
22
|
+
block_file = fetch(:deploy_block_file)
|
23
|
+
if test("[ -f #{block_file} ]")
|
24
|
+
block_message = capture(:cat, block_file)
|
25
|
+
error "[deploy:check_for_block] #{block_message}"
|
26
|
+
exit 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
desc 'Unblock deploys'
|
32
|
+
task :unblock do
|
33
|
+
on fetch(:deploy_block_host) do
|
34
|
+
execute(:rm, '-rf', fetch(:deploy_block_file))
|
35
|
+
info '[deploy:unblock] Deploys have been unblocked'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
task :validate do
|
40
|
+
run_locally do # Need `run_locally` in order to access `error` helper
|
41
|
+
case fetch(:deploy_block_host)
|
42
|
+
when nil
|
43
|
+
error '[deploy:validate] deploy_block_host not specified'
|
44
|
+
exit 1
|
45
|
+
when Array
|
46
|
+
error '[deploy:validate] deploy_block_host cannot be multiple hosts'
|
47
|
+
exit 1
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
%w[block check_for_block unblock].each do |task|
|
53
|
+
before task, :validate
|
54
|
+
end
|
55
|
+
|
56
|
+
before :starting, :check_for_block
|
57
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-deploy-block
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brigade Engineering
|
8
|
+
- Shane da Silva
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.1'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3.1'
|
28
|
+
description: Block deploys via Capistrano
|
29
|
+
email:
|
30
|
+
- eng@brigade.com
|
31
|
+
- shane.dasilva@brigade.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- lib/capistrano/tasks/deploy_block.rake
|
37
|
+
- lib/capistrano/deploy_block/version.rb
|
38
|
+
- lib/capistrano/deploy_block.rb
|
39
|
+
- lib/capistrano_deploy_block.rb
|
40
|
+
homepage: https://github.com/brigade/capistrano_deploy_block
|
41
|
+
licenses:
|
42
|
+
- MIT
|
43
|
+
metadata: {}
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.9.3
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
requirements: []
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 2.0.14
|
61
|
+
signing_key:
|
62
|
+
specification_version: 4
|
63
|
+
summary: Capistrano plugin for blocking deploys
|
64
|
+
test_files: []
|
65
|
+
has_rdoc:
|