r10k 3.6.0 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docker.yml +4 -1
  3. data/.github/workflows/release.yml +3 -2
  4. data/.github/workflows/rspec_tests.yml +81 -0
  5. data/.github/workflows/stale.yml +19 -0
  6. data/.travis.yml +8 -1
  7. data/CHANGELOG.mkd +33 -0
  8. data/CODEOWNERS +2 -2
  9. data/README.mkd +2 -2
  10. data/doc/common-patterns.mkd +1 -0
  11. data/doc/dynamic-environments/configuration.mkd +123 -42
  12. data/doc/dynamic-environments/usage.mkd +12 -11
  13. data/doc/puppetfile.mkd +23 -3
  14. data/docker/Gemfile +1 -1
  15. data/docker/Makefile +4 -3
  16. data/docker/docker-compose.yml +18 -0
  17. data/docker/r10k/Dockerfile +1 -1
  18. data/docker/r10k/docker-entrypoint.sh +0 -1
  19. data/docker/r10k/release.Dockerfile +1 -1
  20. data/docker/spec/dockerfile_spec.rb +26 -32
  21. data/integration/tests/git_source/git_source_repeated_remote.rb +2 -2
  22. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +2 -1
  23. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +2 -1
  24. data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +1 -1
  25. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +2 -1
  26. data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +1 -1
  27. data/integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb +1 -1
  28. data/integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb +1 -1
  29. data/lib/r10k/action/base.rb +10 -0
  30. data/lib/r10k/action/deploy/display.rb +49 -10
  31. data/lib/r10k/action/deploy/environment.rb +102 -51
  32. data/lib/r10k/action/deploy/module.rb +55 -30
  33. data/lib/r10k/action/puppetfile/check.rb +3 -1
  34. data/lib/r10k/action/puppetfile/install.rb +20 -23
  35. data/lib/r10k/action/puppetfile/purge.rb +8 -2
  36. data/lib/r10k/action/runner.rb +34 -0
  37. data/lib/r10k/cli/deploy.rb +14 -7
  38. data/lib/r10k/cli/puppetfile.rb +5 -5
  39. data/lib/r10k/content_synchronizer.rb +83 -0
  40. data/lib/r10k/deployment.rb +1 -1
  41. data/lib/r10k/environment/base.rb +30 -3
  42. data/lib/r10k/environment/git.rb +17 -5
  43. data/lib/r10k/environment/name.rb +22 -4
  44. data/lib/r10k/environment/svn.rb +11 -4
  45. data/lib/r10k/environment/with_modules.rb +46 -30
  46. data/lib/r10k/git.rb +1 -0
  47. data/lib/r10k/git/cache.rb +11 -1
  48. data/lib/r10k/git/rugged/credentials.rb +39 -2
  49. data/lib/r10k/initializers.rb +2 -0
  50. data/lib/r10k/module.rb +1 -1
  51. data/lib/r10k/module/base.rb +17 -1
  52. data/lib/r10k/module/forge.rb +29 -11
  53. data/lib/r10k/module/git.rb +50 -27
  54. data/lib/r10k/module/local.rb +2 -1
  55. data/lib/r10k/module/svn.rb +24 -18
  56. data/lib/r10k/puppetfile.rb +66 -83
  57. data/lib/r10k/settings.rb +29 -2
  58. data/lib/r10k/source/base.rb +9 -0
  59. data/lib/r10k/source/git.rb +18 -7
  60. data/lib/r10k/source/hash.rb +5 -5
  61. data/lib/r10k/source/svn.rb +5 -3
  62. data/lib/r10k/util/cleaner.rb +21 -0
  63. data/lib/r10k/util/setopts.rb +33 -12
  64. data/lib/r10k/version.rb +1 -1
  65. data/locales/r10k.pot +98 -82
  66. data/r10k.gemspec +1 -1
  67. data/spec/fixtures/unit/action/r10k_creds.yaml +9 -0
  68. data/spec/r10k-mocks/mock_source.rb +1 -1
  69. data/spec/shared-examples/puppetfile-action.rb +7 -7
  70. data/spec/shared-examples/subprocess-runner.rb +11 -5
  71. data/spec/unit/action/deploy/display_spec.rb +35 -5
  72. data/spec/unit/action/deploy/environment_spec.rb +207 -37
  73. data/spec/unit/action/deploy/module_spec.rb +173 -26
  74. data/spec/unit/action/puppetfile/check_spec.rb +2 -2
  75. data/spec/unit/action/puppetfile/install_spec.rb +31 -10
  76. data/spec/unit/action/puppetfile/purge_spec.rb +25 -5
  77. data/spec/unit/action/runner_spec.rb +48 -1
  78. data/spec/unit/environment/git_spec.rb +19 -2
  79. data/spec/unit/environment/name_spec.rb +28 -0
  80. data/spec/unit/environment/svn_spec.rb +12 -0
  81. data/spec/unit/environment/with_modules_spec.rb +74 -0
  82. data/spec/unit/git/cache_spec.rb +10 -0
  83. data/spec/unit/git/rugged/credentials_spec.rb +79 -2
  84. data/spec/unit/git_spec.rb +3 -3
  85. data/spec/unit/module/forge_spec.rb +21 -13
  86. data/spec/unit/module/git_spec.rb +64 -1
  87. data/spec/unit/module_spec.rb +60 -10
  88. data/spec/unit/puppetfile_spec.rb +63 -60
  89. data/spec/unit/settings_spec.rb +12 -0
  90. data/spec/unit/source/git_spec.rb +15 -3
  91. data/spec/unit/util/purgeable_spec.rb +2 -8
  92. data/spec/unit/util/setopts_spec.rb +25 -1
  93. metadata +11 -11
  94. data/azure-pipelines.yml +0 -87
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2021-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -28,22 +28,16 @@ dependencies:
28
28
  name: cri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.15.10
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: 3.0.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ">="
38
+ - - '='
42
39
  - !ruby/object:Gem::Version
