kameleon-builder 2.10.10 → 2.10.11

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: 2492ad18812484a81bd0aa54360137ee497d43fcea554cd60f2d68eec3c951c7
4
- data.tar.gz: 36c9ab6b6757a0930e8c3e0aec1dd69eef915d48aa1ef1f9d953fdd9b036c1d8
3
+ metadata.gz: 36e3991d3bbfbe79544b066ad82c004d593c495846ae1007ef480380f8ca2515
4
+ data.tar.gz: d7b05320be1cad37d6ef1a2bcc5a4b0b9f24e8312e3e8583d68d9030a229ceb8
5
5
  SHA512:
6
- metadata.gz: 703c0d4a6d43d24a3c6d455049f661a8d8eabcaad4d07168a4233acd5044f213fbc80abb4ef4074200afe98999f68a48e2ff52c07b27e6dfd40590609e08d6df
7
- data.tar.gz: cc7c30c503c3e8c59c1b188adeddb63a0286367959428126b1dbcd10bd996abbe80c34e42abebb525ad6a06f107d9e4f4e1ae23ac5bc7e74645795b026dde32a
6
+ metadata.gz: 9c4044be6f6dfe98512b5cbf291caff91383938d71d8575165b87c08e96954b428f60030a37635ce1ccb4bc3d60642cd20403bde1a441be166c647751719ccd5
7
+ data.tar.gz: 64aaa77fa583af640ea93f4979bfac6a96a6d48f641207560f3457b18dab4404e980048e0bebaefa901fe7cf1aa66fd5f0a2941e245e05b476da3b88e44bd775
data/.bumpversion.cfg CHANGED
@@ -1,7 +1,7 @@
1
1
  [bumpversion]
2
2
  commit = True
3
3
  tag = True
4
- current_version = 2.10.10
4
+ current_version = 2.10.11
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}
data/CHANGES CHANGED
@@ -1,10 +1,22 @@
1
1
  Kameleon CHANGELOG
2
2
  ==================
3
3
 
4
+ Version 2.10.11
5
+ ---------------
6
+
7
+ Released on October 10th 2023
8
+
9
+ - Rework the checkpointing code.
10
+ - Make build --from-checkpoint not activate the checkpointing without the --enable-checkpointing option.
11
+ - Add the -F alias for the build --from-checkpoint option and allow passing the microstrep slug instead of it's id.
12
+ - Add the build --begin-checkpoint (or -B) and --end-checkpoint (or -E) options that allows giving the window of steps to checkpoint.
13
+ - Remove the dryrun command and add the --dryrun (or -d) switch to the build action.
14
+ - Make build --dryrun --list-checkpoints (or -d -l) to show possible checkpoints for the recipe.
15
+
4
16
  Version 2.10.10
5
- --------------
17
+ ---------------
6
18
 
7
- Released on June 13 2023
19
+ Released on June 13th 2023
8
20
 
9
21
  - Set kameleon build --microstep-checkpoint option to "all" by default.
10
22
  - Rework the kameleon checkpoint documentation and more.
@@ -24,7 +36,7 @@ Released on April 27th 2023
24
36
  - Add the --microstep-checkpoint option to enable creating checkpoint on all microsteps.
25
37
  - Add timing info for microsteps and microstep checkpoints in verbose mode.
26
38
  - Minor fixes.
27
- - Enable using a python venv for bumpversion (.gitignore, .envrc)
39
+ - Enable using a python venv for bumpversion (.gitignore, .envrc).
28
40
 
29
41
  Version 2.10.8
30
42
  --------------
@@ -32,29 +44,30 @@ Version 2.10.8
32
44
  Released on October 21st 2022
33
45
 
34
46
  - Fix a fatal error with the pipe command: make sure the destination context is started.
35
- - Avoid git warning when running kameleon repo update: use git pull --ff-only
47
+ - Avoid git warning when running kameleon repo update: use git pull --ff-only.
36
48
 
37
49
  Version 2.10.7
38
50
  --------------
39
51
 
40
52
  Released on December 02nd 2021
41
53
 
42
- - Add support for the .filter file to filter recipes/template lists
54
+ - Add support for the .filter file to filter recipes/template lists.
43
55
 
44
56
  Version 2.10.6
45
57
  --------------
46
58
 
47
59
  Released on November 24th 2021
48
60
 
49
- - Add the option filter for the template and recipe listings
50
- - Preserve permission of files when importing template
61
+ - Add the option filter for the template and recipe listings.
62
+ - Preserve permission of files when importing template.
51
63
 
52
64
  Version 2.10.5
53
65
  --------------
54
66
 
55
67
  Released on July 29th 2021
56
68
 
57
- - Remove polipo from the software dependencies as it is not maintained anymore. This breaks the caching feature.
69
+ - Remove polipo from the software dependencies as it is not maintained anymore.
70
+ This breaks the caching feature.
58
71
  - Some changes to allow a debian packaging.
59
72
  - Update authors.
60
73
  - Change the version information file and update scripts accordingly.
@@ -64,55 +77,55 @@ Version 2.10.4
64
77
 
65
78
  Released on May 11th 2020
66
79
 
67
- - Fix support for extend ERB
68
- - Add the `kameleon template erb` command
69
- - Fix bash completion
70
- - Cosmetic code fixes
80
+ - Fix support for extend ERB.
81
+ - Add the `kameleon template erb` command.
82
+ - Fix bash completion.
83
+ - Cosmetic code fixes.
71
84
 
72
85
  Version 2.10.3
73
86
  --------------
74
87
 
75
88
  Released on April 10th 2020
76
89
 
77
- - Rework kameleon template list: add color add progress bar
78
- - Make bash completion understand the subcommands
79
- - Fix the command help -> `kameleon <command> -h`
80
- - Add support for custom extend erb templates
90
+ - Rework kameleon template list: add color add progress bar.
91
+ - Make bash completion understand the subcommands.
92
+ - Fix the command help -> `kameleon <command> -h`.
93
+ - Add support for custom extend erb templates.
81
94
 
82
95
  Version 2.10.2
83
96
  --------------
84
97
 
85
98
  Released on April 09th 2020
86
99
 
87
- - Fix cli help for the repository and template sub-commands
88
- - Add the git remote url and branch to kameleon repo list
89
- - Add the 'kameleon repository remove' command
100
+ - Fix cli help for the repository and template sub-commands.
101
+ - Add the git remote url and branch to kameleon repo list.
102
+ - Add the 'kameleon repository remove' command.
90
103
 
91
104
  Version 2.10.1
92
105
  -------------
93
106
 
94
107
  Released on March 21th 2020
95
108
 
96
- - Fix regression in 2.10.0 with the build directory creation
109
+ - Fix regression in 2.10.0 with the build directory creation.
97
110
 
98
111
  Version 2.10.0
99
112
  -------------
100
113
 
101
114
  Released on March 21th 2020
102
115
 
103
- - Rework usage (cosmetic fixes)
104
- - Drop the `kameleon template repository` action (same as `kameleon repository`)
105
- - Make `kameleon dag` and `kameleon dryrun` standalone actions instead of `kameleon info` options
106
- - Add the `kamelon dag --recipes-only`
107
- - Make `kameleon dag` show distincly the extended recipe among the ancestors
108
- - Add the `kameleon export` action
116
+ - Rework usage (cosmetic fixes).
117
+ - Drop the `kameleon template repository` action (same as `kameleon repository`).
118
+ - Make `kameleon dag` and `kameleon dryrun` standalone actions instead of `kameleon info` options.
119
+ - Add the `kamelon dag --recipes-only`.
120
+ - Make `kameleon dag` show distincly the extended recipe among the ancestors.
121
+ - Add the `kameleon export` action.
109
122
 
