awes_cli 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deploy_config.rb +7 -5
- 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: 45e8bc63d693bc56a8caec4132ef4247015a8dab5d5700de58ac5bfdcf2f6469
|
4
|
+
data.tar.gz: f59ff2761788a4cae909c66f90c260d6043ea34aea9d9c84d0f6397a9efe5ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a14dc4135709022157dab1a44e474fc6fe3d0f71c683e7c039dbdcdd433df045fbddcaa6a46b597c1547b3e686c2d21ffbfdc66b7a79a40359addcf50e2af50d
|
7
|
+
data.tar.gz: d8eec4b98797c893c10703c77138c0f4f3fd6dd8f846821ba5d96eb68d5835d80e123a7e2ae14ac045e32fadf8a1b1a469e909099844669b640bbc3c53a2f977
|
data/lib/deploy_config.rb
CHANGED
@@ -13,9 +13,7 @@ class DeployConfig
|
|
13
13
|
|
14
14
|
take_approval_app_env(options)
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
deploy_config(gcr_url, options)
|
16
|
+
deploy_config(options)
|
19
17
|
end
|
20
18
|
|
21
19
|
private
|
@@ -36,6 +34,10 @@ class DeployConfig
|
|
36
34
|
options[:image_tag] = val
|
37
35
|
end
|
38
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
|
+
|
39
41
|
opts.on("--project-id PROJECT_ID", "GCP project id [required or set env var PROJECT_ID]") do |val|
|
40
42
|
options[:project_id] = val
|
41
43
|
end
|
@@ -139,7 +141,7 @@ class DeployConfig
|
|
139
141
|
image_url
|
140
142
|
end
|
141
143
|
|
142
|
-
def deploy_config(
|
144
|
+
def deploy_config(options)
|
143
145
|
shell_cmd(
|
144
146
|
"gcloud container clusters get-credentials #{options[:cluster]} " \
|
145
147
|
"--region #{options[:cluster_location]} " \
|
@@ -160,7 +162,7 @@ class DeployConfig
|
|
160
162
|
yaml_file.gsub!(env_name, "'#{env_val}'")
|
161
163
|
end
|
162
164
|
|
163
|
-
gcr_url = "gcr.io/#{options[:project_id]}/#{options[:app_name]}"
|
165
|
+
gcr_url = "gcr.io/#{options[:project_id]}/#{options[:image_repo] || options[:app_name]}"
|
164
166
|
opt_image_url = options[:image_tag] && "#{gcr_url}:#{options[:image_tag]}"
|
165
167
|
|
166
168
|
image_url = "#{gcr_url}:current"
|
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.12
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ather cli tool
|
14
14
|
email: umar.siddiqui@atherenergy.com
|