alpha_omega 0.0.48 → 0.0.49
Sign up to get free protection for your applications and to get access to all the features.
- data/{recipes → lib}/alpha_omega/deploy.rb +34 -15
- data/{recipes → lib}/alpha_omega/deploy/dependencies.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/local_dependency.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/remote_dependency.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/scm.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/scm/base.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/scm/git.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/strategy.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/strategy/base.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/strategy/checkout.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/strategy/remote.rb +0 -0
- data/{recipes → lib}/alpha_omega/deploy/templates/maintenance.rhtml +0 -0
- data/{recipes → lib}/alpha_omega/utils.rb +0 -0
- data/{recipes → lib}/alpha_omega/version.rb +1 -1
- data/libexec/compare +1 -5
- data/libexec/deploy +1 -5
- data/libexec/major +1 -5
- data/libexec/patch +1 -5
- data/libexec/rollback +1 -5
- data/libexec/shell +1 -1
- data/libexec/stage +1 -5
- metadata +18 -18
@@ -1,4 +1,4 @@
|
|
1
|
-
$:.unshift File.expand_path(File.join(File.dirname(__FILE__),'..','..','
|
1
|
+
$:.unshift File.expand_path(File.join(File.dirname(__FILE__),'..','..','lib'))
|
2
2
|
|
3
3
|
require 'benchmark'
|
4
4
|
require 'yaml'
|
@@ -46,6 +46,9 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
46
46
|
|
47
47
|
_cset (:figlet) { [%x(which figlet).strip].reject {|f| !(File.executable? f)}.first || echo }
|
48
48
|
|
49
|
+
_cset :admin_hosts, /^/
|
50
|
+
_cset :gateway_host, "localhost"
|
51
|
+
|
49
52
|
# =========================================================================
|
50
53
|
# These variables should NOT be changed unless you are very confident in
|
51
54
|
# what you are doing. Make sure you understand all the implications of your
|
@@ -72,21 +75,25 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
|
|
72
75
|
|
73
76
|
_cset(:current_release) { release_path }
|
74
77
|
_cset(:current_workarea) { capture("readlink #{current_path} || true").strip.split("/")[-1] }
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
|
79
|
+
_cset(:previous_release) {
|
80
|
+
if releases.length > 0
|
81
|
+
w = current_workarea
|
82
|
+
releases.index(w) && releases[(releases.index(w)-1)%releases.length] || nil
|
83
|
+
else
|
84
|
+
""
|
85
|
+
end
|
81
86
|
}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
|
88
|
+
_cset(:release_name) {
|
89
|
+
if releases.length > 0
|
90
|
+
w = current_workarea
|
91
|
+
stage = releases[((releases.index(w)?releases.index(w):-1)+1)%releases.length]
|
92
|
+
system "#{figlet} -w 200 on #{stage}"
|
93
|
+
stage
|
94
|
+
else
|
95
|
+
""
|
96
|
+
end
|
90
97
|
}
|
91
98
|
|
92
99
|
_cset(:current_revision) { capture("cat #{current_path}/REVISION", :except => { :no_release => true }).chomp }
|
@@ -545,6 +552,18 @@ end
|
|
545
552
|
end
|
546
553
|
end
|
547
554
|
|
555
|
+
task :no_gateway do
|
556
|
+
unset :gateway
|
557
|
+
end
|
558
|
+
|
559
|
+
task :ssh_gateway do
|
560
|
+
# set gateway on non-admin servers, defaulting to the developer admin host
|
561
|
+
if ENV["GATEWAY"] || !admin_hosts.match(Socket.gethostname)
|
562
|
+
ssh_options[:forward_agent] = true
|
563
|
+
set :gateway, ENV["GATEWAY"] ? ENV["GATEWAY"] : gateway_host
|
564
|
+
end
|
565
|
+
end
|
566
|
+
|
548
567
|
on :exit do
|
549
568
|
put full_log, "#{log_path}/#{application}_last_deploy-#{release_name}-#{branch.gsub(/\W+/,"_")}.log-#{Time.now.strftime('%Y%m%d-%H%M')}"
|
550
569
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/libexec/compare
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
data/libexec/deploy
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
data/libexec/major
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
data/libexec/patch
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
data/libexec/rollback
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
data/libexec/shell
CHANGED
data/libexec/stage
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
3
|
bundle check || { bundle --local --path vendor/bundle && bundle check; }
|
4
|
-
|
5
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1
|
6
|
-
else
|
7
|
-
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args "$@"
|
8
|
-
fi
|
4
|
+
exec bundle exec foreman start -f $(dirname $(dirname $0))/Procfile.rb -m 0 -c git=0,$(basename $0)=1 --args ssh_gateway "$@"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alpha_omega
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 125
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 49
|
10
|
+
version: 0.0.49
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|
@@ -109,20 +109,20 @@ files:
|
|
109
109
|
- libexec/rollback
|
110
110
|
- libexec/shell
|
111
111
|
- libexec/stage
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
112
|
+
- lib/alpha_omega/deploy/dependencies.rb
|
113
|
+
- lib/alpha_omega/deploy/local_dependency.rb
|
114
|
+
- lib/alpha_omega/deploy/remote_dependency.rb
|
115
|
+
- lib/alpha_omega/deploy/scm/base.rb
|
116
|
+
- lib/alpha_omega/deploy/scm/git.rb
|
117
|
+
- lib/alpha_omega/deploy/scm.rb
|
118
|
+
- lib/alpha_omega/deploy/strategy/base.rb
|
119
|
+
- lib/alpha_omega/deploy/strategy/checkout.rb
|
120
|
+
- lib/alpha_omega/deploy/strategy/remote.rb
|
121
|
+
- lib/alpha_omega/deploy/strategy.rb
|
122
|
+
- lib/alpha_omega/deploy/templates/maintenance.rhtml
|
123
|
+
- lib/alpha_omega/deploy.rb
|
124
|
+
- lib/alpha_omega/utils.rb
|
125
|
+
- lib/alpha_omega/version.rb
|
126
126
|
- bin/deploy
|
127
127
|
homepage: https://github.com/HeSYINUvSBZfxqA/alpha_omega
|
128
128
|
licenses: []
|
@@ -131,7 +131,7 @@ post_install_message:
|
|
131
131
|
rdoc_options: []
|
132
132
|
|
133
133
|
require_paths:
|
134
|
-
-
|
134
|
+
- lib
|
135
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
136
136
|
none: false
|
137
137
|
requirements:
|