conan_deploy 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/conan/application_helper.rb +1 -1
- data/lib/conan/deploy.rb +2 -2
- data/lib/conan/manifest_builder.rb +17 -12
- data/lib/conan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzA2ZWQ3N2MwYzc3YTE1N2NlNzczNzhjYzE1MjUwYjFlMjNjZGRhNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mjg1OWQxODM4ZTdiN2IxMjgyNDljMWFjY2QzYmMwZDM5MGMxMzIxMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWFhYmFmZDdlOTdjNmJlNDlhMzdlODk4NTA0MjYyNTMxOTc1ZTdlYzQzZDIy
|
10
|
+
NGFhN2VlMjQwZTJhODEwMjI3ZDJkYmQxMjkxZGJhMWZhYjM5MTQyMGQ3NTZh
|
11
|
+
NjExM2ZlNWZlNjEyZTM3ODk5ODQxMDI0NjI5MzNmN2JkN2EzZWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTM3Y2IwMzVhNGRhNWJiOGRlZTkxYWQ1MmZjMTc4MDJmMDI2Yzk0Nzg1ZTBm
|
14
|
+
MGUyNDI0NGNlNGEwNzU5YTNhMjY2ZWJmY2JhMDYwZWIzNzNhMzE5YTQxZGNh
|
15
|
+
NmFkYjMxMzI3ZDUxZTc3NmUzY2Q2YWZhZDgyZWM5YTJkMzQ4MjY=
|
data/lib/conan/deploy.rb
CHANGED
@@ -36,11 +36,11 @@ module Conan
|
|
36
36
|
manifest.provision
|
37
37
|
manifest.bg_configure
|
38
38
|
manifest.bg_deploy
|
39
|
-
if(manifest.
|
39
|
+
if(manifest.is_inactive_node_operational?)
|
40
40
|
manifest.bg_switch
|
41
41
|
manifest.bg_clean
|
42
42
|
else
|
43
|
-
raise RuntimeError.new "Blue node is not
|
43
|
+
raise RuntimeError.new "Blue node is not operational. Skipping switch and cleaning to facilitate troubleshooting."
|
44
44
|
end
|
45
45
|
|
46
46
|
else
|
@@ -119,10 +119,10 @@ class Manifest
|
|
119
119
|
@current_pipeline.bg_deploy(@current_environment, paas, force)
|
120
120
|
end
|
121
121
|
|
122
|
-
def
|
122
|
+
def is_inactive_node_operational?
|
123
123
|
validateThatEnvironmentIsSelected
|
124
|
-
puts "Blue/green
|
125
|
-
@current_pipeline.
|
124
|
+
puts "Blue/green smoke test #{@current_environment.id} for #{@current_pipeline.id} pipeline"
|
125
|
+
@current_pipeline.is_inactive_node_operational?(@current_environment, paas)
|
126
126
|
end
|
127
127
|
|
128
128
|
def bg_switch
|
@@ -236,12 +236,12 @@ class Pipeline
|
|
236
236
|
}
|
237
237
|
end
|
238
238
|
|
239
|
-
def
|
239
|
+
def is_inactive_node_operational?(environment, paas)
|
240
240
|
eachAppDeployment(environment) { |app, deploy|
|
241
|
-
response = ApiHelper.
|
241
|
+
response = ApiHelper.smoke_test(deploy.inactive_smoke_test_url(app), 60)
|
242
242
|
|
243
243
|
if(response.code != 200)
|
244
|
-
puts "
|
244
|
+
puts "Smoke test failed for inactive (Blue) node. Here is the entire response: #{response.inspect}"
|
245
245
|
return false
|
246
246
|
else
|
247
247
|
return true
|
@@ -450,7 +450,7 @@ class Deployment < HasOptions
|
|
450
450
|
|
451
451
|
@@paas_domain = 'mtnsatcloud.com'
|
452
452
|
|
453
|
-
attr_accessor :environment, :org, :ship, :shipcloud, :app_ids, :facility_id, :additional_mappings
|
453
|
+
attr_accessor :environment, :org, :ship, :shipcloud, :app_ids, :facility_id, :additional_mappings, :custom_smoke_test_path
|
454
454
|
|
455
455
|
def initialize(environment, org, ship)
|
456
456
|
# inherit options from the environment
|
@@ -465,6 +465,7 @@ class Deployment < HasOptions
|
|
465
465
|
@facility_id = nil
|
466
466
|
@enabled = true
|
467
467
|
@randomid = SecureRandom.hex(3)
|
468
|
+
@custom_smoke_test_path = nil
|
468
469
|
end
|
469
470
|
|
470
471
|
def apps(*app_ids)
|
@@ -517,12 +518,12 @@ class Deployment < HasOptions
|
|
517
518
|
"http://#{dns_name(app)}/status/manifest"
|
518
519
|
end
|
519
520
|
|
520
|
-
def
|
521
|
-
"http://#{dns_name(app)}
|
521
|
+
def active_smoke_test_url(app)
|
522
|
+
"http://#{dns_name(app)}/#{@custom_smoke_test_path || 'status/healthcheck'}"
|
522
523
|
end
|
523
524
|
|
524
|
-
def
|
525
|
-
"http://inactive.#{dns_name(app)}
|
525
|
+
def inactive_smoke_test_url(app)
|
526
|
+
"http://inactive.#{dns_name(app)}/#{@custom_smoke_test_path || 'status/healthcheck'}"
|
526
527
|
end
|
527
528
|
|
528
529
|
def paas_target
|
@@ -531,6 +532,10 @@ class Deployment < HasOptions
|
|
531
532
|
|
532
533
|
def to_s
|
533
534
|
"#{org}-#{ship}"
|
534
|
-
end
|
535
|
+
end
|
536
|
+
|
537
|
+
def smoke_test_path(path=nil)
|
538
|
+
@custom_smoke_test_path = path
|
539
|
+
end
|
535
540
|
end
|
536
541
|
|
data/lib/conan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conan_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Reardon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daphne_util
|