awes_cli 0.0.20.3 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/deploy_app.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2f0c454abcbc8dfa7d838ddf2a3e192f0eb550ac5162a68a3ff4a54ecdc5768
4
- data.tar.gz: 8345bc37c27f70320f109219272849d0a51cee4d8df3b66d44fba871c01d70c2
3
+ metadata.gz: 7c56c2fd31133f9f9099a96c29b891f1cf30e206b9c4c5380e15d434037b2d9e
4
+ data.tar.gz: e87b7f33e19820c970ea30217cbf5d0e0e972b8428b76bcd2eeb81f572e9f1cc
5
5
  SHA512:
6
- metadata.gz: 7fc3e5003cde68db1f8c8a96cbf470003ad9f3d3d281cc5c006aae8eb7e19bff0bc4fafaeb237dde2561228e8cb39c6a23196a8ab12b72bb27a374f360e9c054
7
- data.tar.gz: a1132bee963af57ba68494b79c21c10afa4f303e6bac92de38646ea49807fc60c76be62e100779170ce863f57a0d7d93f426f705638b8ba95ab435d5c9ef2661
6
+ metadata.gz: 31091850270124ce71745f6c5b56e93329a668c2135c1a2c2b5fbd4fdd49de76904746e5247d3e9771d5a13de8011cb2c24c6e1f2833e3d82683eddc59523c79
7
+ data.tar.gz: 3c6c403da51706902d567c2f000912573c4fb07188bec6d3c61490d4059ea6468552dae6e5388c505daca3994f996044228b2f414b08ed401d241ee8df5a5db2
data/lib/deploy_app.rb CHANGED
@@ -10,6 +10,9 @@ class DeployApp
10
10
 
11
11
  gcr_url = "asia.gcr.io/#{options[:project_id]}/#{options[:image_repo] || options[:app_name]}"
12
12
 
13
+ self.workload_hash = fetch_worload_yaml(options[:app_name], options[:namespace])
14
+ throw "Workload does not exists name: #{option[:app_name]} namespace: #{option[:namespace]}" if workload_hash.nil?
15
+
13
16
  if(!options[:image_tag].nil?)
14
17
  image_url = validate_image_tag_exists?(gcr_url, options[:image_tag])
15
18
  else
@@ -131,8 +134,6 @@ class DeployApp
131
134
  "--project #{options[:project_id]} "
132
135
  )
133
136
 
134
- self.workload_hash = fetch_worload_yaml(options[:app_name], options[:namespace])
135
-
136
137
  app_name = options[:app_name]
137
138
  shell_cmd("kubectl set image #{workload_hash['kind']} #{app_name} #{app_name}=#{image_url} -n #{options[:namespace]}")
138
139
 
@@ -146,6 +147,5 @@ class DeployApp
146
147
  return JSON.parse(json_deploy) if(json_deploy != "")
147
148
  json_statefulset = `kubectl get statefulset -n #{namespace} #{app_name} -o json`
148
149
  return JSON.parse(json_statefulset) if(json_statefulset != "")
149
- throw "Workload does not exists name: #{app_name} namespace: #{namespace}"
150
150
  end
151
151
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awes_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20.3
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umar Siddiqui