helmsnap 1.1.0 → 1.2.1
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 +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 306405fefdd0a806b1e89fd691a7412686218ffaeb981a9685e40ee6ff5a8880
|
4
|
+
data.tar.gz: 644a72cc622dcefe774bea2acc8cd9816f770290e4704b28aafa3b6311dae122
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6c09ccb98572852ee4877afbe6c3371cb03e9a6df5476057770bee762e9f0a6f9eb3dab20e0c3d2de97c827ce1d4e2b1b524214f671ffe0c58c81fb1d40a00b
|
7
|
+
data.tar.gz: b0d4ba70df6544b282ba24b3dbefe8882f0a2cafe0634f60666ed8ca05209462e73303bc5a82fbb6edebb64fb8dbe3a7dfdc660df59b2566bdcc67dae670acb1
|
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.cp_r(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.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
|
+
original_platform: ''
|
6
7
|
authors:
|
7
8
|
- Yuri Smirnov
|
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
|
@@ -24,7 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
28
27
|
email:
|
29
28
|
- tycooon@yandex.ru
|
30
29
|
executables:
|
@@ -63,7 +62,6 @@ licenses:
|
|
63
62
|
metadata:
|
64
63
|
homepage_uri: https://github.com/tycooon/helmsnap
|
65
64
|
source_code_uri: https://github.com/tycooon/helmsnap
|
66
|
-
post_install_message:
|
67
65
|
rdoc_options: []
|
68
66
|
require_paths:
|
69
67
|
- lib
|
@@ -78,8 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
76
|
- !ruby/object:Gem::Version
|
79
77
|
version: '0'
|
80
78
|
requirements: []
|
81
|
-
rubygems_version: 3.
|
82
|
-
signing_key:
|
79
|
+
rubygems_version: 3.6.1
|
83
80
|
specification_version: 4
|
84
81
|
summary: A tool for creating and checking helm chart snapshots.
|
85
82
|
test_files: []
|