capistrano-hivequeen 5.4.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capistrano-hivequeen.gemspec +1 -0
- data/lib/capistrano/hivequeen.rb +1 -0
- data/lib/capistrano/hivequeen/capistrano_configuration.rb +24 -22
- data/lib/capistrano/hivequeen/deploy.rb +2 -22
- data/lib/capistrano/hivequeen/egads.rb +11 -0
- data/lib/capistrano/hivequeen/legacy_deploy.rb +48 -0
- data/lib/capistrano/hivequeen/version.rb +1 -1
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00e2be23312ae02f0c4052c33a7e4a52585bc0ee
|
4
|
+
data.tar.gz: 945703edf96ae3dfb8df1fc4a43c49c2e88d093e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573771005410ec97fe39a47a3776f679d77784b453aaa159e16a3ef22e50401293455fb77f2f6c087b6d5ccdae45a52033af8777ca4afc430afa4b12f36c2b16
|
7
|
+
data.tar.gz: 7af547724aa58b48a0ec1b243ed6f5d2968686adc4883ae405474f36cffcfb6ffbbb73afd3e7283b4471bed569bdcb006ff47f73d48efab9f7717f147d304d26
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
## List your runtime dependencies here. Runtime dependencies are those
|
39
39
|
## that are needed for an end user to actually USE your code.
|
40
40
|
s.add_dependency('capistrano', '>= 2.11.0')
|
41
|
+
s.add_dependency('activesupport', '>= 3.0.0')
|
41
42
|
s.add_dependency('json')
|
42
43
|
s.add_dependency('excon', '>= 0.6.0') # Perhaps we can support older. Haven't checked.
|
43
44
|
|
data/lib/capistrano/hivequeen.rb
CHANGED
@@ -8,43 +8,45 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
8
8
|
HiveQueen.logger = logger
|
9
9
|
HiveQueen.get_credentials!
|
10
10
|
|
11
|
-
# Require bundler extensions
|
12
|
-
require 'bundler/capistrano'
|
13
|
-
|
14
|
-
# Default to using the current branch as the stage name
|
15
|
-
# NB: current branch may not be set
|
16
|
-
#current_branch = `git symbolic-ref HEAD`.chomp.sub('refs/heads/', '')
|
17
|
-
|
18
11
|
set :repository, HiveQueen.repository
|
19
|
-
set :scm, :git
|
20
12
|
ssh_options[:forward_agent] = true
|
21
|
-
set :deploy_via, :remote_cache
|
22
13
|
|
23
14
|
# By default, don't override deployments if there's another deployment in progress.
|
24
15
|
# From the command line, use -s override=true to force a deployment
|
25
16
|
set :override, false
|
26
17
|
|
27
|
-
# If a delayed_job worker doesn't stop/restart in time (probably b/c a slow job is running)
|
28
|
-
# trust that runit will eventually stop/restart the worker
|
29
|
-
set :tolerate_slow_bg, true
|
30
|
-
|
31
|
-
# Option to skip background tasks
|
32
|
-
set :skip_bg, false
|
33
|
-
|
34
18
|
# Command to get the changes being deployed
|
35
19
|
set :changelog_command do
|
36
20
|
`git log #{current_commit}...#{real_revision} --pretty="%n%h %an: %s (%ar)" --stat --no-color`
|
37
21
|
end
|
38
22
|
|
23
|
+
# Default to using `git ls-remote` to resolve SHA from github.
|
24
|
+
# Run with `-s github=false` to remove dependency on remote.
|
25
|
+
set :github, true
|
26
|
+
|
27
|
+
# Parse sha from branch; depends on remote git repo.
|
28
|
+
set :sha do
|
29
|
+
raise "Must specify a branch" unless branch.present?
|
30
|
+
if github
|
31
|
+
line = `git ls-remote #{repository} #{branch}`.split("\n").first
|
32
|
+
raise "Unable to find sha for branch #{branch}" unless line.presence.try {|l| l.split.last == "refs/heads/#{branch}"}
|
33
|
+
line.split.first
|
34
|
+
else
|
35
|
+
warn "Skipping github, using local git checkout"
|
36
|
+
branch
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Expand sha into a complete git sha
|
41
|
+
set :full_sha do
|
42
|
+
full_sha = `git rev-parse --verify #{sha}`.strip
|
43
|
+
raise "#{sha} is not a valid git ref. Run `git fetch` and try again?" if sha.empty?
|
44
|
+
full_sha
|
45
|
+
end
|
46
|
+
|
39
47
|
# Limit of change log size
|
40
48
|
set :changelog_maxbytes, 700 * 1024
|
41
49
|
|
42
|
-
# Don't mess with timestamps
|
43
|
-
set :normalize_asset_timestamps, false
|
44
|
-
# Don't mess with permissions
|
45
|
-
set :group_writable, false
|
46
|
-
set :use_sudo, false
|
47
|
-
|
48
50
|
# Define environment tasks
|
49
51
|
HiveQueen.environments.each do |env|
|
50
52
|
name = env['name']
|
@@ -1,16 +1,7 @@
|
|
1
1
|
Capistrano::Configuration.instance.load do
|
2
|
-
# Symlink shared config files
|
3
|
-
after "deploy:update_code", "deploy:symlink_shared_config"
|
4
|
-
namespace :deploy do
|
5
|
-
desc "[internal] Symlink shared config files to current release"
|
6
|
-
task :symlink_shared_config do
|
7
|
-
run "ln -nfs #{shared_path}/config/* #{latest_release}/config"
|
8
|
-
end
|
9
|
-
|
10
|
-
end
|
11
2
|
|
12
|
-
before "deploy:
|
13
|
-
|
3
|
+
before "deploy:extract", "hivequeen:start"
|
4
|
+
before 'hivequeen:start', 'hivequeen:check_commit'
|
14
5
|
on :start, "hivequeen:require_environment", :except => HiveQueen.environment_names
|
15
6
|
namespace :hivequeen do
|
16
7
|
|
@@ -106,10 +97,6 @@ Capistrano::Configuration.instance.load do
|
|
106
97
|
end
|
107
98
|
end
|
108
99
|
|
109
|
-
# Keep all but the 5 most recent releases
|
110
|
-
set :keep_releases, 5
|
111
|
-
after "deploy", "deploy:cleanup"
|
112
|
-
|
113
100
|
desc "Deploy without migrations"
|
114
101
|
task(:hotfix) { deploy.default }
|
115
102
|
|
@@ -135,11 +122,4 @@ Capistrano::Configuration.instance.load do
|
|
135
122
|
end
|
136
123
|
end
|
137
124
|
|
138
|
-
after "deploy:restart", "deploy:restart_rails_services"
|
139
|
-
namespace :deploy do
|
140
|
-
desc "restarts all rails services concurrently"
|
141
|
-
task :restart_rails_services, :roles => [:app, :search, :bg, :resque] do
|
142
|
-
run "/etc/init.d/rails_services upgrade"
|
143
|
-
end
|
144
|
-
end
|
145
125
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Don't load this if legacy_deploy is loaded
|
2
|
+
# Can be moved into capistrano/hivequeen/deploy.rb
|
3
|
+
# after legacy stuff is removed
|
4
|
+
Capistrano::Configuration.instance.load do
|
5
|
+
namespace :deploy do
|
6
|
+
desc "restarts all rails services concurrently"
|
7
|
+
task :restart do
|
8
|
+
run "if [ -x /etc/init.d/rails_services ]; then /etc/init.d/rails_services upgrade; fi"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
+
# Require bundler extensions
|
3
|
+
require 'bundler/capistrano'
|
4
|
+
|
5
|
+
# Default to using the current branch as the stage name
|
6
|
+
# NB: current branch may not be set
|
7
|
+
#current_branch = `git symbolic-ref HEAD`.chomp.sub('refs/heads/', '')
|
8
|
+
|
9
|
+
set :scm, :git
|
10
|
+
set :deploy_via, :remote_cache
|
11
|
+
|
12
|
+
# If a delayed_job worker doesn't stop/restart in time (probably b/c a slow job is running)
|
13
|
+
# trust that runit will eventually stop/restart the worker
|
14
|
+
set :tolerate_slow_bg, true
|
15
|
+
|
16
|
+
# Option to skip background tasks
|
17
|
+
set :skip_bg, false
|
18
|
+
|
19
|
+
# Don't mess with timestamps
|
20
|
+
set :normalize_asset_timestamps, false
|
21
|
+
# Don't mess with permissions
|
22
|
+
set :group_writable, false
|
23
|
+
set :use_sudo, false
|
24
|
+
|
25
|
+
# Symlink shared config files
|
26
|
+
after "deploy:update_code", "deploy:symlink_shared_config"
|
27
|
+
namespace :deploy do
|
28
|
+
desc "[internal] Symlink shared config files to current release"
|
29
|
+
task :symlink_shared_config do
|
30
|
+
run "ln -nfs #{shared_path}/config/* #{latest_release}/config"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
before "deploy:update_code", "hivequeen:start"
|
35
|
+
|
36
|
+
# Keep all but the 5 most recent releases
|
37
|
+
set :keep_releases, 5
|
38
|
+
after "deploy", "deploy:cleanup"
|
39
|
+
|
40
|
+
after "deploy:restart", "deploy:restart_rails_services"
|
41
|
+
namespace :deploy do
|
42
|
+
desc "restarts all rails services concurrently"
|
43
|
+
task :restart_rails_services, :roles => [:app, :search, :bg, :resque] do
|
44
|
+
run "/etc/init.d/rails_services upgrade"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-hivequeen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Suggs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.11.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.0.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: json
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -65,6 +79,8 @@ files:
|
|
65
79
|
- lib/capistrano/hivequeen.rb
|
66
80
|
- lib/capistrano/hivequeen/capistrano_configuration.rb
|
67
81
|
- lib/capistrano/hivequeen/deploy.rb
|
82
|
+
- lib/capistrano/hivequeen/egads.rb
|
83
|
+
- lib/capistrano/hivequeen/legacy_deploy.rb
|
68
84
|
- lib/capistrano/hivequeen/multiio.rb
|
69
85
|
- lib/capistrano/hivequeen/setup.rb
|
70
86
|
- lib/capistrano/hivequeen/version.rb
|
@@ -88,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
104
|
version: '0'
|
89
105
|
requirements: []
|
90
106
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.0.
|
107
|
+
rubygems_version: 2.0.2
|
92
108
|
signing_key:
|
93
109
|
specification_version: 2
|
94
110
|
summary: Capistrano extensions for interacting with HiveQueen
|