cap_blue_green_deploy 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/cap_blue_green_deploy/tasks/cleanup.rb +2 -2
- data/lib/cap_blue_green_deploy/tasks/live.rb +3 -3
- data/lib/cap_blue_green_deploy/tasks/rollback.rb +2 -2
- data/lib/cap_blue_green_deploy/version.rb +1 -1
- data/spec/lib/cap_blue_green_deploy/tasks/cleanup_spec.rb +2 -2
- data/spec/lib/cap_blue_green_deploy/tasks/live_spec.rb +2 -2
- data/spec/lib/cap_blue_green_deploy/tasks/rollback_spec.rb +2 -2
- data/spec/lib/cap_blue_green_deploy/tasks_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa20269e6a8c4de8958b1c3721f9d193ea3ff175
|
4
|
+
data.tar.gz: eaff10b27966ebfacf6307ee1b1b8c437c803656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 150eca98c881a67a552b0c3711118a584c8497f0b8a6c30cdc8578aa476420fa689b824126f5786dc0ab5f83cf6032f2e5a2992d7bbcc8c491f715c00587f67c
|
7
|
+
data.tar.gz: 685d6ab431fc407be0364326f09b71ecae35868a695de054479da81847d783e63062ea23ca0a26b12cfd8e667d3eca8435a5db31e6e7ec59875a80783b0ac637
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -17,8 +17,8 @@ module CapBlueGreenDeploy::Tasks::Cleanup
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def filter_local_releases!
|
20
|
-
current_live = File.basename fullpath_by_symlink(
|
21
|
-
previous_live = File.basename fullpath_by_symlink(
|
20
|
+
current_live = File.basename fullpath_by_symlink(blue_green_live_dir)
|
21
|
+
previous_live = File.basename fullpath_by_symlink(blue_green_previous_dir)
|
22
22
|
local_releases.select! { |release| release != current_live && release != previous_live }
|
23
23
|
end
|
24
24
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module CapBlueGreenDeploy::Tasks::Live
|
2
2
|
def live_task_run
|
3
|
-
current_live = fullpath_by_symlink
|
4
|
-
do_symlink current_live,
|
5
|
-
do_symlink current_release,
|
3
|
+
current_live = fullpath_by_symlink blue_green_live_dir
|
4
|
+
do_symlink current_live, blue_green_previous_dir unless current_live.empty?
|
5
|
+
do_symlink current_release, blue_green_live_dir
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.task_load config
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module CapBlueGreenDeploy::Tasks::Rollback
|
2
2
|
def rollback_task_run
|
3
|
-
previous_live = fullpath_by_symlink
|
3
|
+
previous_live = fullpath_by_symlink blue_green_previous_dir
|
4
4
|
unless previous_live.empty?
|
5
|
-
do_symlink previous_live,
|
5
|
+
do_symlink previous_live, blue_green_live_dir
|
6
6
|
else
|
7
7
|
logger.important "no old release to rollback"
|
8
8
|
end
|
@@ -101,8 +101,8 @@ describe CapBlueGreenDeploy::Tasks::Cleanup do
|
|
101
101
|
|
102
102
|
before do
|
103
103
|
allow(subject).to receive(:fullpath_by_symlink).and_return("")
|
104
|
-
allow(subject).to receive(:
|
105
|
-
allow(subject).to receive(:
|
104
|
+
allow(subject).to receive(:blue_green_live_dir).and_return(live_path)
|
105
|
+
allow(subject).to receive(:blue_green_previous_dir).and_return(previous_path)
|
106
106
|
end
|
107
107
|
|
108
108
|
it "should remove current_live release from local releases list" do
|
@@ -31,8 +31,8 @@ describe CapBlueGreenDeploy::Tasks::Live do
|
|
31
31
|
before do
|
32
32
|
allow(subject).to receive(:do_symlink)
|
33
33
|
allow(subject).to receive(:fullpath_by_symlink).and_return("")
|
34
|
-
allow(subject).to receive(:
|
35
|
-
allow(subject).to receive(:
|
34
|
+
allow(subject).to receive(:blue_green_live_dir).and_return(live_path)
|
35
|
+
allow(subject).to receive(:blue_green_previous_dir).and_return(previous_path)
|
36
36
|
allow(subject).to receive(:current_release).and_return(current_release)
|
37
37
|
end
|
38
38
|
|
@@ -27,8 +27,8 @@ describe CapBlueGreenDeploy::Tasks::Rollback do
|
|
27
27
|
before do
|
28
28
|
allow(subject).to receive(:do_symlink)
|
29
29
|
allow(subject).to receive(:fullpath_by_symlink).and_return("")
|
30
|
-
allow(subject).to receive(:
|
31
|
-
allow(subject).to receive(:
|
30
|
+
allow(subject).to receive(:blue_green_live_dir).and_return(live_path)
|
31
|
+
allow(subject).to receive(:blue_green_previous_dir).and_return(previous_path)
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should create current live symlink linking to rollback release if exists" do
|
@@ -110,12 +110,12 @@ describe CapBlueGreenDeploy::Tasks do
|
|
110
110
|
subject.load_variables @config
|
111
111
|
end
|
112
112
|
|
113
|
-
it "should set
|
113
|
+
it "should set blue_green_live_dir variable" do
|
114
114
|
expect(subject).to receive(:_cset).with(:blue_green_live_dir, "#{deploy_to}/current_live")
|
115
115
|
subject.load_variables @config
|
116
116
|
end
|
117
117
|
|
118
|
-
it "should set
|
118
|
+
it "should set blue_green_previous_dir variable" do
|
119
119
|
expect(subject).to receive(:_cset).with(:blue_green_previous_dir, "#{deploy_to}/previous_live")
|
120
120
|
subject.load_variables @config
|
121
121
|
end
|