helmsnap 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/helmsnap/generate.rb +15 -7
- data/lib/helmsnap/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76c73dc7b61a3c405d200bb8af1d19e79ae7c25a150863f93d329e5735b4c83e
|
4
|
+
data.tar.gz: 0473a0a61ab7aa0b937a27d3d25b65f28443b21460f6f5ff3b16763d9fb7e62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8ba0058f8830dd104c6cdafceb68b5e37cd6be0f5bcf1c0214ccb6f25b74c880531e049aabad500f8bd0e7e2e8b26d9e482ee7288fe8e43010a4d822b93b10
|
7
|
+
data.tar.gz: cffb46bf4a843124d62007b930e75fe753b12eda3ccdd312e1fb27a129d5b9dad7e09f1976c1a0436152fc4703362a48ffabeb286cf036e7ead275f0328bcc51
|
data/Gemfile.lock
CHANGED
data/lib/helmsnap/generate.rb
CHANGED
@@ -10,8 +10,17 @@ class Helmsnap::Generate < Helmsnap::Service
|
|
10
10
|
def call
|
11
11
|
Helmsnap::SetupDependencies.call(config)
|
12
12
|
|
13
|
-
|
13
|
+
Dir.mktmpdir do |tmpdir|
|
14
|
+
tmp_path = Pathname.new(tmpdir)
|
15
|
+
generate!(tmp_path)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
attr_accessor :config, :snapshots_path
|
14
22
|
|
23
|
+
def generate!(tmp_path)
|
15
24
|
config.envs.each do |env|
|
16
25
|
run_cmd(
|
17
26
|
"helmfile",
|
@@ -19,21 +28,20 @@ class Helmsnap::Generate < Helmsnap::Service
|
|
19
28
|
env.name,
|
20
29
|
"template",
|
21
30
|
"--output-dir-template",
|
22
|
-
|
31
|
+
tmp_path.join(env.name, "{{ .Release.Name }}"),
|
23
32
|
"--skip-deps",
|
24
33
|
)
|
25
34
|
end
|
26
35
|
|
27
|
-
|
36
|
+
tmp_path.glob(["**/*yaml", "**/*.yml"]).each do |path|
|
28
37
|
content = path.read
|
29
38
|
content.gsub!(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d+/, "2022-01-01 00:00:00.000")
|
30
39
|
content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00-00")
|
31
40
|
content.gsub!(/\d\d\d\d-\d\d-\d\d-\d\d-\d\d/, "2022-01-01-00-00")
|
32
41
|
path.write(content)
|
33
42
|
end
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
43
|
|
38
|
-
|
44
|
+
FileUtils.rmtree(snapshots_path)
|
45
|
+
FileUtils.move(tmp_path, snapshots_path)
|
46
|
+
end
|
39
47
|
end
|
data/lib/helmsnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helmsnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuri Smirnov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.5.
|
81
|
+
rubygems_version: 3.5.23
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: A tool for creating and checking helm chart snapshots.
|