seira 0.2.0 → 0.2.1
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 +4 -4
- data/lib/seira/app.rb +15 -0
- data/lib/seira/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d13d7183e992d8aa1272e7bf1b449da8389bf52
|
4
|
+
data.tar.gz: aef8597582870427946574d1b0c6417327d8308d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e2042c3e7428451cfa95a9e8ed624d1213073c9df03c25134668370a7375f3193103c5d063b19e49b44a9c645da3864788211f2d9c8222fb6a2606d61984eb9
|
7
|
+
data.tar.gz: 50cb75f0bb39a70b80106cad6ddee31db0911862928490a181d7a23e92f371066e3f0fb437ecde3fbecad2bc372383c0200436c6373362f7ae8270e77ed6b7c7
|
data/lib/seira/app.rb
CHANGED
@@ -71,6 +71,15 @@ module Seira
|
|
71
71
|
|
72
72
|
# Kube vanilla based upgrade
|
73
73
|
def run_apply(restart: false)
|
74
|
+
async = false
|
75
|
+
args.each do |arg|
|
76
|
+
if arg == '--async'
|
77
|
+
async = true
|
78
|
+
else
|
79
|
+
puts "Warning: unrecognized argument #{arg}"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
74
83
|
Dir.mktmpdir do |dir|
|
75
84
|
destination = "#{dir}/#{context[:cluster]}/#{app}"
|
76
85
|
revision = ENV['REVISION']
|
@@ -104,6 +113,12 @@ module Seira
|
|
104
113
|
|
105
114
|
puts "Running 'kubectl apply -f #{destination}'"
|
106
115
|
system("kubectl apply -f #{destination}")
|
116
|
+
|
117
|
+
unless async
|
118
|
+
puts "Monitoring rollout status..."
|
119
|
+
# Wait for rollout of all deployments to complete (running `kubectl rollout status` in parallel via xargs)
|
120
|
+
exit 1 unless system("kubectl get deployments -n #{app} -o name | xargs -n1 -P10 kubectl rollout status -n #{app}")
|
121
|
+
end
|
107
122
|
end
|
108
123
|
end
|
109
124
|
|
data/lib/seira/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Ringwelski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|