kube_deploy_tools 3.0.7 → 3.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2764c75eb39affece98b0e7e9b18a7e74be77ba578001a8dc29c0b4a8e792ed5
|
4
|
+
data.tar.gz: 4371bcf67ecd0f3108b2e179a3b2262b4d70aaeda0d73b539db7147058b544d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 685001b5b61b49a1e9da42dcd5c25cb9219272d61e091563c9fb8595e95832942900f065a7c49dc9de13d22a2385c704c43760bd2a50a92db6420ff04152eb54
|
7
|
+
data.tar.gz: 3e00ecc582952ce6cb8643327cee3776fd3c00f83be8f1b13d02defe21f5a7d5b70fa258a0274e0b2b5b1c3a3e45ca5ab1feb604d4ad493059f16b92c1c92a27
|
@@ -29,12 +29,21 @@ module KubeDeployTools
|
|
29
29
|
local_artifact_path
|
30
30
|
end
|
31
31
|
|
32
|
+
def get_registry_build_path(project:)
|
33
|
+
# NOTE: If the naming format changes, it represents a breaking change
|
34
|
+
# where all past clients will not be able to list/download new builds
|
35
|
+
# and new clients will not be able to list/download old builds. Change
|
36
|
+
# with caution.
|
37
|
+
#
|
38
|
+
"#{@bucket}/project/#{project}/build"
|
39
|
+
end
|
40
|
+
|
32
41
|
def get_registry_artifact_path(name:, flavor:, project:, build_number:)
|
33
42
|
# NOTE(joshk): If the naming format changes, it represents a breaking
|
34
43
|
# change where all past clients will not be able to download new builds and
|
35
44
|
# new clients will not be able to download old builds. Change with caution.
|
36
45
|
#
|
37
|
-
"#{
|
46
|
+
"#{get_registry_build_path(project: project)}/#{build_number}/artifact/#{get_artifact_name(name: name, flavor: flavor)}"
|
38
47
|
end
|
39
48
|
|
40
49
|
def get_artifact_name(name:, flavor:)
|
@@ -84,6 +93,18 @@ module KubeDeployTools
|
|
84
93
|
output_path
|
85
94
|
end
|
86
95
|
|
96
|
+
def get_latest_build_number(project)
|
97
|
+
out = Shellrunner.check_call('gsutil', 'ls', get_registry_build_path(project: project))
|
98
|
+
|
99
|
+
# pick out the build numbers from the list
|
100
|
+
build_regex = /([0-9]+)\/$/
|
101
|
+
build_entries = out.scan(build_regex)
|
102
|
+
|
103
|
+
build_entries.
|
104
|
+
map { |x| x[0].to_s.to_i }.
|
105
|
+
max.to_s
|
106
|
+
end
|
107
|
+
|
87
108
|
def upload(local_dir:, name:, flavor:, project:, build_number:)
|
88
109
|
# Pack up contents of each flavor_dir to a correctly named artifact.
|
89
110
|
flavor_dir = File.join(local_dir, "#{name}_#{flavor}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kube_deploy_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabien Goncalves
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2020-
|
19
|
+
date: 2020-10-27 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: colorize
|