awes_cli 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/build_app_image.rb +5 -6
- data/lib/deploy_app.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8903fbd70b0bd55464fd55ab8845a0a37214b8f34284d3da1d63a459d49aeaee
|
4
|
+
data.tar.gz: 86ae6456fd0336004905ffed64dc129bcc39891db3b5601a0f7017aa8cabbf2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cfc3b61ea624cc928eb0f8f17c6c5ea25a5403c837993fbddb87173314637e314b99f440a7241db8d950b87b555480368e622fa23026cb37955e7feea132693
|
7
|
+
data.tar.gz: 6669699a03fd769c116100ba9b86c391a8997196454a6f652d5da5cbb3fe3c0c5763d52b4d429280dc344e3f78dc55b3adbcf162019cbad4576927677fbc507b
|
data/lib/build_app_image.rb
CHANGED
@@ -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[:
|
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, :
|
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("--
|
31
|
-
options[:
|
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.
|
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-
|
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
|