kameleon-builder 2.10.8 → 2.10.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 553ea238eb5037446a3a2fd352806d8f32bc19d728288b60b515d00c606c8862
4
- data.tar.gz: 8ec292f91ce56340f1492f1c8f9533b4615fb108029d4985eb515d5c08a97a14
3
+ metadata.gz: '0090f004c5c7501866feada95e6f0a402bd02b6eb3bfbbe1f3252bcc6e399f8f'
4
+ data.tar.gz: 6ff09a19773c76287ab9e0ef9c6aa4b49675be9e030ef195b3b53a636208add6
5
5
  SHA512:
6
- metadata.gz: 9b57c04cd35dbeb46a61dbb9b1a433b141f7952e8db071795505c061781ccbf63df33f4d3540f9c3c9d530ba7c4e3fa9d25f3397ea81e3abd17b85bbf7a75e35
7
- data.tar.gz: 69179ec31b646c1b98c42817a880aa2423a316ada9338383f7fb88f7d4f9f0aefd40808803df4e5dd129d50a2f85218544c57223126f79121f6af2427a821691
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.8
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
@@ -24,3 +24,7 @@ coverage
24
24
  *.log
25
25
  bin/*
26
26
  build
27
+ share/python-wheels
28
+ lib/python*
29
+ pyvenv.cfg
30
+ .envrc
data/CHANGES CHANGED
@@ -1,6 +1,16 @@
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
+
4
14
  Version 2.10.8
5
15
  --------------
6
16
 
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 checkpoint [experimental]"
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"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kameleon
2
- VERSION = '2.10.8'
2
+ VERSION = '2.10.9'
3
3
  end
data/lib64 ADDED
@@ -0,0 +1 @@
1
+ ./lib
@@ -8,6 +8,7 @@ apply:
8
8
  - exec_local: echo @microstep_id
9
9
 
10
10
  list:
11
+ - exec_local: touch $KAMELEON_WORKDIR/list_checkpoint.txt
11
12
  - exec_local: cat $KAMELEON_WORKDIR/list_checkpoint.txt
12
13
 
13
14
  clear:
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.8
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: 2022-10-21 00:00:00.000000000 Z
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
- rubyforge_project:
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