kameleon-builder 2.10.7 → 2.10.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -2
- data/.gitignore +4 -0
- data/CHANGES +18 -0
- data/lib/kameleon/cli.rb +5 -1
- data/lib/kameleon/context.rb +1 -0
- data/lib/kameleon/engine.rb +16 -2
- data/lib/kameleon/repository.rb +1 -1
- data/lib/kameleon/shell.rb +1 -1
- data/lib/kameleon/version.rb +1 -1
- data/lib64 +1 -0
- data/tests/recipes/steps/checkpoints/test.yaml +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0090f004c5c7501866feada95e6f0a402bd02b6eb3bfbbe1f3252bcc6e399f8f'
|
4
|
+
data.tar.gz: 6ff09a19773c76287ab9e0ef9c6aa4b49675be9e030ef195b3b53a636208add6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b075dc8cb7cb14dc4576cca16ea8f3d785d9d44e3dd75028d84b285e9c07e02e2bb40467a504801634b6bd7d315115411643288f052ca4220cfb047d0cc7b7d2
|
7
|
+
data.tar.gz: f3444f8b1b0b5b8ea942debad0625ff22ae890a13355131dfb41c1e3a1cd6694577b31e2598bf04aaea7041f14b97d69d8f24e7d90f2860afc803dedc7cadf27
|
data/.bumpversion.cfg
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[bumpversion]
|
2
2
|
commit = True
|
3
3
|
tag = True
|
4
|
-
current_version = 2.10.
|
4
|
+
current_version = 2.10.9
|
5
5
|
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+))?
|
6
6
|
serialize =
|
7
7
|
{major}.{minor}.{patch}.{release}
|
@@ -14,4 +14,3 @@ optional_value = gamma
|
|
14
14
|
values =
|
15
15
|
dev
|
16
16
|
gamma
|
17
|
-
|
data/.gitignore
CHANGED
data/CHANGES
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
Kameleon CHANGELOG
|
2
2
|
==================
|
3
3
|
|
4
|
+
Version 2.10.9
|
5
|
+
--------------
|
6
|
+
|
7
|
+
Released on April 27th 2023
|
8
|
+
|
9
|
+
- Add the --microstep-checkpoint option to enable creating checkpoint on all microsteps.
|
10
|
+
- Add timing info for microsteps and microstep checkpoints in verbose mode.
|
11
|
+
- Minor fixes.
|
12
|
+
- Enable using a python venv for bumpversion (.gitignore, .envrc)
|
13
|
+
|
14
|
+
Version 2.10.8
|
15
|
+
--------------
|
16
|
+
|
17
|
+
Released on October 21st 2022
|
18
|
+
|
19
|
+
- Fix a fatal error with the pipe command: make sure the destination context is started.
|
20
|
+
- Avoid git warning when running kameleon repo update: use git pull --ff-only
|
21
|
+
|
4
22
|
Version 2.10.7
|
5
23
|
--------------
|
6
24
|
|
data/lib/kameleon/cli.rb
CHANGED
@@ -390,7 +390,11 @@ module Kameleon
|
|
390
390
|
"Default value is the last checkpoint."
|
391
391
|
method_option :enable_checkpoint, :type => :boolean,
|
392
392
|
:default => false,
|
393
|
-
:desc => "Enables
|
393
|
+
:desc => "Enables checkpointing"
|
394
|
+
method_option :microstep_checkpoint, :type => :string,
|
395
|
+
:enum => ["first", "all"],
|
396
|
+
:default => "first",
|
397
|
+
:desc => "Create checkpoint of the first microstep only, or all"
|
394
398
|
method_option :list_checkpoints, :type => :boolean, :aliases => "--checkpoints",
|
395
399
|
:default => false,
|
396
400
|
:desc => "Lists all availables checkpoints"
|
data/lib/kameleon/context.rb
CHANGED
@@ -106,6 +106,7 @@ module Kameleon
|
|
106
106
|
|
107
107
|
Kameleon.ui.verbose("Forwarding #{tmp.path} to STDIN of #{other_ctx.name}_ctx")
|
108
108
|
dest_pipe_path = "${KAMELEON_WORKDIR}/pipe-#{ Kameleon::Utils.generate_slug(other_cmd)[0..20] }"
|
109
|
+
other_ctx.load_shell
|
109
110
|
other_ctx.send_file(tmp.path, dest_pipe_path)
|
110
111
|
other_cmd_with_pipe = "cat #{dest_pipe_path} | #{other_cmd} && rm #{dest_pipe_path}"
|
111
112
|
other_ctx.execute(other_cmd_with_pipe, kwargs)
|
data/lib/kameleon/engine.rb
CHANGED
@@ -28,6 +28,7 @@ module Kameleon
|
|
28
28
|
end
|
29
29
|
@enable_checkpoint = @options[:enable_checkpoint]
|
30
30
|
@enable_checkpoint = true unless @options[:from_checkpoint].nil?
|
31
|
+
@microstep_checkpoint = @options[:microstep_checkpoint]
|
31
32
|
# Check if the recipe have checkpoint entry
|
32
33
|
if @enable_checkpoint && @recipe.checkpoint.nil?
|
33
34
|
fail BuildError, "Checkpoint is unavailable for this recipe"
|
@@ -189,6 +190,7 @@ module Kameleon
|
|
189
190
|
section.sequence do |macrostep|
|
190
191
|
checkpointed = false
|
191
192
|
macrostep_time = Time.now.to_i
|
193
|
+
macrostep_checkpoint_duration = 0
|
192
194
|
if @cache then
|
193
195
|
Kameleon.ui.debug("Starting proxy cache server for macrostep '#{macrostep.name}'...")
|
194
196
|
# the following function start a polipo web proxy and stops a previous run
|
@@ -198,6 +200,8 @@ module Kameleon
|
|
198
200
|
end
|
199
201
|
end
|
200
202
|
macrostep.sequence do |microstep|
|
203
|
+
microstep_time = Time.now.to_i
|
204
|
+
microstep_checkpoint_duration = 0
|
201
205
|
step_prefix = "Step #{ microstep.order } : "
|
202
206
|
Kameleon.ui.info("#{step_prefix}#{ microstep.slug }")
|
203
207
|
if @enable_checkpoint
|
@@ -208,16 +212,25 @@ module Kameleon
|
|
208
212
|
if microstep.in_cache && microstep.on_checkpoint == "use_cache"
|
209
213
|
Kameleon.ui.msg("--> Using checkpoint")
|
210
214
|
else
|
215
|
+
begin
|
211
216
|
Kameleon.ui.msg("--> Running the step...")
|
212
217
|
microstep.commands.each do |cmd|
|
213
218
|
safe_exec_cmd(cmd)
|
214
219
|
end
|
220
|
+
rescue SystemExit, Interrupt
|
221
|
+
reload_contexts
|
222
|
+
breakpoint(nil)
|
223
|
+
end
|
215
224
|
unless microstep.on_checkpoint == "redo"
|
216
|
-
unless checkpointed
|
225
|
+
unless checkpointed and @microstep_checkpoint == "first"
|
217
226
|
if checkpoint_enabled?
|
227
|
+
microstep_checkpoint_time = Time.now.to_i
|
218
228
|
Kameleon.ui.msg("--> Creating checkpoint : #{ microstep.identifier }")
|
219
229
|
create_checkpoint(microstep.identifier)
|
220
230
|
checkpointed = true
|
231
|
+
microstep_checkpoint_duration = Time.now.to_i - microstep_checkpoint_time
|
232
|
+
macrostep_checkpoint_duration += microstep_checkpoint_duration
|
233
|
+
Kameleon.ui.verbose("Checkpoint creation for MicroStep #{microstep.name} took: #{microstep_checkpoint_duration} secs")
|
221
234
|
end
|
222
235
|
end
|
223
236
|
end
|
@@ -233,8 +246,9 @@ module Kameleon
|
|
233
246
|
breakpoint(nil)
|
234
247
|
end
|
235
248
|
end
|
249
|
+
Kameleon.ui.verbose("MicroStep #{microstep.name} took: #{Time.now.to_i - microstep_time - microstep_checkpoint_duration} secs")
|
236
250
|
end
|
237
|
-
Kameleon.ui.info("Step #{macrostep.name} took: #{Time.now.to_i-macrostep_time} secs")
|
251
|
+
Kameleon.ui.info("Step #{macrostep.name} took: #{Time.now.to_i - macrostep_time - macrostep_checkpoint_duration} secs")
|
238
252
|
end
|
239
253
|
@cleaned_sections.push(section.name)
|
240
254
|
end
|
data/lib/kameleon/repository.rb
CHANGED
@@ -30,7 +30,7 @@ module Kameleon
|
|
30
30
|
git_repo = File.join(Kameleon.env.repositories_path, name)
|
31
31
|
raise RepositoryError, "Repository not found '#{name}'" if not File.directory?(git_repo)
|
32
32
|
cmd = ["git", "--git-dir", File.join(git_repo, ".git"), "--work-tree",
|
33
|
-
git_repo, "pull", "--
|
33
|
+
git_repo, "pull", "--ff-only"]
|
34
34
|
process = ChildProcess.build(*cmd)
|
35
35
|
process.io.inherit!
|
36
36
|
process.start
|
data/lib/kameleon/shell.rb
CHANGED
data/lib/kameleon/version.rb
CHANGED
data/lib64
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
./lib
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kameleon-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salem Harrache
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: childprocess
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/kameleon/ui.rb
|
190
190
|
- lib/kameleon/utils.rb
|
191
191
|
- lib/kameleon/version.rb
|
192
|
+
- lib64
|
192
193
|
- scripts/bumpversion.py
|
193
194
|
- tests/helper.rb
|
194
195
|
- tests/issue76/fail.stdout
|
@@ -235,8 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
236
|
requirements:
|
236
237
|
- polipo 1.0.3, or greater
|
237
238
|
- graphviz 2.38.0 or greater
|
238
|
-
|
239
|
-
rubygems_version: 2.7.6.2
|
239
|
+
rubygems_version: 3.2.5
|
240
240
|
signing_key:
|
241
241
|
specification_version: 4
|
242
242
|
summary: Kameleon is a tool to build system appliances from scratch
|