r10k 3.7.0 → 3.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.github/pull_request_template.md +1 -1
  3. data/.github/workflows/docker.yml +4 -1
  4. data/.github/workflows/release.yml +3 -2
  5. data/.github/workflows/rspec_tests.yml +1 -1
  6. data/.github/workflows/stale.yml +19 -0
  7. data/.travis.yml +8 -1
  8. data/CHANGELOG.mkd +32 -0
  9. data/CODEOWNERS +2 -2
  10. data/doc/common-patterns.mkd +1 -0
  11. data/doc/dynamic-environments/configuration.mkd +114 -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/lib/r10k/action/base.rb +10 -0
  27. data/lib/r10k/action/deploy/display.rb +49 -10
  28. data/lib/r10k/action/deploy/environment.rb +101 -51
  29. data/lib/r10k/action/deploy/module.rb +54 -30
  30. data/lib/r10k/action/puppetfile/check.rb +3 -1
  31. data/lib/r10k/action/puppetfile/install.rb +20 -23
  32. data/lib/r10k/action/puppetfile/purge.rb +8 -2
  33. data/lib/r10k/action/runner.rb +33 -0
  34. data/lib/r10k/cli/deploy.rb +13 -7
  35. data/lib/r10k/cli/puppetfile.rb +5 -5
  36. data/lib/r10k/content_synchronizer.rb +83 -0
  37. data/lib/r10k/deployment.rb +1 -1
  38. data/lib/r10k/environment/base.rb +29 -2
  39. data/lib/r10k/environment/git.rb +17 -5
  40. data/lib/r10k/environment/name.rb +22 -4
  41. data/lib/r10k/environment/svn.rb +11 -4
  42. data/lib/r10k/environment/with_modules.rb +46 -30
  43. data/lib/r10k/git.rb +1 -0
  44. data/lib/r10k/git/rugged/credentials.rb +39 -2
  45. data/lib/r10k/initializers.rb +1 -0
  46. data/lib/r10k/module.rb +1 -1
  47. data/lib/r10k/module/base.rb +17 -1
  48. data/lib/r10k/module/forge.rb +29 -11
  49. data/lib/r10k/module/git.rb +50 -27
  50. data/lib/r10k/module/local.rb +2 -1
  51. data/lib/r10k/module/svn.rb +24 -18
  52. data/lib/r10k/puppetfile.rb +66 -83
  53. data/lib/r10k/settings.rb +18 -2
  54. data/lib/r10k/source/base.rb +9 -0
  55. data/lib/r10k/source/git.rb +18 -7
  56. data/lib/r10k/source/hash.rb +5 -5
  57. data/lib/r10k/source/svn.rb +5 -3
  58. data/lib/r10k/util/cleaner.rb +21 -0
  59. data/lib/r10k/util/setopts.rb +33 -12
  60. data/lib/r10k/version.rb +1 -1
  61. data/locales/r10k.pot +98 -82
  62. data/r10k.gemspec +1 -1
  63. data/spec/fixtures/unit/action/r10k_creds.yaml +9 -0
  64. data/spec/r10k-mocks/mock_source.rb +1 -1
  65. data/spec/shared-examples/puppetfile-action.rb +7 -7
  66. data/spec/unit/action/deploy/display_spec.rb +35 -5
  67. data/spec/unit/action/deploy/environment_spec.rb +199 -38
  68. data/spec/unit/action/deploy/module_spec.rb +162 -28
  69. data/spec/unit/action/puppetfile/check_spec.rb +2 -2
  70. data/spec/unit/action/puppetfile/install_spec.rb +31 -10
  71. data/spec/unit/action/puppetfile/purge_spec.rb +25 -5
  72. data/spec/unit/action/runner_spec.rb +48 -1
  73. data/spec/unit/environment/git_spec.rb +19 -2
  74. data/spec/unit/environment/name_spec.rb +28 -0
  75. data/spec/unit/environment/svn_spec.rb +12 -0
  76. data/spec/unit/environment/with_modules_spec.rb +74 -0
  77. data/spec/unit/git/rugged/credentials_spec.rb +78 -1
  78. data/spec/unit/module/forge_spec.rb +21 -13
  79. data/spec/unit/module/git_spec.rb +63 -8
  80. data/spec/unit/module_spec.rb +77 -10
  81. data/spec/unit/puppetfile_spec.rb +63 -60
  82. data/spec/unit/util/purgeable_spec.rb +2 -8
  83. data/spec/unit/util/setopts_spec.rb +25 -1
  84. metadata +11 -12
  85. data/azure-pipelines.yml +0 -87
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()