43
40
  version: 2.15.10
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: 3.0.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: log4r
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -204,6 +198,8 @@ files:
204
198
  - ".github/pull_request_template.md"
205
199
  - ".github/workflows/docker.yml"
206
200
  - ".github/workflows/release.yml"
201
+ - ".github/workflows/rspec_tests.yml"
202
+ - ".github/workflows/stale.yml"
207
203
  - ".gitignore"
208
204
  - ".travis.yml"
209
205
  - CHANGELOG.mkd
@@ -213,7 +209,6 @@ files:
213
209
  - LICENSE
214
210
  - README.mkd
215
211
  - Rakefile
216
- - azure-pipelines.yml
217
212
  - bin/r10k
218
213
  - doc/common-patterns.mkd
219
214
  - doc/dynamic-environments.mkd
@@ -235,6 +230,7 @@ files:
235
230
  - docker/Gemfile
236
231
  - docker/Makefile
237
232
  - docker/README.md
233
+ - docker/docker-compose.yml
238
234
  - docker/r10k/Dockerfile
239
235
  - docker/r10k/adduser.sh
240
236
  - docker/r10k/docker-entrypoint.d/10-analytics.sh
@@ -351,6 +347,7 @@ files:
351
347
  - lib/r10k/cli/help.rb
352
348
  - lib/r10k/cli/puppetfile.rb
353
349
  - lib/r10k/cli/version.rb
350
+ - lib/r10k/content_synchronizer.rb
354
351
  - lib/r10k/deployment.rb
355
352
  - lib/r10k/deployment/config.rb
356
353
  - lib/r10k/environment.rb
@@ -420,6 +417,7 @@ files:
420
417
  - lib/r10k/svn/working_dir.rb
421
418
  - lib/r10k/util/attempt.rb
422
419
  - lib/r10k/util/basedir.rb
420
+ - lib/r10k/util/cleaner.rb
423
421
  - lib/r10k/util/commands.rb
424
422
  - lib/r10k/util/exec_env.rb
425
423
  - lib/r10k/util/license.rb
@@ -447,6 +445,7 @@ files:
447
445
  - spec/fixtures/module/forge/eight_hundred/metadata.json
448
446
  - spec/fixtures/unit/action/r10k.yaml
449
447
  - spec/fixtures/unit/action/r10k_cachedir.yaml
448
+ - spec/fixtures/unit/action/r10k_creds.yaml
450
449
  - spec/fixtures/unit/action/r10k_generate_types.yaml
451
450
  - spec/fixtures/unit/action/r10k_puppet_path.yaml