110
123
  Version 2.9.4
111
124
  -------------
112
125
 
113
126
  Released on December 12th 2018
114
127
 
115
- - Minor fixes
128
+ - Minor fixes.
116
129
  - NB: the 2.9.3 version was lost in space...
117
130
 
118
131
 
@@ -121,8 +134,8 @@ Version 2.9.2
121
134
 
122
135
  Released on February 21st 2018
123
136
 
124
- - Enforce the number of sub commands for the rescue and test commands
125
- - Support nested aliases
137
+ - Enforce the number of sub commands for the rescue and test commands.
138
+ - Support nested aliases.
126
139
 
127
140
  Version 2.9.1
128
141
  -------------
@@ -136,58 +149,58 @@ Version 2.9.0
136
149
 
137
150
  Released on June 29th 2017
138
151
 
139
- - Bump to a new minor version due to the addition of the test and group commands
140
- - Refresh documentation
152
+ - Bump to a new minor version due to the addition of the test and group commands.
153
+ - Refresh documentation.
141
154
 
142
155
  Version 2.8.4
143
156
  -------------
144
157
 
145
- - Fix the build usage message
146
- - Fix the cache compression options: allow no compression
147
- - Add the test and group commands for microsteps
158
+ - Fix the build usage message.
159
+ - Fix the cache compression options: allow no compression.
160
+ - Add the test and group commands for microsteps.
148
161
 
149
162
  Version 2.8.3
150
163
  -------------
151
164
 
152
- - Patch the doc and the default new recipe template
165
+ - Patch the doc and the default new recipe template.
153
166
 
154
167
  Version 2.8.2
155
168
  -------------
156
169
 
157
170
  Released on September 06th 2016
158
171
 
159
- - Make kameleon new and template import works
172
+ - Make kameleon new and template import works.
160
173
 
161
174
  Version 2.8.1
162
175
  -------------
163
176
 
164
- - Manage problem with gem update
177
+ - Manage problem with gem update.
165
178
 
166
179
  Version 2.8.0
167
180
  -------------
168
181
 
169
182
  Released on September 05th 2016
170
183
 
171
- - Add the possibility to overload extend with backend
184
+ - Add the possibility to overload extend with backend.
172
185
 
173
186
  Version 2.7.8
174
187
  -------------
175
188
 
