awes_cli 0.0.13 → 0.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b9a73dc5dbf7745e69146f02c3374ce6a957e43281ae0503c9ad80c53aa17ce
4
- data.tar.gz: de4640754c3386a108a1d998932d58f79c7314c1d2d10d36d6c45e0e1f22460e
3
+ metadata.gz: 8903fbd70b0bd55464fd55ab8845a0a37214b8f34284d3da1d63a459d49aeaee
4
+ data.tar.gz: 86ae6456fd0336004905ffed64dc129bcc39891db3b5601a0f7017aa8cabbf2a
5
5
  SHA512:
6
- metadata.gz: a989510de0b482da03abda2787c0d0a3c4b9b9930bff1b3ed63af0849c205535398beba98789f9d8a43fff67e4af8fd9c28dbfd22b2a315395f1a21f1e842b59
7
- data.tar.gz: 2125e83e81a46dc3edced849a9a79fab44c786113cdd6a50a66d022b7a90de86045d95cdb25c3aa8b3b6437cd2122bd98f89a75ad467dfc3f36d76735b924115
6
+ metadata.gz: 4cfc3b61ea624cc928eb0f8f17c6c5ea25a5403c837993fbddb87173314637e314b99f440a7241db8d950b87b555480368e622fa23026cb37955e7feea132693
7
+ data.tar.gz: 6669699a03fd769c116100ba9b86c391a8997196454a6f652d5da5cbb3fe3c0c5763d52b4d429280dc344e3f78dc55b3adbcf162019cbad4576927677fbc507b
@@ -5,7 +5,7 @@ class BuildAppImage
5
5
  def main
6
6
  options = get_options
7
7
 
8
- gcr_url = "gcr.io/#{options[:project_id]}/#{options[:app_name]}"
8
+ gcr_url = "gcr.io/#{options[:project_id]}/#{options[:image_repo]}"
9
9
 
10
10
  image_url = build_image(gcr_url, options)
11
11
  end
@@ -14,7 +14,7 @@ class BuildAppImage
14
14
  def get_options
15
15
  options = {}
16
16
 
17
- require_options_keys = [:project_id, :app_name]
17
+ require_options_keys = [:project_id, :image_repo]
18
18
 
19
19
  opt_parser = OptionParser.new do |opts|
20
20
  opts.banner = "Usage: ather build [options]"
@@ -27,8 +27,8 @@ class BuildAppImage
27
27
  options[:project_id] = val
28
28
  end
29
29
 
30
- opts.on("--app-name APP_NAME", "K8s app name [required or set env var APP_NAME]") do |val|
31
- options[:app_name] = val
30
+ opts.on("--image-repo IMAGE_REPO", "Image repo to deploy [required or set env var IMAGE_REPO]") do |val|
31
+ options[:image_repo] = val
32
32
  end
33
33
 
34
34
  opts.on("-h", "--help", "Prints this help") do
@@ -76,7 +76,6 @@ class BuildAppImage
76
76
  opt_image_url = options[:image_tag] && "#{gcr_url}:#{options[:image_tag]}"
77
77
 
78
78
  opt_image_url && shell_cmd("gcloud container images add-tag --quiet #{time_image_url} #{opt_image_url}")
79
-
80
- opt_image_url
79
+ shell_cmd("echo \"IMAGE_TAG=#{commit_image_tag}\" >> build.env")
81
80
  end
82
81
  end
data/lib/deploy_app.rb CHANGED
@@ -6,7 +6,7 @@ class DeployApp
6
6
  options = get_options
7
7
  take_approval(options)
8
8
 
9
- gcr_url = "gcr.io/#{options[:project_id]}/#{options[:app_name]}"
9
+ gcr_url = "gcr.io/#{options[:project_id]}/#{options[:image_repo] || options[:app_name]}"
10
10
 
11
11
  if(!options[:image_tag].nil?)
12
12
  image_url = validate_image_tag_exists?(gcr_url, options[:image_tag])
@@ -34,6 +34,10 @@ class DeployApp
34
34
  options[:image_tag] = val
35
35
  end
36
36
 
37
+ opts.on("--image-repo IMAGE_REPO", "Image repo to deploy [optional] default to K8s app name") do |val|
38
+ options[:image_repo] = val
39
+ end
40
+
37
41
  opts.on("--project-id PROJECT_ID", "GCP project id [required or set env var PROJECT_ID]") do |val|
38
42
  options[:project_id] = val
39
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awes_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umar Siddiqui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-23 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ather cli tool
14
14
  email: umar.siddiqui@atherenergy.com