452
451
  - spec/fixtures/unit/puppetfile/argument-error/Puppetfile
@@ -505,6 +504,7 @@ files:
505
504
  - spec/unit/environment/git_spec.rb
506
505
  - spec/unit/environment/name_spec.rb
507
506
  - spec/unit/environment/svn_spec.rb
507
+ - spec/unit/environment/with_modules_spec.rb
508
508
  - spec/unit/errors/formatting_spec.rb
509
509
  - spec/unit/feature_spec.rb
510
510
  - spec/unit/forge/module_release_spec.rb
data/azure-pipelines.yml DELETED
@@ -1,87 +0,0 @@
1
- # Don't run Azure when a branch is updated, only when a PR is updated.
2
- # Prevents double builds when a PR is made from the main repo and not a fork.
3
- trigger: none
4
- pr:
5
- autoCancel: true
6
- branches:
7
- include:
8
- - '*'
9
-
10
- pool:
11
- # self-hosted agent on Windows 10 1903 environment
12
- # includes newer Docker engine with LCOW enabled, new build of LCOW image
13
- # includes Ruby 2.5, Go 1.10, Node.js 10.10
14
- name: Default
15
-
16
- variables:
17
- NAMESPACE: puppet
18
- CONTAINER_NAME: r10k
19
- CONTAINER_BUILD_PATH: .
20
- LINT_IGNORES:
21
- DOCKER_BUILDKIT: 1
22
- BUILD_OPTIONS: --build-arg alpine_version=3.9
23
-
24
- workspace:
25
- clean: resources
26
-
27
- steps:
28
- - checkout: self # self represents the repo where the initial Pipelines YAML file was found
29
- clean: true # whether to fetch clean each time
30
-
31
- - powershell: |
32
- $gemfile = Join-Path -Path (Get-Location) -ChildPath 'docker/Gemfile'
33
- $gempath = Join-Path -Path (Get-Location) -ChildPath 'docker/.bundle/gems'
34
- bundle config --local gemfile $gemfile
35
- bundle config --local path $gempath
36
- bundle install --with test
37
- displayName: Fetch Dependencies
38
- timeoutInMinutes: 1
39
- name: fetch_deps
40
-
41
- - powershell: |
42
- . "$(bundle show pupperware)/ci/build.ps1"
43
- Write-HostDiagnostics
44
- displayName: Diagnostic Host Information
45
- timeoutInMinutes: 2
46
- name: hostinfo
47
-
48
- - powershell: |
49
- . "$(bundle show pupperware)/ci/build.ps1"
50
- Lint-Dockerfile -Name $ENV:CONTAINER_NAME -Ignore ($ENV:LINT_IGNORES -split ' ')
51
- displayName: Lint $(CONTAINER_NAME) Dockerfile
52
- timeoutInMinutes: 1
53
- name: lint_dockerfile
54
-
55
- - powershell: |
56
- . "$(bundle show pupperware)/ci/build.ps1"
57
- Build-Container -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE -PathOrUri $ENV:CONTAINER_BUILD_PATH -AdditionalOptions ($ENV:BUILD_OPTIONS -split ' ')
58
- displayName: Build $(CONTAINER_NAME) Container
59
- timeoutInMinutes: 5
60
- name: build_container
61
-
62
- - powershell: |
63
- . "$(bundle show pupperware)/ci/build.ps1"
64
- Initialize-TestEnv
65
- displayName: Prepare Test Environment
66
- name: test_prepare
67
-
68
- - powershell: |
69
- . "$(bundle show pupperware)/ci/build.ps1"
70
- Invoke-ContainerTest -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE
71
- displayName: Test $(CONTAINER_NAME)
72
- timeoutInMinutes: 5
73
- name: test_container
74
-
75
- - task: PublishTestResults@2
76
- displayName: Publish $(CONTAINER_NAME) test results
77
- inputs:
78
- testResultsFormat: 'JUnit'
79
- testResultsFiles: 'docker/TEST-*.xml'
80
- testRunTitle: $(CONTAINER_NAME) Test Results
81
-
82
- - powershell: |
83
- . "$(bundle show pupperware)/ci/build.ps1"
84
- Clear-BuildState -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE
85
- displayName: Container Cleanup
86
- timeoutInMinutes: 4
87
- condition: always()