176
- - Fix info data resolution (fix #78)
189
+ - Fix info data resolution (fix #78).
177
190
 
178
191
  Version 2.7.7
179
192
  -------------
180
193
 
181
194
  Released on September 01st 2016
182
195
 
183
- - Add some warning to avoid global CLI option misuse
196
+ - Add some warning to avoid global CLI option misuse.
184
197
 
185
198
  Version 2.7.6
186
199
  -------------
187
200
 
188
201
  Released on August 31st 2016
189
202
 
190
- - Fix step variable resolution for composed variable (#79), and containing
203
+ - Fix step variable resolution for composed variable (#79), and containing.
191
204
  uuid (#90).
192
205
 
193
206
  Version 2.7.5
@@ -195,63 +208,63 @@ Version 2.7.5
195
208
 
196
209
  Released on August 31st 2016
197
210
 
198
- - Fix last problem with Kameleon_data_dir (again)
211
+ - Fix last problem with Kameleon_data_dir (again).
199
212
 
200
213
  Version 2.7.4
201
214
  -------------
202
215
 
203
216
  Released on August 29th 2016
204
217
 
205
- - Fix Kameleon_data_dir is not rendering correctly with {} (#85)
218
+ - Fix Kameleon_data_dir is not rendering correctly with {} (#85).
206
219
 
207
220
  Version 2.7.3
208
221
  -------------
209
222
 
210
223
  Released on June 20th 2016
211
224
 
212
- - The info command can now handle multiple recipes
213
- - Colorized the output of the info command
214
- - Added the dryrun option to the info command
215
- - Added the dag option to the info command: draw a GraphViz dag for recipes
225
+ - The info command can now handle multiple recipes.
226
+ - Colorized the output of the info command.
227
+ - Added the dryrun option to the info command.
228
+ - Added the dag option to the info command: draw a GraphViz dag for recipes.
216
229
 
217
230
  Version 2.7.2
218
231
  -------------
219
232
 
220
233
  Released on February 17th 2016
221
234
 
222
- - Added ``interactive_cmd`` option to set a more apropriate interactive shell command
223
- - Removed bash errexit flag to force bash to trap interruption
235
+ - Added ``interactive_cmd`` option to set a more apropriate interactive shell command.
236
+ - Removed bash errexit flag to force bash to trap interruption.
224
237
 
225
238
  Version 2.7.1
226
239
  -------------
227
240
 
228
- - Non-strictly template variable resolution (Fixed #67)
241
+ - Non-strictly template variable resolution (Fixed #67).
229
242
 
230
243
  Version 2.7.0
231
244
  -------------
232
245
 
233
246
  Released on December 09th 2015
234
247
 
235
- - Fixed variables overload when using inheritance
236
- - Added support for including global options from a separate file (#57)
237
- - Allowed kameleon to fail silently if some error occured during include
238
- - Marked all bash variables for export
239
- - Sorted variables in ``kameleon info`` dump
240
- - Removed duplicate error messages
241
- - Shutdown polipo cleanly (#54)
242
- - Added offline mode to prevent Polipo from contacting remote servers
243
- - Fixed polipo default options to avoid "206 partial responses" (#54)
244
- - Made only one checkpoint per macrostep to improve performance
245
- - Made polipo log file unique for each user to avoid "Permission denied" error
246
- - Added new keyword in ZSH completion
248
+ - Fixed variables overload when using inheritance.
249
+ - Added support for including global options from a separate file (#57).
250
+ - Allowed kameleon to fail silently if some error occured during include.
251
+ - Marked all bash variables for export.
252
+ - Sorted variables in ``kameleon info`` dump.
253
+ - Removed duplicate error messages.
254
+ - Shutdown polipo cleanly (#54).
255
+ - Added offline mode to prevent Polipo from contacting remote servers.
256
+ - Fixed polipo default options to avoid "206 partial responses" (#54).
257
+ - Made only one checkpoint per macrostep to improve performance.
258
+ - Made polipo log file unique for each user to avoid "Permission denied" error.
259
+ - Added new keyword in ZSH completion.
247
260
 
248
261
  Version 2.6.7
249
262
  -------------
250
263
 
251
- Released on October 01st 2015
264
+ Released on October 1st 2015
252
265
 
253
- - Decreased polipo exit timeout (120 to 5s)
254
- - Passed only recipe files (not directories) to the cache to fixed persistant cache crash
266
+ - Decreased polipo exit timeout (120 to 5s).
267
+ - Passed only recipe files (not directories) to the cache to fixed persistant cache crash.
255
268
 
256
269
 
257
270
  Version 2.6.6
@@ -259,40 +272,40 @@ Version 2.6.6
259
272
 
260
273
  Released on September 14th 2015
261
274
 
262
- - set default ``cache_archive_compression`` to gzip
275
+ - set default ``cache_archive_compression`` to gzip.
263
276
 
264
277
  Version 2.6.5
265
278
  -------------
266
279
 
267
280
  Released on September 14th 2015
268
281
 
269
- - Fixed the proxy-cache to allow big files
270
- - Added ``--proxy`` and ``--proxy-credentials`` options to set a global proxy for kameleon
271
- - Added ``proxy_local``, ``proxy_out`` and ``proxy_in`` kameleon recipe variables to get proxy address from recipe
272
- - Enabled ERB templating in the user environement files
273
- - Renamed ``--proxy-path`` option to ``--polipo-path``
282
+ - Fixed the proxy-cache to allow big files.
283
+ - Added ``--proxy`` and ``--proxy-credentials`` options to set a global proxy for kameleon.
284
+ - Added ``proxy_local``, ``proxy_out`` and ``proxy_in`` kameleon recipe variables to get proxy address from recipe.
285
+ - Enabled ERB templating in the user environement files.
286
+ - Renamed ``--proxy-path`` option to ``--polipo-path``.
274
287
 
275
288
  Version 2.6.4
276
289
  -------------
277
290
 
278
- Released on September 07th 2015
291
+ Released on September 7th 2015
279
292
 
280
- - Fixed kameleon data variables resolution
293
+ - Fixed kameleon data variables resolution.
281
294
 
282
295
  Version 2.6.3
283
296
  -------------
284
297
 
285
298
  Released on August 25th 2015
286
299
 
287
- - Don't fail now if a context was closed
300
+ - Don't fail now if a context was closed.
288
301
 
289
302
  Version 2.6.2
290
303
  -------------
291
304
 
292
305
  Released on August 25th 2015
293
306
 
294
- - Added ``cache_archive_compression`` option to choose compression tool
295
- - Tried using curl before wget
307
+ - Added ``cache_archive_compression`` option to choose compression tool.
308
+ - Tried using curl before wget.
296
309
 
297
310
 
298
311
  Version 2.6.1
@@ -300,69 +313,65 @@ Version 2.6.1
300
313
 
301
314
  Released on August 12th 2015
302
315
 
303
- - Cli global parameters overwrite all recipe key:value parameters
316
+ - Cli global parameters overwrite all recipe key:value parameters.
304
317
 
305
318
  Version 2.6.0
306
319
  -------------
307
320
 
308
321
  Released on May 13th 2015
309
322
 
310
- - Added --list-checkpoints to ``kameleon build`` command
311
- - Removed ``kameleon checkpoints`` and ``kameleon clean`` commands
312
- - Displayed error information in normal and verbose mode
313
- - Fixed ruby 1.8.7 compatibility
314
- - Added Zsh completion (See completion)
323
+ - Added --list-checkpoints to ``kameleon build`` command.
324
+ - Removed ``kameleon checkpoints`` and ``kameleon clean`` commands.
325
+ - Displayed error information in normal and verbose mode.
326
+ - Fixed ruby 1.8.7 compatibility.
327
+ - Added Zsh completion (See completion).
315
328
 
316
329
  Version 2.5.0
317
330
  -------------
318
331
 
319
332
  Released on Jan 27th 2015
320
333
 
321
- - Allowed user to get custom shell environement by adding shell script
322
- - Added option ``--verbose`` to allow user debugging
323
- - Added option ``--from-cache`` to the ``kameleon info`` subcommand
324
- - Enabled bash xtrace in verbose mode
325
- - Checked appropriate proxy cache server start
326
- - Fixed recipe path in proxy cache metadata
327
- - Forced proxy cache to use IPv4
328
- - Improved UI with more color and less output messages
329
-
334
+ - Allowed user to get custom shell environement by adding shell script.
335
+ - Added option ``--verbose`` to allow user debugging.
336
+ - Added option ``--from-cache`` to the ``kameleon info`` subcommand.
337
+ - Enabled bash xtrace in verbose mode.
338
+ - Checked appropriate proxy cache server start.
339
+ - Fixed recipe path in proxy cache metadata.
340
+ - Forced proxy cache to use IPv4.
341
+ - Improved UI with more color and less output messages.
330
342
 
331
343
  Version 2.4.0
332
344
  -------------
333
345
 
334
346
  Released on Dec 23rd 2014
335
347
 
336
- - Supported recipe attached data
337
- - Introduced a new shell command execution mechanism, to prevent kameleon from waiting forever if the command act weird (Fixed #39)
338
- - Improved the customization of steps with inheritance
339
- - Allowed to set global variables from cli during build using ``--global key:value ..``
340
- - Moved repository command to the upper level (``kameleon repository``)
341
-
348
+ - Supported recipe attached data.
349
+ - Introduced a new shell command execution mechanism, to prevent kameleon from waiting forever if the command act weird (Fixed #39).
350
+ - Improved the customization of steps with inheritance.
351
+ - Allowed to set global variables from cli during build using ``--global key:value ..``.
352
+ - Moved repository command to the upper level (``kameleon repository``).
342
353
 
343
354
  Version 2.3.5
344
355
  -------------
345
356
 
346
357
  Released on Dec 2nd 2014
347
358
 
348
- - Fixed kameleon 2.3.4 regressions about ``kameleon build``
349
-
359
+ - Fixed kameleon 2.3.4 regressions about ``kameleon build``.
350
360
 
351
361
  Version 2.3.4
352
362
  -------------
353
363
 
354
364
  Released on Nov 26th 2014
355
365
 
356
- - Fixed kameleon 2.3.3 regressions about the template import
357
-
366
+ - Fixed kameleon 2.3.3 regressions about the template import.
358
367
 
359
368
  Version 2.3.3
360
369
  -------------
361
370
 
362
371
  Released on Nov 26th 2014
363
372
 
364
- - Minor improvements
365
- - Fixed issue with listing the templates avaiable in a repository
373
+ - Minor improvements.
374
+ - Fixed issue with listing the templates avaiable in a repository.
366
375
 
367
376
  Version 2.3.2
368
377
  -------------
@@ -384,119 +393,115 @@ Version 2.3.0
384
393
 
385
394
  Released on Oct 16th 2014
386
395
 
387
- - Handled Ctrl-C to make a breakpoint instead of quitting. (Fixed #29)
388
- - Stored kameleon user configuration file in ``~/.kameleon.d/config`` (Fixed #24)
389
- - Fixed ``kameleon new`` to take an absolute or relative path and place the recipe in a subdir (Fixed #22)
390
- - Moved builtin recipes to an external repository: See [http://kameleon.imag.fr/repository.html](Docs) (Fixed #24)
391
- - Renamed ``--cache`` option to ``--enable-cache``
392
- - Renamed ``--checkpoint`` option to ``--enable-checkpoint``
393
- - Removed ``kameleon import`` command
394
- - Removed ``kameleon templates`` command
395
- - Added ``kameleon info`` to display detailed information about a recipe
396
- - Added ``kameleon list`` to list all defined recipes in the current directory
397
- - Added ``kameleon template info`` to display detailed information about a template
398
- - Added ``kameleon template import`` to import a template
399
- - Added ``kameleon template list`` to list all available templates
400
- - Added ``kameleon template repository`` to manage external git recipes repositories
401
-
396
+ - Handled Ctrl-C to make a breakpoint instead of quitting. (Fixed #29).
397
+ - Stored kameleon user configuration file in ``~/.kameleon.d/config`` (Fixed #24).
398
+ - Fixed ``kameleon new`` to take an absolute or relative path and place the recipe in a subdir (Fixed #22).
399
+ - Moved builtin recipes to an external repository: See [http://kameleon.imag.fr/repository.html](Docs) (Fixed #24).
400
+ - Renamed ``--cache`` option to ``--enable-cache``.
401
+ - Renamed ``--checkpoint`` option to ``--enable-checkpoint``.
402
+ - Removed ``kameleon import`` command.
403
+ - Removed ``kameleon templates`` command.
404
+ - Added ``kameleon info`` to display detailed information about a recipe.
405
+ - Added ``kameleon list`` to list all defined recipes in the current directory.
406
+ - Added ``kameleon template info`` to display detailed information about a template.
407
+ - Added ``kameleon template import`` to import a template.
408
+ - Added ``kameleon template list`` to list all available templates.
409
+ - Added ``kameleon template repository`` to manage external git recipes repositories.
402
410
 
403
411
  Version 2.2.5
404
412
  -------------
405
413
 
406
414
  Released on Sep 19th 2014
407
415
 
408
- - [template] Customized vm memory size before vagrant export
409
- - [template] Configured virtualbox to use ``82540EM`` driver for ethX interfaces
410
- - [template][debian] installed man-db and net-tools with debootstrap
411
- - [template][centos] Removed traces of mac address from network configuration
412
- - [template][centos] installed man package
413
- - [template][centos] Set OS type to ``Redhat_64`` in virtualbox
414
- - [template][debian] Added security and backports repository
415
- - [template][debian] Added debian security and backports repositories
416
- - [template][debian] Removed ntp from all debian recipes
417
- - [template][centos] Added ``single-request-reopen`` option to network config (centos)
418
- - [template][centos] Fixed corrupted rpm database
419
-
420
-
416
+ - [template] Customized vm memory size before vagrant export.
417
+ - [template] Configured virtualbox to use ``82540EM`` driver for ethX interfaces.
418
+ - [template][debian] installed man-db and net-tools with debootstrap.
419
+ - [template][centos] Removed traces of mac address from network configuration.
420
+ - [template][centos] installed man package.
421
+ - [template][centos] Set OS type to ``Redhat_64`` in virtualbox.
422
+ - [template][debian] Added security and backports repository.
423
+ - [template][debian] Added debian security and backports repositories.
424
+ - [template][debian] Removed ntp from all debian recipes.
425
+ - [template][centos] Added ``single-request-reopen`` option to network config (centos).
426
+ - [template][centos] Fixed corrupted rpm database.
421
427
 
422
428
  Version 2.2.4
423
429
  -------------
424
430
 
425
431
  Released on Sep 2nd 2014
426
432
 
427
- - [template] Added the ``-cpu host`` option to qemu to improve performances
428
- - [template] Made centos image as close as possible as default Centos installation
429
- - [template] Configured SELinux for Fedora and Centos
430
- - [template] Fixed Grid'5000 export step
431
- - [template] Extended vagrant recipes from virtualbox recipes
432
- - [core] Adding the step elapsed time to the Kamelon output
433
- - [proxy cache] Restructured persistent cache and improved caching of pipes
434
- - [proxy cache] Added ``ProxyAdrres`` paramter to polipo to take into account all the host network interfaces
433
+ - [template] Added the ``-cpu host`` option to qemu to improve performances.
434
+ - [template] Made centos image as close as possible as default Centos installation.
435
+ - [template] Configured SELinux for Fedora and Centos.
436
+ - [template] Fixed Grid'5000 export step.
437
+ - [template] Extended vagrant recipes from virtualbox recipes.
438
+ - [core] Adding the step elapsed time to the Kamelon output.
439
+ - [proxy cache] Restructured persistent cache and improved caching of pipes.
440
+ - [proxy cache] Added ``ProxyAdrres`` paramter to polipo to take into account all the host network interfaces.
435
441
 
436
442
  Version 2.2.3
437
443
  -------------
438
444
  Released on Aug 19th 2014
439
445
 
440
- - [template] The extlinux MBR path has changed because jessie is not frozen (Fix #17)
446
+ - [template] The extlinux MBR path has changed because jessie is not frozen (Fix #17).
441
447
 
442
448
  Version 2.2.2
443
449
  -------------
444
450
 
445
451
  Released on July 23rd 2014
446
452
 
447
- - [core] Added ``-h`` CLI option to print help
448
- - [core] Added ``--templates-path`` CLI option to set different templates directory
449
- - [core] Fixed regression about recipe ancestors loading
453
+ - [core] Added ``-h`` CLI option to print help.
454
+ - [core] Added ``--templates-path`` CLI option to set different templates directory.
455
+ - [core] Fixed regression about recipe ancestors loading.
450
456
 
451
457
  Version 2.2.1
452
458
  -------------
453
459
 
454
460
  Released on July 22nd 2014
455
461
 
456
- - [core] Switch to default yaml parser (psych) and removed syck from dependencies
457
- - [core] Loaded a recipe with all ancestors
462
+ - [core] Switch to default yaml parser (psych) and removed syck from dependencies.
463
+ - [core] Loaded a recipe with all ancestors.
458
464
 
459
465
  Version 2.2.0
460
466
  -------------
461
467
 
462
468
  Released on July 20th 2014
463
469
 
464
- - [proxy cache] Added ``proxy_cache`` recipe option to context_in/out to enable
465
- persistant cache for every context
466
- - [proxy cache] Added ``--cache-path`` CLI option to set different cache directory
467
- - [proxy cache] Shared cache directory between recipes by default
468
- - [proxy cache] No more internal cache for debootstrap
469
- - [proxy_cache] Polipo does not use default config file anymore
470
- - [proxy_cache] Recipe is now stored in cache at the end
471
- - [package] Removed diffy from dependencies
472
- - [package] Removed log4r-color from dependencies
473
- - [core] Rewrote checkpoint mechanism. (allow to run multiple commands)
474
- - [core] Added ``--script`` CLI option to enable non-interactive mode
475
- - [core] Added ``reload_context`` command that reloads the context from the recipe
476
- - [core] From now on, Kameleon tries to clean all contexts without blocking the shell
477
- - [core] Improved cleaning contexts upon interruption
478
- - [core] If microstep is marked as ``redo`` or ``skip`` (on checkpoint), the ID will be independent from other steps
479
- - [template] Grouped templates by virtualization tools
480
- - [template] Removed extlinux timeout for debian
481
- - [template] Configured apt to install recommended packages by default
482
- - [template] Added architecture type in templates description
483
- - [template] Forced killing qemu with sigterm signal
484
- - [template] Removed ssh ControlPath option
485
- - [template] Used parted tool in script mode
486
- - [template] Added a timeout during startup and shutdown VMs
487
- - [template] Restored eth0 as default interface in Fedora (net.ifnames=0 biosdevname=0)
488
- - [template] Ensured that the checkpoint was disabled at the beginning of the recipe
489
- - [template] Make sure that qemu is stopped at the end
490
- - [template] Replaced netcat by socat
491
- - [template] Removed duplicated ubuntu repository (restricted)
492
- - [template] Used a debian-jessie iso to bootstrap the out_context with a minimal linux system
493
- - [template] Hide default kameleon state files
494
- - [template] Enabled debug mode with ``KAMELEON_DEBUG=1`` environment variable
495
- - [template] Added ``download_file`` alias that uses curl/wget or python to download files
496
- - [template] Enabled kvm only if available
497
- - [template] Do not run qemu with nohup (Use ``-daemonize`` instead)
498
- - [template] Improved context_out/in log readability
499
- - [template] Removed fedora-rawhide templates
470
+ - [proxy cache] Added ``proxy_cache`` recipe option to context_in/out to enable persistant cache for every context.
471
+ - [proxy cache] Added ``--cache-path`` CLI option to set different cache directory.
472
+ - [proxy cache] Shared cache directory between recipes by default.
473
+ - [proxy cache] No more internal cache for debootstrap.
474
+ - [proxy_cache] Polipo does not use default config file anymore.
475
+ - [proxy_cache] Recipe is now stored in cache at the end.
476
+ - [package] Removed diffy from dependencies.
477
+ - [package] Removed log4r-color from dependencies.
478
+ - [core] Rewrote checkpoint mechanism. (allow to run multiple commands).
479
+ - [core] Added ``--script`` CLI option to enable non-interactive mode.
480
+ - [core] Added ``reload_context`` command that reloads the context from the recipe.
481
+ - [core] From now on, Kameleon tries to clean all contexts without blocking the shell.
482
+ - [core] Improved cleaning contexts upon interruption.
483
+ - [core] If microstep is marked as ``redo`` or ``skip`` (on checkpoint), the ID will be independent from other steps.
484
+ - [template] Grouped templates by virtualization tools.
485
+ - [template] Removed extlinux timeout for debian.
486
+ - [template] Configured apt to install recommended packages by default.
487
+ - [template] Added architecture type in templates description.
488
+ - [template] Forced killing qemu with sigterm signal.
489
+ - [template] Removed ssh ControlPath option.
490
+ - [template] Used parted tool in script mode.
491
+ - [template] Added a timeout during startup and shutdown VMs.
492
+ - [template] Restored eth0 as default interface in Fedora (net.ifnames=0 biosdevname=0).
493
+ - [template] Ensured that the checkpoint was disabled at the beginning of the recipe.
494
+ - [template] Make sure that qemu is stopped at the end.
495
+ - [template] Replaced netcat by socat.
496
+ - [template] Removed duplicated ubuntu repository (restricted).
497
+ - [template] Used a debian-jessie iso to bootstrap the out_context with a minimal linux system.
498
+ - [template] Hide default kameleon state files.
499
+ - [template] Enabled debug mode with ``KAMELEON_DEBUG=1`` environment variable.
500
+ - [template] Added ``download_file`` alias that uses curl/wget or python to download files.
501
+ - [template] Enabled kvm only if available.
502
+ - [template] Do not run qemu with nohup (Use ``-daemonize`` instead).
503
+ - [template] Improved context_out/in log readability.
504
+ - [template] Removed fedora-rawhide templates.
500
505
  - [template] Added new templates:
501
506
 
502
507
  - qemu/archlinux-desktop-i686
@@ -531,37 +536,37 @@ Version 2.1.3
531
536
 
532
537
  Released on June 16th 2014
533
538
 
534
- - [core] Loading dependent gems based on the users ruby version
535
- - [core] Getting back compatibility with ruby 1.8.7
536
- - [core] Don't fail if context is not ready
537
- - [core] Minor bug fixes
538
- - [template] Set a small timeout with netcat
539
- - [template] Added new debian 7 appliance with kameleon.
539
+ - [core] Loading dependent gems based on the users ruby version.
540
+ - [core] Getting back compatibility with ruby 1.8.7.
541
+ - [core] Don't fail if context is not ready.
542
+ - [core] Minor bug fixes.
543
+ - [template] Set a small timeout with netcat.
544
+ - [template] Added new debian 7 appliance with kameleon.
540
545
 
541
546
  Version 2.1.0
542
547
  -------------
543
548
 
544
549
  Released on June 12th 2014
545
550
 
546
- - [core] Fixed psych yaml parsing (#1)
547
- - [core] Changed option ``--no-no-color`` to ``--color``
548
- - [core] Saved the contexts state files in their WORKDIR (#3)
549
- - [core] Set context in/out/local cmd to /bin/bash by default (#5)
550
- - [core] Made global section non mandatory
551
- - [core] Made writing embedded step in recipe possible (#12)
552
- - [core] Improved the readability of logs and the progress bar
553
- - [core] Moved aliases and checkpoints folders to steps
554
- - [core] Removed the ``recipes`` folder and the ``workspace`` (#2)
555
- - [core] Make a safe copy with ``kameleon new`` command
556
- - [core] Added a simple extend recipe feature (#11)
557
- - [core] Introduced the keyword "@base" in the extended recipes (#11)
558
- - [core] Don't log identifier of microstep during build process
559
- - [core] Added ``kameleon import`` command (#11)
560
- - [core] Added ``--clean`` option to ``kameleon build`` command
561
- - [core] Added the lazy context initialization (#10)
562
- - [core] Set the variable ``KAMELEON_WORKDIR`` for all contexts
563
- - [core] Used ``KAMELEON_WORKDIR`` when working with PIPE
564
- - [core] Added persistent cache feature to Kameleon, So far it is caching just packages comming from the network using Polipo
551
+ - [core] Fixed psych yaml parsing (#1).
552
+ - [core] Changed option ``--no-no-color`` to ``--color``.
553
+ - [core] Saved the contexts state files in their WORKDIR (#3).
554
+ - [core] Set context in/out/local cmd to /bin/bash by default (#5).
555
+ - [core] Made global section non mandatory.
556
+ - [core] Made writing embedded step in recipe possible (#12).
557
+ - [core] Improved the readability of logs and the progress bar.
558
+ - [core] Moved aliases and checkpoints folders to steps.
559
+ - [core] Removed the ``recipes`` folder and the ``workspace`` (#2).
560
+ - [core] Make a safe copy with ``kameleon new`` command.
561
+ - [core] Added a simple extend recipe feature (#11).
562
+ - [core] Introduced the keyword "@base" in the extended recipes (#11).
563
+ - [core] Don't log identifier of microstep during build process.
564
+ - [core] Added ``kameleon import`` command (#11).
565
+ - [core] Added ``--clean`` option to ``kameleon build`` command.
566
+ - [core] Added the lazy context initialization (#10).
567
+ - [core] Set the variable ``KAMELEON_WORKDIR`` for all contexts.
568
+ - [core] Used ``KAMELEON_WORKDIR`` when working with PIPE.
569
+ - [core] Added persistent cache feature to Kameleon, So far it is caching just packages comming from the network using Polipo.
565
570
  - [template] Added new templates:
566
571
 
567
572
  - archlinux
@@ -578,42 +583,42 @@ Released on June 12th 2014
578
583
  - ubuntu-14.04
579
584
  - ubuntu-14.04-desktop
580
585
  - vagrant-debian7
581
- - [template] Installed the extlinux bootloader depending on distributions
582
- - [template] New way to bootstrap fedora using Liveos image
583
- - [template] Installed linux kernel and extlinux bootloader from bootstrap section
584
- - [template] Used parted instead of sfdisk
585
- - [template] Added save_as_qed step
586
- - [template] Removed insecure ssh key before any export
587
- - [template] Added shell auto-completion for bash, zsh and fish shell
588
- - [template] Default user group is sudo
589
- - [template] Added a new qemu/kvm template with full-snapshot support
590
- - [template] Ability to add user in multiple groups (with usermod -G)
591
- - [template] Improved I/O performance with qemu/kvm
592
- - [template] Removed force-unsafe-io for dpkg to avoid corrupted filesystem
593
- - [template] Used qemu by default instead of chroot
594
- - [template] Added option to disable debootstrap cache
595
- - [template] Refactor qcow2 backing file checkpoints
596
- - [template] Make QEMU checkpoint more robust and avoid disk corruption
597
- - [template] Major revision of steps to make it easier to use in different templates
598
- - [template] Rename steps for more semantic consistency
599
- - [template] Making the 'save_appliance' step not dependent on the state of the machine
600
- - [template] Enabled cache for arch_bootstrap
601
- - [template] Added openssh in arch-bootstrap and enabled sshd.service/dhcp.service
602
- - [template] Added user 'nobody' to allow sshd to run in the archlinux virtual machine
603
- - [template] Enabled checkpoints (backing-file) only in the "setup" stage
604
- - [template] Fixed .ssh and authorized_keys permissions
605
- - [template] Avoid crash of in_context when we send a shutdown command to the virtual machine
606
- - [template] Exclude special files with rsync (proc/dev...) when copying rootfs to the disk
607
- - [template] Force stop qemu if still running
608
- - [template] Make debian-chroot depreciated
609
- - [template] Refactor archlinux template to use it with qemu/kvm
610
- - [template] Improved the LiveOS fedora bootstrap step to get the system running with qemu/kvm
611
- - [template] Refactor fedora20/debian8 templates to use them with qemu/kvm
612
- - [template] Set timezone to UTC by default
613
- - [template] Used ProxyCommand to improve the debian7-g5k recipe
614
- - [aliases] Updated write_file and append_file aliases to support double quotes
615
- - [aliases] Defined new aliases for unmounting devices
616
- - [docs] More documentation
586
+ - [template] Installed the extlinux bootloader depending on distributions.
587
+ - [template] New way to bootstrap fedora using Liveos image.
588
+ - [template] Installed linux kernel and extlinux bootloader from bootstrap section.
589
+ - [template] Used parted instead of sfdisk.
590
+ - [template] Added save_as_qed step.
591
+ - [template] Removed insecure ssh key before any export.
592
+ - [template] Added shell auto-completion for bash, zsh and fish shell.
593
+ - [template] Default user group is sudo.
594
+ - [template] Added a new qemu/kvm template with full-snapshot support.
595
+ - [template] Ability to add user in multiple groups (with usermod -G).
596
+ - [template] Improved I/O performance with qemu/kvm.
597
+ - [template] Removed force-unsafe-io for dpkg to avoid corrupted filesystem.
598
+ - [template] Used qemu by default instead of chroot.
599
+ - [template] Added option to disable debootstrap cache.
600
+ - [template] Refactor qcow2 backing file checkpoints.
601
+ - [template] Make QEMU checkpoint more robust and avoid disk corruption.
602
+ - [template] Major revision of steps to make it easier to use in different templates.
603
+ - [template] Rename steps for more semantic consistency.
604
+ - [template] Making the 'save_appliance' step not dependent on the state of the machine.
605
+ - [template] Enabled cache for arch_bootstrap.
606
+ - [template] Added openssh in arch-bootstrap and enabled sshd.service/dhcp.service.
607
+ - [template] Added user 'nobody' to allow sshd to run in the archlinux virtual machine.
608
+ - [template] Enabled checkpoints (backing-file) only in the "setup" stage.
609
+ - [template] Fixed .ssh and authorized_keys permissions.
610
+ - [template] Avoid crash of in_context when we send a shutdown command to the virtual machine.
611
+ - [template] Exclude special files with rsync (proc/dev...) when copying rootfs to the disk.
612
+ - [template] Force stop qemu if still running.
613
+ - [template] Make debian-chroot depreciated.
614
+ - [template] Refactor archlinux template to use it with qemu/kvm.
615
+ - [template] Improved the LiveOS fedora bootstrap step to get the system running with qemu/kvm.
616
+ - [template] Refactor fedora20/debian8 templates to use them with qemu/kvm.
617
+ - [template] Set timezone to UTC by default.
618
+ - [template] Used ProxyCommand to improve the debian7-g5k recipe.
619
+ - [aliases] Updated write_file and append_file aliases to support double quotes.
620
+ - [aliases] Defined new aliases for unmounting devices.
621
+ - [docs] More documentation.
617
622
 
618
623
 
619
624
  Version 2.0.0
@@ -621,5 +626,5 @@ Version 2.0.0
621
626
 
622
627
  Released on February 17th 2014
623
628
 
624
- Initial public release of kameleon 2
629
+ - Initial public release of kameleon 2.
625
630
 
data/lib/kameleon/cli.rb CHANGED
@@ -319,21 +319,6 @@ module Kameleon
319
319
  Kameleon.ui.info("Generated GraphViz #{format} file: #{options[:file]}")
320
320
  end
321
321
 
322
- desc "dryrun <RECIPE_PATH>", "Show the steps the build would process"
323
- method_option :global, :type => :hash,
324
- :default => {}, :aliases => "-g",
325
- :desc => "Set custom global variables"
326
- method_option :relative, :type => :boolean,
327
- :default => false,
328
- :desc => "Make pathnames relative to the current working directory"
329
- def dryrun(*recipe_paths)
330
- raise ArgumentError if recipe_paths.empty?
331
- recipe_paths.each do |path|
332
- recipe = Kameleon::Recipe.new(path)
333
- Kameleon::Engine.new(recipe, options.dup.merge({no_create_build_dir: true}).freeze).dryrun
334
- end
335
- end
336
-
337
322
  desc "export <RECIPE_PATH> <EXPORT_PATH>", "Export the given recipe with its steps and data to a given directory"
338
323
  method_option :global, :type => :hash,
339
324
  :default => {}, :aliases => "-g",
@@ -384,9 +369,21 @@ module Kameleon
384
369
  method_option :clean, :type => :boolean,
385
370
  :default => false,
386
371
  :desc => "Run the command `kameleon clean` first"
387
- method_option :from_checkpoint, :type => :string,
372
+ method_option :dryrun, :type => :boolean, :aliases => "-d",
373
+ :default => false,
374
+ :desc => "Dry run, only show what would run"
375
+ method_option :relative, :type => :boolean,
376
+ :default => false,
377
+ :desc => "Make dryrun show pathnames relative to the current working directory"
378
+ method_option :from_checkpoint, :type => :string, :aliases => "-F",
379
+ :default => nil,
380
+ :desc => "Restart the build from a specific checkpointed step, instead of the latest one"
381
+ method_option :begin_checkpoint, :type => :string, :aliases => "-B",
382
+ :default => nil,
383
+ :desc => "Only create checkpoints after the given step"
384
+ method_option :end_checkpoint, :type => :string, :aliases => "-E",
388
385
  :default => nil,
389
- :desc => "Restart a build from a specific checkpoint, instead of the latest one"
386
+ :desc => "Do not create checkpoints after the given step"
390
387
  method_option :enable_checkpointing, :type => :boolean, :aliases => "-c",
391
388
  :default => false,
392
389
  :desc => "Enable creating and using checkpoints"
@@ -396,7 +393,7 @@ module Kameleon
396
393
  :desc => "Create checkpoint of the first microstep only, or all"
397
394
  method_option :list_checkpoints, :type => :boolean, :aliases => "-l",
398
395
  :default => false,
399
- :desc => "List all availables checkpoints"
396
+ :desc => "List availables checkpoints"
400
397
  method_option :enable_cache, :type => :boolean, :aliases => "-C",
401
398
  :default => false,
402
399
  :desc => "Generate a persistent cache for the appliance"
@@ -436,7 +433,9 @@ module Kameleon
436
433
  end
437
434
  raise BuildError, "A recipe file or a persistent cache archive " \
438
435
  "is required to run this command." if recipe_path.nil?
439
- if options[:clean]
436
+ if options[:dryrun]
437
+ Kameleon::Engine.new(Kameleon::Recipe.new(recipe_path), options.dup.merge({no_create_build_dir: true}).freeze).dryrun
438
+ elsif options[:clean]
440
439
  opts = Hash.new.merge options
441
440
  opts[:lazyload] = false
442
441
  opts[:fail_silently] = true
@@ -28,8 +28,6 @@ module Kameleon
28
28
  end
29
29
  end
30
30
  @checkpointing = @options[:enable_checkpointing]
31
- @checkpointing = true unless @options[:from_checkpoint].nil?
32
- @microstep_checkpoint = @options[:microstep_checkpoints]
33
31
  # Check if the recipe have checkpoint entry
34
32
  if @checkpointing && @recipe.checkpoint.nil?
35
33
  fail BuildError, "Checkpoint is unavailable for this recipe"
@@ -165,22 +163,18 @@ module Kameleon
165
163
  end
166
164
  end
167
165
 
168
- def list_all_checkpoints
169
- list = ""
170
- @recipe.checkpoint["list"].each do |cmd|
171
- safe_exec_cmd(cmd, :stdout => list)
172
- end
173
- return list.split(/\r?\n/)
174
- end
175
-
176
166
  def list_checkpoints
177
167
  if @list_checkpoints.nil?
178
- checkpoints = list_all_checkpoints
179
- all_microsteps_ids = @recipe.microsteps.map { |m| m.identifier }
168
+ # get existing checkpoints on the system
169
+ existing_checkpoint_str = ""
170
+ @recipe.checkpoint["list"].each do |cmd|
171
+ safe_exec_cmd(cmd, :stdout => existing_checkpoint_str)
172
+ end
173
+ existing_checkpoint_ids = existing_checkpoint_str.split(/\r?\n/)
180
174
  # get sorted checkpoints by microsteps order
181
175
  @list_checkpoints = []
182
- all_microsteps_ids.each do |id|
183
- @list_checkpoints.push(id) if checkpoints.include?(id)
176
+ @recipe.all_checkpoints.each do |checkpoint|
177
+ @list_checkpoints.push(checkpoint) if existing_checkpoint_ids.include?(checkpoint["id"])
184
178
  end
185
179
  end
186
180
  return @list_checkpoints
@@ -207,10 +201,10 @@ module Kameleon
207
201
  Kameleon.ui.info("#{step_prefix}#{ microstep.slug }")
208
202
  if @checkpointing
209
203
  if microstep.on_checkpoint == "skip"
210
- Kameleon.ui.msg("--> Skipped because checkpointing is enabled")
204
+ Kameleon.ui.msg("--> Skip microstep as requested when checkpointing is activated")
211
205
  next
212
206
  end
213
- if microstep.in_cache and microstep.on_checkpoint != "redo"
207
+ if microstep.has_checkpoint_ahead and microstep.on_checkpoint != "redo"
214
208
  Kameleon.ui.msg("--> Checkpoint ahead, do nothing")
215
209
  else
216
210
  begin
@@ -223,26 +217,41 @@ module Kameleon
223
217
  breakpoint(nil)
224
218
  end
225
219
  if checkpoint_enabled?
226
- if (@microstep_checkpoint == "first" and checkpointed)
227
- Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: macrostep was already checkpointed once")
220
+ if (@options[:microstep_checkpoints].downcase == "first" and checkpointed)
221
+ Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: macrostep already checkpointed once")
228
222
  elsif microstep.on_checkpoint == "redo"
229
- Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: it must be redone everytime")
223
+ Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: always redo microstep")
230
224
  elsif microstep.on_checkpoint == "disabled"
231
- Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: it is disabled")
225
+ Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: disabled in the microstep definition")
226
+ elsif not microstep.in_checkpoint_window
227
+ if @end_checkpoint.nil?
228
+ unless @begin_checkpoint.nil?
229
+ msg = "only after step '#{@begin_checkpoint['step']}'"
230
+ end
231
+ else
232
+ if @begin_checkpoint.nil?
233
+ msg = "not after step '#{@end_checkpoint['step']}'"
234
+ else
235
+ msg = "only between steps '#{@begin_checkpoint['step']}' and '#{@end_checkpoint['step']}'"
236
+ end
237
+ end
238
+ Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: #{msg}")
232
239
  else
233
240
  microstep_checkpoint_time = Time.now.to_i
234
- Kameleon.ui.msg("--> Creating checkpoint: #{ microstep.identifier }")
241
+ Kameleon.ui.msg("--> Creating checkpoint: '#{@recipe.all_checkpoints.select{|c| c['id'] == microstep.identifier}.first['step']}' (#{microstep.identifier})")
235
242
  create_checkpoint(microstep.identifier)
236
243
  checkpointed = true
237
244
  microstep_checkpoint_duration = Time.now.to_i - microstep_checkpoint_time
238
245
  macrostep_checkpoint_duration += microstep_checkpoint_duration
239
246
  Kameleon.ui.verbose("Checkpoint creation for MicroStep #{microstep.name} took: #{microstep_checkpoint_duration} secs")
240
247
  end
248
+ else
249
+ Kameleon.ui.msg("--> Do not create a checkpoint for this microstep: disabled in backend")
241
250
  end
242
251
  end
243
252
  else
244
253
  if microstep.on_checkpoint == "only"
245
- Kameleon.ui.msg("--> Skipped because checkpointing is not enabled")
254
+ Kameleon.ui.msg("--> Skip microstep as requested when checkpointing is not activated")
246
255
  next
247
256
  else
248
257
  begin
@@ -470,28 +479,37 @@ module Kameleon
470
479
  return path
471
480
  end
472
481
  end
473
- Kameleon.ui.shell.say ""
474
- Kameleon.ui.shell.say "#{ @recipe.name } ", :bold
475
- Kameleon.ui.shell.say "(#{ relative_or_absolute_path(@recipe.path) })", :cyan
476
- ["bootstrap", "setup", "export"].each do |section_name|
477
- section = @recipe.sections.fetch(section_name)
478
- Kameleon.ui.shell.say "[" << section.name.capitalize << "]", :red
479
- section.sequence do |macrostep|
480
- Kameleon.ui.shell.say " "
481
- Kameleon.ui.shell.say "#{macrostep.name} ", :bold
482
- if macrostep.path
483
- Kameleon.ui.shell.say "(#{ relative_or_absolute_path(macrostep.path) })", :cyan
484
- else
485
- Kameleon.ui.shell.say "(internal)", :cyan
486
- end
487
- macrostep.sequence do |microstep|
488
- Kameleon.ui.shell.say " --> ", :magenta
489
- Kameleon.ui.shell.say "#{ microstep.order } ", :green
490
- Kameleon.ui.shell.say "#{ microstep.name }", :yellow
482
+ if @options[:list_checkpoints]
483
+ if @recipe.all_checkpoints.empty?
484
+ Kameleon.ui.shell.say "No checkpoints would be created by recipe '#{recipe.name}':"
485
+ else
486
+ Kameleon.ui.shell.say "The following checkpoints would be created by recipe '#{recipe.name}':"
487
+ tp @recipe.all_checkpoints, {"id" => {:width => 20}}, { "step" => {:width => 60}}
488
+ end
489
+ else
490
+ Kameleon.ui.shell.say ""
491
+ Kameleon.ui.shell.say "#{ @recipe.name } ", :bold
492
+ Kameleon.ui.shell.say "(#{ relative_or_absolute_path(@recipe.path) })", :cyan
493
+ ["bootstrap", "setup", "export"].each do |section_name|
494
+ section = @recipe.sections.fetch(section_name)
495
+ Kameleon.ui.shell.say "[" << section.name.capitalize << "]", :red
496
+ section.sequence do |macrostep|
497
+ Kameleon.ui.shell.say " "
498
+ Kameleon.ui.shell.say "#{macrostep.name} ", :bold
499
+ if macrostep.path
500
+ Kameleon.ui.shell.say "(#{ relative_or_absolute_path(macrostep.path) })", :cyan
501
+ else
502
+ Kameleon.ui.shell.say "(internal)", :cyan
503
+ end
504
+ macrostep.sequence do |microstep|
505
+ Kameleon.ui.shell.say " --> ", :magenta
506
+ Kameleon.ui.shell.say "#{ microstep.order } ", :green
507
+ Kameleon.ui.shell.say "#{ microstep.name }", :yellow
508
+ end
491
509
  end
492
510
  end
511
+ Kameleon.ui.shell.say ""
493
512
  end
494
- Kameleon.ui.shell.say ""
495
513
  end
496
514
 
497
515
  def dag(graph, color, recipes_only)
@@ -570,26 +588,57 @@ module Kameleon
570
588
 
571
589
  def build
572
590
  if @checkpointing
573
- @from_checkpoint = @options[:from_checkpoint]
574
- if @from_checkpoint.nil? || @from_checkpoint == "last"
591
+ if @options[:from_checkpoint].nil? || @options[:from_checkpoint] == "last"
575
592
  @from_checkpoint = list_checkpoints.last
576
593
  else
577
- unless list_checkpoints.include?@from_checkpoint
578
- fail BuildError, "Unknown checkpoint hash: #{@from_checkpoint}." \
579
- " Use checkpoints command to find a valid" \
580
- " checkpoint"
594
+ @from_checkpoint = list_checkpoints.select {|c|
595
+ c["id"] == @options[:from_checkpoint] || c["step"] == @options[:from_checkpoint]
596
+ }.last
597
+ if @from_checkpoint.nil?
598
+ fail BuildError, "Unknown checkpoint '#{@options[:from_checkpoint]}'." \
599
+ " You may use the list checkpoints option to find a valid checkpoint."
581
600
  end
582
601
  end
583
- unless @from_checkpoint.nil?
584
- Kameleon.ui.info("Restoring last build from step: #{@from_checkpoint}")
585
- apply_checkpoint @from_checkpoint
602
+ unless @from_checkpoint.nil? # no checkpoint available at all
603
+ Kameleon.ui.info("Restoring last build from step: #{@from_checkpoint["step"]}")
604
+ apply_checkpoint @from_checkpoint["id"]
586
605
  @recipe.microsteps.each do |microstep|
587
- microstep.in_cache = true
588
- if microstep.identifier == @from_checkpoint
606
+ microstep.has_checkpoint_ahead = true
607
+ if microstep.identifier == @from_checkpoint["id"]
589
608
  break
590
609
  end
591
610
  end
592
611
  end
612
+ @begin_checkpoint = nil
613
+ unless @options[:begin_checkpoint].nil?
614
+ @begin_checkpoint = @recipe.all_checkpoints.select {|c|
615
+ c["id"] == @options[:begin_checkpoint] || c["step"] == @options[:begin_checkpoint]
616
+ }.first
617
+ if @begin_checkpoint.nil?
618
+ fail BuildError, "Unknown checkpoint '#{@options[:begin_checkpoint]}'." \
619
+ " You may use the dryrun and list checkpoints options to find a valid checkpoint."
620
+ end
621
+ end
622
+ @end_checkpoint = nil
623
+ unless @options[:end_checkpoint].nil?
624
+ @end_checkpoint = @recipe.all_checkpoints.select {|c|
625
+ c["id"] == @options[:end_checkpoint] || c["step"] == @options[:end_checkpoint]
626
+ }.last
627
+ if @end_checkpoint.nil?
628
+ fail BuildError, "Unknown checkpoint '#{@options[:end_checkpoint]}'." \
629
+ " You may use the dryrun and list checkpoints options to find a valid checkpoint."
630
+ end
631
+ end
632
+ do_checkpoint = @begin_checkpoint.nil?
633
+ @recipe.microsteps.each do |microstep|
634
+ if not do_checkpoint and not @begin_checkpoint.nil? and @begin_checkpoint["id"] == microstep.identifier
635
+ do_checkpoint = true
636
+ end
637
+ microstep.in_checkpoint_window = do_checkpoint
638
+ if do_checkpoint and not @end_checkpoint.nil? and @end_checkpoint["id"] == microstep.identifier
639
+ do_checkpoint = false
640
+ end
641
+ end
593
642
  end
594
643
  dump_build_recipe
595
644
  begin
@@ -633,29 +682,12 @@ module Kameleon
633
682
  end
634
683
 
635
684
  def pretty_checkpoints_list
636
- def find_microstep_slug_by_id(id)
637
- @recipe.microsteps.each do |m|
638
- return m.slug if m.identifier == id
639
- end
640
- end
641
- dict_checkpoints = []
642
- unless @recipe.checkpoint.nil?
643
- list_checkpoints.each do |id|
644
- slug = find_microstep_slug_by_id id
645
- unless slug.nil?
646
- dict_checkpoints.push({
647
- "id" => id,
648
- "step" => slug
649
- })
650
- end
651
- end
652
- end
653
- if dict_checkpoints.empty?
654
- puts "No checkpoint available for the recipe '#{recipe.name}'"
685
+ list_checkpoints
686
+ if list_checkpoints.empty?
687
+ Kameleon.ui.shell.say "No checkpoint found for recipe '#{recipe.name}'"
655
688
  else
656
- puts "The following checkpoints are available for " \
657
- "the recipe '#{recipe.name}':"
658
- tp dict_checkpoints, {"id" => {:width => 20}}, { "step" => {:width => 60}}
689
+ Kameleon.ui.shell.say "The following checkpoints are available for recipe '#{recipe.name}':"
690
+ tp list_checkpoints, {"id" => {:width => 20}}, { "step" => {:width => 60}}
659
691
  end
660
692
  end
661
693
  end
@@ -753,6 +753,25 @@ module Kameleon
753
753
  return @microsteps
754
754
  end
755
755
 
756
+ def all_checkpoints
757
+ if @all_checkpoints.nil?
758
+ @all_checkpoints = []
759
+ microsteps.each do |m|
760
+ step = m.slug
761
+ while @all_checkpoints.map{|c| c["step"]}.include?(step) do
762
+ prefix, suffix = step.split("%")
763
+ step = if suffix.nil?
764
+ "#{prefix}%1"
765
+ else
766
+ "#{prefix}%#{suffix.to_i+1}"
767
+ end
768
+ end
769
+ @all_checkpoints.push({ 'id' => m.identifier, 'step' => step })
770
+ end
771
+ end
772
+ return @all_checkpoints
773
+ end
774
+
756
775
  def calculate_step_identifiers
757
776
  Kameleon.ui.debug("Calculating microstep identifiers")
758
777
  base_salt = ""
data/lib/kameleon/step.rb CHANGED
@@ -103,13 +103,15 @@ module Kameleon
103
103
  attr_accessor :name
104
104
  attr_accessor :identifier
105
105
  attr_accessor :slug
106
- attr_accessor :in_cache
106
+ attr_accessor :has_checkpoint_ahead
107
+ attr_accessor :in_checkpoint_window
107
108
  attr_accessor :on_checkpoint
108
109
  attr_accessor :order
109
110
 
110
111
  def initialize(string_or_hash)
111
112
  @identifier = nil
112
- @in_cache = false
113
+ @has_checkpoint_ahead = false
114
+ @in_checkpoint_window = true
113
115
  @on_checkpoint = "use_cache"
114
116
  @commands = []
115
117
  @name, cmd_list = string_or_hash.first
@@ -1,3 +1,3 @@
1
1
  module Kameleon
2
- VERSION = '2.10.10'
2
+ VERSION = '2.10.11'
3
3
  end
@@ -59,6 +59,8 @@ setup:
59
59
  - MB3:
60
60
  - exec_local: echo MicroStepB3
61
61
  - MC:
62
+ - MC1:
63
+ - exec_local: echo MicroStepC1
62
64
  - MC1:
63
65
  - exec_local: echo MicroStepC1
64
66
  - MC2:
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.10
4
+ version: 2.10.11
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: 2023-06-13 00:00:00.000000000 Z
15
+ date: 2023-10-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: childprocess