r10k 3.12.0 → 3.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/docker.yml +1 -1
- data/.github/workflows/rspec_tests.yml +5 -5
- data/.github/workflows/stale.yml +2 -0
- data/.gitignore +1 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.mkd +33 -0
- data/doc/dynamic-environments/configuration.mkd +59 -10
- data/doc/git/providers.mkd +22 -0
- data/doc/puppetfile.mkd +13 -0
- data/docker/Makefile +1 -1
- data/docker/r10k/Dockerfile +1 -1
- data/docker/r10k/release.Dockerfile +1 -1
- data/lib/r10k/action/base.rb +1 -1
- data/lib/r10k/action/deploy/deploy_helpers.rb +4 -0
- data/lib/r10k/action/deploy/display.rb +1 -1
- data/lib/r10k/action/deploy/environment.rb +5 -7
- data/lib/r10k/action/deploy/module.rb +3 -4
- data/lib/r10k/action/runner.rb +6 -0
- data/lib/r10k/action/visitor.rb +3 -0
- data/lib/r10k/environment/bare.rb +4 -7
- data/lib/r10k/environment/name.rb +14 -9
- data/lib/r10k/environment/plain.rb +16 -0
- data/lib/r10k/environment/tarball.rb +78 -0
- data/lib/r10k/environment/with_modules.rb +1 -1
- data/lib/r10k/environment.rb +2 -0
- data/lib/r10k/errors.rb +5 -0
- data/lib/r10k/forge/module_release.rb +2 -1
- data/lib/r10k/git/cache.rb +4 -13
- data/lib/r10k/git/rugged/bare_repository.rb +1 -1
- data/lib/r10k/git/rugged/base_repository.rb +12 -1
- data/lib/r10k/git/rugged/cache.rb +8 -0
- data/lib/r10k/git/rugged/credentials.rb +1 -1
- data/lib/r10k/git/rugged/working_repository.rb +1 -1
- data/lib/r10k/git/stateful_repository.rb +2 -0
- data/lib/r10k/initializers.rb +20 -0
- data/lib/r10k/logging.rb +78 -1
- data/lib/r10k/module/base.rb +6 -2
- data/lib/r10k/module/forge.rb +10 -10
- data/lib/r10k/module/git.rb +1 -3
- data/lib/r10k/module/local.rb +6 -2
- data/lib/r10k/module/tarball.rb +101 -0
- data/lib/r10k/module.rb +1 -0
- data/lib/r10k/module_loader/puppetfile/dsl.rb +1 -1
- data/lib/r10k/module_loader/puppetfile.rb +17 -2
- data/lib/r10k/settings.rb +35 -0
- data/lib/r10k/source/git.rb +18 -18
- data/lib/r10k/source/yaml.rb +1 -1
- data/lib/r10k/tarball.rb +183 -0
- data/lib/r10k/util/cacheable.rb +31 -0
- data/lib/r10k/util/downloader.rb +134 -0
- data/lib/r10k/util/purgeable.rb +6 -2
- data/lib/r10k/util/setopts.rb +2 -0
- data/lib/r10k/util/subprocess.rb +1 -0
- data/lib/r10k/version.rb +1 -1
- data/locales/r10k.pot +85 -57
- data/r10k.gemspec +2 -2
- data/r10k.yaml.example +28 -0
- data/spec/fixtures/tarball/tarball.tar.gz +0 -0
- data/spec/fixtures/unit/action/r10k_logging.yaml +12 -0
- data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile +1 -0
- data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new +1 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_symlink_file +1 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/{managed_subdir_2 → subdir_allowlisted_2}/ignored_1 +0 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/unmanaged_symlink_dir +1 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/managed_symlink_dir +1 -0
- data/spec/fixtures/unit/util/purgeable/managed_one/unmanaged_symlink_file +1 -0
- data/spec/integration/git/rugged/cache_spec.rb +33 -0
- data/spec/integration/util/purageable_spec.rb +41 -0
- data/spec/shared-contexts/tarball.rb +32 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/action/deploy/module_spec.rb +2 -2
- data/spec/unit/action/puppetfile/install_spec.rb +2 -2
- data/spec/unit/action/runner_spec.rb +52 -1
- data/spec/unit/environment/bare_spec.rb +13 -0
- data/spec/unit/environment/name_spec.rb +18 -0
- data/spec/unit/environment/plain_spec.rb +8 -0
- data/spec/unit/environment/tarball_spec.rb +45 -0
- data/spec/unit/environment/with_modules_spec.rb +1 -1
- data/spec/unit/git/cache_spec.rb +2 -15
- data/spec/unit/git/rugged/cache_spec.rb +19 -0
- data/spec/unit/module/forge_spec.rb +9 -7
- data/spec/unit/module/tarball_spec.rb +70 -0
- data/spec/unit/module_loader/puppetfile_spec.rb +21 -3
- data/spec/unit/module_spec.rb +14 -7
- data/spec/unit/tarball_spec.rb +57 -0
- data/spec/unit/util/cacheable_spec.rb +23 -0
- data/spec/unit/util/downloader_spec.rb +98 -0
- data/spec/unit/util/purgeable_spec.rb +22 -11
- metadata +39 -17
data/locales/r10k.pot
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2022 Puppet, Inc.
|
3
3
|
# This file is distributed under the same license as the r10k package.
|
4
|
-
# FIRST AUTHOR <EMAIL@ADDRESS>,
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
5
5
|
#
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: r10k 3.9.3-
|
9
|
+
"Project-Id-Version: r10k 3.9.3-208-gb88bb368\n"
|
10
10
|
"\n"
|
11
11
|
"Report-Msgid-Bugs-To: docs@puppetlabs.com\n"
|
12
|
-
"POT-Creation-Date:
|
13
|
-
"PO-Revision-Date:
|
12
|
+
"POT-Creation-Date: 2022-02-07 21:13+0000\n"
|
13
|
+
"PO-Revision-Date: 2022-02-07 21:13+0000\n"
|
14
14
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
15
15
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
16
16
|
"Language: \n"
|
@@ -19,55 +19,55 @@ msgstr ""
|
|
19
19
|
"Content-Transfer-Encoding: 8bit\n"
|
20
20
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
21
21
|
|
22
|
-
#: ../lib/r10k/action/deploy/deploy_helpers.rb:
|
22
|
+
#: ../lib/r10k/action/deploy/deploy_helpers.rb:16 ../lib/r10k/settings/loader.rb:63
|
23
23
|
msgid "No configuration file given, no config file found in current directory, and no global config present"
|
24
24
|
msgstr ""
|
25
25
|
|
26
|
-
#: ../lib/r10k/action/deploy/deploy_helpers.rb:
|
26
|
+
#: ../lib/r10k/action/deploy/deploy_helpers.rb:30
|
27
27
|
msgid "Making changes to deployed environments has been administratively disabled."
|
28
28
|
msgstr ""
|
29
29
|
|
30
|
-
#: ../lib/r10k/action/deploy/deploy_helpers.rb:
|
30
|
+
#: ../lib/r10k/action/deploy/deploy_helpers.rb:31
|
31
31
|
msgid "Reason: %{write_lock}"
|
32
32
|
msgstr ""
|
33
33
|
|
34
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
34
|
+
#: ../lib/r10k/action/deploy/environment.rb:116
|
35
35
|
msgid "Environment(s) \\'%{environments}\\' cannot be found in any source and will not be deployed."
|
36
36
|
msgstr ""
|
37
37
|
|
38
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
38
|
+
#: ../lib/r10k/action/deploy/environment.rb:136
|
39
39
|
msgid "Executing postrun command."
|
40
40
|
msgstr ""
|
41
41
|
|
42
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
42
|
+
#: ../lib/r10k/action/deploy/environment.rb:150
|
43
43
|
msgid "Environment %{env_dir} does not match environment name filter, skipping"
|
44
44
|
msgstr ""
|
45
45
|
|
46
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
46
|
+
#: ../lib/r10k/action/deploy/environment.rb:158
|
47
47
|
msgid "Deploying environment %{env_path}"
|
48
48
|
msgstr ""
|
49
49
|
|
50
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
50
|
+
#: ../lib/r10k/action/deploy/environment.rb:161
|
51
51
|
msgid "Environment %{env_dir} is now at %{env_signature}"
|
52
52
|
msgstr ""
|
53
53
|
|
54
|
-
#: ../lib/r10k/action/deploy/environment.rb:
|
54
|
+
#: ../lib/r10k/action/deploy/environment.rb:165
|
55
55
|
msgid "Environment %{env_dir} is new, updating all modules"
|
56
56
|
msgstr ""
|
57
57
|
|
58
|
-
#: ../lib/r10k/action/deploy/module.rb:
|
58
|
+
#: ../lib/r10k/action/deploy/module.rb:81
|
59
59
|
msgid "Running postrun command for environments: %{envs_to_run}."
|
60
60
|
msgstr ""
|
61
61
|
|
62
|
-
#: ../lib/r10k/action/deploy/module.rb:
|
62
|
+
#: ../lib/r10k/action/deploy/module.rb:91
|
63
63
|
msgid "No environments were modified, not executing postrun command."
|
64
64
|
msgstr ""
|
65
65
|
|
66
|
-
#: ../lib/r10k/action/deploy/module.rb:
|
66
|
+
#: ../lib/r10k/action/deploy/module.rb:103
|
67
67
|
msgid "Only updating modules in environment(s) %{opt_env} skipping environment %{env_path}"
|
68
68
|
msgstr ""
|
69
69
|
|
70
|
-
#: ../lib/r10k/action/deploy/module.rb:
|
70
|
+
#: ../lib/r10k/action/deploy/module.rb:105
|
71
71
|
msgid "Updating modules %{modules} in environment %{env_path}"
|
72
72
|
msgstr ""
|
73
73
|
|
@@ -75,15 +75,15 @@ msgstr ""
|
|
75
75
|
msgid "Syntax OK"
|
76
76
|
msgstr ""
|
77
77
|
|
78
|
-
#: ../lib/r10k/action/runner.rb:
|
78
|
+
#: ../lib/r10k/action/runner.rb:63 ../lib/r10k/deployment/config.rb:42
|
79
79
|
msgid "Overriding config file setting '%{key}': '%{old_val}' -> '%{new_val}'"
|
80
80
|
msgstr ""
|
81
81
|
|
82
|
-
#: ../lib/r10k/action/runner.rb:
|
82
|
+
#: ../lib/r10k/action/runner.rb:105
|
83
83
|
msgid "Reading configuration from %{config_path}"
|
84
84
|
msgstr ""
|
85
85
|
|
86
|
-
#: ../lib/r10k/action/runner.rb:
|
86
|
+
#: ../lib/r10k/action/runner.rb:108
|
87
87
|
msgid "No config file explicitly given and no default config file could be found, default settings will be used."
|
88
88
|
msgstr ""
|
89
89
|
|
@@ -107,11 +107,15 @@ msgstr ""
|
|
107
107
|
msgid "Unable to load sources; the supplied configuration does not define the 'sources' key"
|
108
108
|
msgstr ""
|
109
109
|
|
110
|
+
#: ../lib/r10k/environment/bare.rb:6
|
111
|
+
msgid "\"bare\" environment type is deprecated; please use \"plain\" instead (environment: %{name})"
|
112
|
+
msgstr ""
|
113
|
+
|
110
114
|
#: ../lib/r10k/environment/base.rb:89 ../lib/r10k/environment/base.rb:105 ../lib/r10k/environment/base.rb:114 ../lib/r10k/source/base.rb:83
|
111
115
|
msgid "%{class} has not implemented method %{method}"
|
112
116
|
msgstr ""
|
113
117
|
|
114
|
-
#: ../lib/r10k/environment/name.rb:
|
118
|
+
#: ../lib/r10k/environment/name.rb:83
|
115
119
|
msgid "Improper configuration value given for strip_component setting in %{src} source. Value must be a string, a /regex/, false, or omitted. Got \"%{val}\" (%{type})"
|
116
120
|
msgstr ""
|
117
121
|
|
@@ -151,19 +155,19 @@ msgstr ""
|
|
151
155
|
msgid "Proc %{block} for feature %{name} returned %{output}"
|
152
156
|
msgstr ""
|
153
157
|
|
154
|
-
#: ../lib/r10k/forge/module_release.rb:
|
158
|
+
#: ../lib/r10k/forge/module_release.rb:197
|
155
159
|
msgid "Unpacking %{tarball_cache_path} to %{target_dir} (with tmpdir %{tmp_path})"
|
156
160
|
msgstr ""
|
157
161
|
|
158
|
-
#: ../lib/r10k/forge/module_release.rb:
|
162
|
+
#: ../lib/r10k/forge/module_release.rb:199
|
159
163
|
msgid "Valid files unpacked: %{valid_files}"
|
160
164
|
msgstr ""
|
161
165
|
|
162
|
-
#: ../lib/r10k/forge/module_release.rb:
|
166
|
+
#: ../lib/r10k/forge/module_release.rb:201
|
163
167
|
msgid "These files existed in the module's tar file, but are invalid filetypes and were not unpacked: %{invalid_files}"
|
164
168
|
msgstr ""
|
165
169
|
|
166
|
-
#: ../lib/r10k/forge/module_release.rb:
|
170
|
+
#: ../lib/r10k/forge/module_release.rb:204
|
167
171
|
msgid "Symlinks are unsupported and were not unpacked from the module tarball. %{release_slug} contained these ignored symlinks: %{symlinks}"
|
168
172
|
msgstr ""
|
169
173
|
|
@@ -199,11 +203,11 @@ msgstr ""
|
|
199
203
|
msgid "Cannot write %{file}; parent directory does not exist"
|
200
204
|
msgstr ""
|
201
205
|
|
202
|
-
#: ../lib/r10k/git/cache.rb:
|
206
|
+
#: ../lib/r10k/git/cache.rb:57
|
203
207
|
msgid "%{class}#path is deprecated; use #git_dir"
|
204
208
|
msgstr ""
|
205
209
|
|
206
|
-
#: ../lib/r10k/git/cache.rb:
|
210
|
+
#: ../lib/r10k/git/cache.rb:86
|
207
211
|
msgid "Creating new git cache for %{remote}"
|
208
212
|
msgstr ""
|
209
213
|
|
@@ -219,6 +223,14 @@ msgstr ""
|
|
219
223
|
msgid "Rugged versions prior to 0.24.0 do not support pruning stale branches during fetch, please upgrade your \\'rugged\\' gem. (Current version is: %{version})"
|
220
224
|
msgstr ""
|
221
225
|
|
226
|
+
#: ../lib/r10k/git/rugged/base_repository.rb:24
|
227
|
+
msgid "Unable to resolve %{pattern}: %{e} "
|
228
|
+
msgstr ""
|
229
|
+
|
230
|
+
#: ../lib/r10k/git/rugged/base_repository.rb:69
|
231
|
+
msgid "Remote URL is different from cache, updating %{orig} to %{update}"
|
232
|
+
msgstr ""
|
233
|
+
|
222
234
|
#: ../lib/r10k/git/rugged/credentials.rb:28
|
223
235
|
msgid "Authentication failed for Git remote %{url}."
|
224
236
|
msgstr ""
|
@@ -363,7 +375,7 @@ msgstr ""
|
|
363
375
|
msgid "%{repo_path} is already at Git ref %{ref}"
|
364
376
|
msgstr ""
|
365
377
|
|
366
|
-
#: ../lib/r10k/initializers.rb:
|
378
|
+
#: ../lib/r10k/initializers.rb:31
|
367
379
|
msgid "the purgedirs key in r10k.yaml is deprecated. it is currently ignored."
|
368
380
|
msgstr ""
|
369
381
|
|
@@ -375,7 +387,7 @@ msgstr ""
|
|
375
387
|
msgid "No class registered for %{key}"
|
376
388
|
msgstr ""
|
377
389
|
|
378
|
-
#: ../lib/r10k/logging.rb:
|
390
|
+
#: ../lib/r10k/logging.rb:73 ../lib/r10k/logging.rb:100 ../lib/r10k/logging.rb:109
|
379
391
|
msgid "Invalid log level '%{val}'. Valid levels are %{log_levels}"
|
380
392
|
msgstr ""
|
381
393
|
|
@@ -383,27 +395,31 @@ msgstr ""
|
|
383
395
|
msgid "Module %{name} with args %{args} doesn't have an implementation. (Are you using the right arguments?)"
|
384
396
|
msgstr ""
|
385
397
|
|
386
|
-
#: ../lib/r10k/module/base.rb:
|
398
|
+
#: ../lib/r10k/module/base.rb:66
|
399
|
+
msgid "Overriding :exclude_spec setting with per module setting for #{@title}"
|
400
|
+
msgstr ""
|
401
|
+
|
402
|
+
#: ../lib/r10k/module/base.rb:87
|
387
403
|
msgid "Spec dir for #{@title} will not be deleted because it is not in the moduledir"
|
388
404
|
msgstr ""
|
389
405
|
|
390
|
-
#: ../lib/r10k/module/base.rb:
|
406
|
+
#: ../lib/r10k/module/base.rb:99
|
391
407
|
msgid "Deleting spec data at #{spec_path}"
|
392
408
|
msgstr ""
|
393
409
|
|
394
|
-
#: ../lib/r10k/module/base.rb:
|
410
|
+
#: ../lib/r10k/module/base.rb:107
|
395
411
|
msgid "No spec dir detected at #{spec_path}, skipping deletion"
|
396
412
|
msgstr ""
|
397
413
|
|
398
|
-
#: ../lib/r10k/module/base.rb:
|
414
|
+
#: ../lib/r10k/module/base.rb:120
|
399
415
|
msgid "Deploying module to %{path}"
|
400
416
|
msgstr ""
|
401
417
|
|
402
|
-
#: ../lib/r10k/module/base.rb:
|
418
|
+
#: ../lib/r10k/module/base.rb:123
|
403
419
|
msgid "Only updating modules %{modules}, skipping module %{name}"
|
404
420
|
msgstr ""
|
405
421
|
|
406
|
-
#: ../lib/r10k/module/base.rb:
|
422
|
+
#: ../lib/r10k/module/base.rb:179
|
407
423
|
msgid "Module name (%{title}) must match either 'modulename' or 'owner/modulename'"
|
408
424
|
msgstr ""
|
409
425
|
|
@@ -411,6 +427,10 @@ msgstr ""
|
|
411
427
|
msgid "Not updating module %{name}, assuming content unchanged"
|
412
428
|
msgstr ""
|
413
429
|
|
430
|
+
#: ../lib/r10k/module/forge.rb:50
|
431
|
+
msgid "Module version %{ver} is not a valid Forge module version"
|
432
|
+
msgstr ""
|
433
|
+
|
414
434
|
#: ../lib/r10k/module/forge.rb:98
|
415
435
|
msgid "The module %{title} does not appear to have any published releases, cannot determine latest version."
|
416
436
|
msgstr ""
|
@@ -423,11 +443,11 @@ msgstr ""
|
|
423
443
|
msgid "Forge module names must match 'owner/modulename', instead got #{title}"
|
424
444
|
msgstr ""
|
425
445
|
|
426
|
-
#: ../lib/r10k/module/git.rb:
|
446
|
+
#: ../lib/r10k/module/git.rb:79
|
427
447
|
msgid "Cannot track control repo branch for content '%{name}' when not part of a git-backed environment, will use default if available."
|
428
448
|
msgstr ""
|
429
449
|
|
430
|
-
#: ../lib/r10k/module/local.rb:
|
450
|
+
#: ../lib/r10k/module/local.rb:37
|
431
451
|
msgid "Module %{title} is a local module, always indicating synced."
|
432
452
|
msgstr ""
|
433
453
|
|
@@ -435,39 +455,43 @@ msgstr ""
|
|
435
455
|
msgid "Could not read metadata.json"
|
436
456
|
msgstr ""
|
437
457
|
|
438
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
458
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:64
|
439
459
|
msgid "Using Puppetfile '%{puppetfile}'"
|
440
460
|
msgstr ""
|
441
461
|
|
442
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
462
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:65
|
443
463
|
msgid "Using moduledir '%{moduledir}'"
|
444
464
|
msgstr ""
|
445
465
|
|
446
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
466
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:86
|
447
467
|
msgid "Failed to evaluate %{path}"
|
448
468
|
msgstr ""
|
449
469
|
|
450
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
470
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:103
|
451
471
|
msgid "Unable to preload Puppetfile because of %{msg}"
|
452
472
|
msgstr ""
|
453
473
|
|
454
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
474
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:121
|
455
475
|
msgid "Using Forge from Puppetfile: %{forge}"
|
456
476
|
msgstr ""
|
457
477
|
|
458
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
478
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:124
|
459
479
|
msgid "Ignoring Forge declaration in Puppetfile, using value from settings: %{forge}."
|
460
480
|
msgstr ""
|
461
481
|
|
462
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
482
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:173
|
483
|
+
msgid "\"basedir\" is deprecated. Please use \"environment_name\" instead. \"basedir\" will be removed in a future version."
|
484
|
+
msgstr ""
|
485
|
+
|
486
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:192 ../lib/r10k/puppetfile.rb:104
|
463
487
|
msgid "Puppetfile %{path} missing or unreadable"
|
464
488
|
msgstr ""
|
465
489
|
|
466
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
490
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:230
|
467
491
|
msgid "Puppetfiles cannot contain duplicate module names."
|
468
492
|
msgstr ""
|
469
493
|
|
470
|
-
#: ../lib/r10k/module_loader/puppetfile.rb:
|
494
|
+
#: ../lib/r10k/module_loader/puppetfile.rb:232
|
471
495
|
msgid "Remove the duplicates of the following modules: %{dupes}"
|
472
496
|
msgstr ""
|
473
497
|
|
@@ -598,6 +622,10 @@ msgstr ""
|
|
598
622
|
msgid "Both username and password must be specified"
|
599
623
|
msgstr ""
|
600
624
|
|
625
|
+
#: ../lib/r10k/tarball.rb:167
|
626
|
+
msgid "Cache not present at %{path}"
|
627
|
+
msgstr ""
|
628
|
+
|
601
629
|
#: ../lib/r10k/util/basedir.rb:34
|
602
630
|
msgid "Expected Array<#desired_contents>, got R10K::Deployment"
|
603
631
|
msgstr ""
|
@@ -618,45 +646,45 @@ msgstr ""
|
|
618
646
|
msgid "pe_license feature is not available, PE only Puppet modules will not be downloadable."
|
619
647
|
msgstr ""
|
620
648
|
|
621
|
-
#: ../lib/r10k/util/purgeable.rb:
|
649
|
+
#: ../lib/r10k/util/purgeable.rb:91
|
622
650
|
msgid "Not purging %{path} due to internal exclusion match: %{exclusion_match}"
|
623
651
|
msgstr ""
|
624
652
|
|
625
|
-
#: ../lib/r10k/util/purgeable.rb:
|
653
|
+
#: ../lib/r10k/util/purgeable.rb:93
|
626
654
|
msgid "Not purging %{path} due to whitelist match: %{allowlist_match}"
|
627
655
|
msgstr ""
|
628
656
|
|
629
|
-
#: ../lib/r10k/util/purgeable.rb:
|
657
|
+
#: ../lib/r10k/util/purgeable.rb:137
|
630
658
|
msgid "No unmanaged contents in %{managed_dirs}, nothing to purge"
|
631
659
|
msgstr ""
|
632
660
|
|
633
|
-
#: ../lib/r10k/util/purgeable.rb:
|
661
|
+
#: ../lib/r10k/util/purgeable.rb:142
|
634
662
|
msgid "Removing unmanaged path %{path}"
|
635
663
|
msgstr ""
|
636
664
|
|
637
|
-
#: ../lib/r10k/util/purgeable.rb:
|
665
|
+
#: ../lib/r10k/util/purgeable.rb:147
|
638
666
|
msgid "Unable to remove unmanaged path: %{path}"
|
639
667
|
msgstr ""
|
640
668
|
|
641
|
-
#: ../lib/r10k/util/setopts.rb:
|
669
|
+
#: ../lib/r10k/util/setopts.rb:60
|
642
670
|
msgid "%{class_name} parameters '%{a}' and '%{b}' conflict. Specify one or the other, but not both"
|
643
671
|
msgstr ""
|
644
672
|
|
645
|
-
#: ../lib/r10k/util/setopts.rb:
|
673
|
+
#: ../lib/r10k/util/setopts.rb:67
|
646
674
|
msgid "%{class_name} cannot handle option '%{key}'"
|
647
675
|
msgstr ""
|
648
676
|
|
649
|
-
#: ../lib/r10k/util/subprocess.rb:
|
677
|
+
#: ../lib/r10k/util/subprocess.rb:70
|
650
678
|
msgid "Starting process: %{args}"
|
651
679
|
msgstr ""
|
652
680
|
|
653
|
-
#: ../lib/r10k/util/subprocess.rb:
|
681
|
+
#: ../lib/r10k/util/subprocess.rb:75
|
654
682
|
msgid ""
|
655
683
|
"Finished process:\n"
|
656
684
|
"%{result}"
|
657
685
|
msgstr ""
|
658
686
|
|
659
|
-
#: ../lib/r10k/util/subprocess.rb:
|
687
|
+
#: ../lib/r10k/util/subprocess.rb:78
|
660
688
|
msgid "Command exited with non-zero exit code"
|
661
689
|
msgstr ""
|
662
690
|
|
data/r10k.gemspec
CHANGED
@@ -32,18 +32,18 @@ Gem::Specification.new do |s|
|
|
32
32
|
|
33
33
|
s.add_dependency 'gettext-setup', '~>0.24'
|
34
34
|
# These two pins narrow what is allowed by gettext-setup,
|
35
|
-
# to
|
35
|
+
# to preserve compatability with Ruby 2.4
|
36
36
|
s.add_dependency 'fast_gettext', '~> 1.1.0'
|
37
37
|
s.add_dependency 'gettext', ['>= 3.0.2', '< 3.3.0']
|
38
38
|
|
39
39
|
s.add_dependency 'jwt', '~> 2.2.3'
|
40
|
+
s.add_dependency 'minitar', '~> 0.9'
|
40
41
|
|
41
42
|
s.add_development_dependency 'rspec', '~> 3.1'
|
42
43
|
|
43
44
|
s.add_development_dependency 'rake'
|
44
45
|
|
45
46
|
s.add_development_dependency 'yard', '~> 0.9.11'
|
46
|
-
s.add_development_dependency 'minitar', '~> 0.9.0'
|
47
47
|
|
48
48
|
s.files = %x[git ls-files].split($/)
|
49
49
|
s.require_path = 'lib'
|
data/r10k.yaml.example
CHANGED
@@ -110,3 +110,31 @@ forge:
|
|
110
110
|
# The 'baseurl' setting indicates where Forge modules should be installed
|
111
111
|
# from. This defaults to 'https://forgeapi.puppetlabs.com'
|
112
112
|
#baseurl: 'https://forgemirror.example.com'
|
113
|
+
|
114
|
+
# Configuration options on how R10k should log its actions
|
115
|
+
logging:
|
116
|
+
# The 'level' setting sets the default log level to run R10k actions at.
|
117
|
+
# This value will be overridden by any value set through the command line.
|
118
|
+
#level: warn
|
119
|
+
|
120
|
+
# Specify additional log outputs here, any log4r outputter can be used.
|
121
|
+
# If no log level is specified then the output will use the global level.
|
122
|
+
#outputs:
|
123
|
+
# - type: file
|
124
|
+
# level: debug
|
125
|
+
# parameters:
|
126
|
+
# filename: /var/log/r10k.log
|
127
|
+
# trunc: true
|
128
|
+
# - type: syslog
|
129
|
+
# - type: email
|
130
|
+
# only_at: [fatal]
|
131
|
+
# parameters:
|
132
|
+
# from: r10k@example.com
|
133
|
+
# to: sysadmins@example.com
|
134
|
+
# server: smtp.example.com
|
135
|
+
# subject: Fatal R10k error occurred
|
136
|
+
|
137
|
+
# The 'disable_default_stderr' setting specifies if the default output on
|
138
|
+
# stderr should be active or not, in case R10k is to be run entirely
|
139
|
+
# through scripts or cronjobs where console output is unwelcome.
|
140
|
+
#disable_default_stderr: false
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
../expected_1
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
../../managed_two
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/fixtures/unit/util/purgeable/managed_one/expected_1
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'r10k/git/rugged/cache'
|
3
|
+
|
4
|
+
describe R10K::Git::Rugged::Cache, :if => R10K::Features.available?(:rugged) do
|
5
|
+
include_context 'Git integration'
|
6
|
+
|
7
|
+
let(:dirname) { 'working-repo' }
|
8
|
+
let(:remote_name) { 'origin' }
|
9
|
+
|
10
|
+
subject { described_class.new(remote) }
|
11
|
+
|
12
|
+
context "syncing with the remote" do
|
13
|
+
before(:each) do
|
14
|
+
subject.reset!
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "with the correct configuration" do
|
18
|
+
it "is able to sync with the remote" do
|
19
|
+
subject.sync
|
20
|
+
expect(subject.synced?).to eq(true)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "with a out of date cached remote" do
|
25
|
+
it "updates the cached remote configuration" do
|
26
|
+
subject.repo.update_remote('foo', remote_name)
|
27
|
+
expect(subject.repo.remotes[remote_name]).to eq('foo')
|
28
|
+
subject.sync
|
29
|
+
expect(subject.repo.remotes[remote_name]).to eq(remote)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'r10k/util/purgeable'
|
3
|
+
require 'r10k/util/cleaner'
|
4
|
+
|
5
|
+
require 'tmpdir'
|
6
|
+
|
7
|
+
RSpec.describe R10K::Util::Purgeable do
|
8
|
+
it 'purges only unmanaged files' do
|
9
|
+
Dir.mktmpdir do |envdir|
|
10
|
+
managed_directory = "#{envdir}/managed_one"
|
11
|
+
desired_contents = [
|
12
|
+
"#{managed_directory}/expected_1",
|
13
|
+
"#{managed_directory}/managed_subdir_1",
|
14
|
+
"#{managed_directory}/managed_symlink_dir",
|
15
|
+
"#{managed_directory}/managed_subdir_1/subdir_expected_1",
|
16
|
+
"#{managed_directory}/managed_subdir_1/managed_symlink_file",
|
17
|
+
]
|
18
|
+
|
19
|
+
FileUtils.cp_r('spec/fixtures/unit/util/purgeable/managed_one/',
|
20
|
+
managed_directory)
|
21
|
+
|
22
|
+
cleaner = R10K::Util::Cleaner.new([managed_directory], desired_contents)
|
23
|
+
|
24
|
+
cleaner.purge!({ recurse: true, whitelist: ["**/subdir_allowlisted_2"] })
|
25
|
+
|
26
|
+
# Files present after purge
|
27
|
+
expect(File.exist?("#{managed_directory}/expected_1")).to be true
|
28
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1")).to be true
|
29
|
+
expect(File.exist?("#{managed_directory}/managed_symlink_dir")).to be true
|
30
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1/subdir_expected_1")).to be true
|
31
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1/managed_symlink_file")).to be true
|
32
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1/subdir_allowlisted_2")).to be true
|
33
|
+
|
34
|
+
# Purged files
|
35
|
+
expect(File.exist?("#{managed_directory}/unmanaged_1")).to be false
|
36
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1/unmanaged_symlink_dir")).to be false
|
37
|
+
expect(File.exist?("#{managed_directory}/unmanaged_symlink_file")).to be false
|
38
|
+
expect(File.exist?("#{managed_directory}/managed_subdir_1/subdir_unmanaged_1")).to be false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'tmpdir'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
shared_context "Tarball" do
|
5
|
+
# Suggested subject:
|
6
|
+
#
|
7
|
+
# subject { described_class.new('fixture-tarball', fixture_tarball, checksum: fixture_checksum) }
|
8
|
+
#
|
9
|
+
let(:fixture_tarball) do
|
10
|
+
File.expand_path('spec/fixtures/tarball/tarball.tar.gz', PROJECT_ROOT)
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:fixture_checksum) { '292e692ad18faabd4f9b21037d51f0185e04b69f82c522a54af91fb5b88c2d3b' }
|
14
|
+
|
15
|
+
# Use tmpdir for cached tarballs
|
16
|
+
let(:tmpdir) { Dir.mktmpdir }
|
17
|
+
|
18
|
+
# `moduledir` and `cache_root` are available for examples to use in creating
|
19
|
+
# their subjects
|
20
|
+
let(:moduledir) { File.join(tmpdir, 'modules').tap { |path| Dir.mkdir(path) } }
|
21
|
+
let(:cache_root) { File.join(tmpdir, 'cache').tap { |path| Dir.mkdir(path) } }
|
22
|
+
|
23
|
+
around(:each) do |example|
|
24
|
+
if subject.is_a?(R10K::Tarball)
|
25
|
+
subject.settings[:cache_root] = cache_root
|
26
|
+
elsif subject.respond_to?(:tarball) && subject.tarball.is_a?(R10K::Tarball)
|
27
|
+
subject.tarball.settings[:cache_root] = cache_root
|
28
|
+
end
|
29
|
+
example.run
|
30
|
+
FileUtils.remove_entry_secure(tmpdir)
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -19,6 +19,7 @@ require 'r10k'
|
|
19
19
|
Dir.glob(File.expand_path('spec/shared-examples/**/*.rb', PROJECT_ROOT)).each { |file| require file }
|
20
20
|
|
21
21
|
require 'shared-contexts/git-fixtures'
|
22
|
+
require 'shared-contexts/tarball'
|
22
23
|
require 'matchers/exit_with'
|
23
24
|
require 'matchers/match_realpath'
|
24
25
|
require 'r10k-mocks'
|
@@ -241,7 +241,7 @@ describe R10K::Action::Deploy::Module do
|
|
241
241
|
|
242
242
|
allow(R10K::Git::StatefulRepository).to receive(:new).and_return(repo)
|
243
243
|
allow(R10K::Git).to receive_message_chain(:cache, :generate).and_return(cache)
|
244
|
-
allow_any_instance_of(R10K::Source::Git).to receive(:
|
244
|
+
allow_any_instance_of(R10K::Source::Git).to receive(:environment_names).and_return([R10K::Environment::Name.new('first', {})])
|
245
245
|
|
246
246
|
expect(subject).to receive(:visit_environment).and_wrap_original do |original, environment, &block|
|
247
247
|
# For this test we want to have realistic Modules and access to
|
@@ -300,7 +300,7 @@ describe R10K::Action::Deploy::Module do
|
|
300
300
|
|
301
301
|
allow(R10K::Git::StatefulRepository).to receive(:new).and_return(repo)
|
302
302
|
allow(R10K::Git).to receive_message_chain(:cache, :generate).and_return(cache)
|
303
|
-
allow_any_instance_of(R10K::Source::Git).to receive(:
|
303
|
+
allow_any_instance_of(R10K::Source::Git).to receive(:environment_names).and_return([R10K::Environment::Name.new('first', {}),
|
304
304
|
R10K::Environment::Name.new('second', {})])
|
305
305
|
|
306
306
|
expect(subject).to receive(:visit_environment).and_wrap_original do |original, environment, &block|
|
@@ -4,9 +4,9 @@ require 'r10k/action/puppetfile/install'
|
|
4
4
|
describe R10K::Action::Puppetfile::Install do
|
5
5
|
let(:default_opts) { { root: "/some/nonexistent/path" } }
|
6
6
|
let(:loader) {
|
7
|
-
R10K::ModuleLoader::Puppetfile.new(
|
7
|
+
R10K::ModuleLoader::Puppetfile.new(
|
8
8
|
basedir: '/some/nonexistent/path',
|
9
|
-
overrides: {force: false}
|
9
|
+
overrides: {force: false})
|
10
10
|
}
|
11
11
|
|
12
12
|
def installer(opts = {}, argv = [], settings = {})
|