kameleon-builder 2.10.7 → 2.10.9

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: aa12710602f297326fe8253eab48928c5e527a07bdc91b3f6686375faa83c8c5
4
- data.tar.gz: 306b743b116a9a53801208368f54a2e71bcf2b1bdb55f17d7549eac003403e0d
3
+ metadata.gz: '0090f004c5c7501866feada95e6f0a402bd02b6eb3bfbbe1f3252bcc6e399f8f'
4
+ data.tar.gz: 6ff09a19773c76287ab9e0ef9c6aa4b49675be9e030ef195b3b53a636208add6
5
5
  SHA512:
6
- metadata.gz: a97ddc0ccb77269a2084ad51022b66393300404cd220d1eff6c51e85d2de8f33122d8d44d308c8c27ff4bcda6122076d5ed6e269ca01c2af51059a45eb4aa31b
7
- data.tar.gz: 5290bd82ceb90cabe2ee472485feb652c6b653638b45bff99e1869b56c86edf6845241082ea2561a0b33ea6ce52e2130d775dbcf59ec673e749cdedb1fb4612a
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.7
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,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 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"
@@ -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)
@@ -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
@@ -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", "--verbose"]
33
+ git_repo, "pull", "--ff-only"]
34
34
  process = ChildProcess.build(*cmd)
35
35
  process.io.inherit!
36
36
  process.start
@@ -177,7 +177,7 @@ SCRIPT
177
177
 
178
178
  def execute(cmd, kwargs = {})
179
179
  cmd_obj = Command.new(cmd)
180
- send_command cmd_obj = Command.new(cmd)
180
+ send_command(cmd_obj)
181
181
  iodata = {:stderr => { :io => @stderr,
182
182
  :name => 'stderr',
183
183
  :begin => false,
@@ -1,3 +1,3 @@
1
1
  module Kameleon
2
- VERSION = '2.10.7'
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.7
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: 2021-12-07 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