r10k 3.15.4 → 4.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +17 -0
  3. data/.github/workflows/docker.yml +4 -4
  4. data/.github/workflows/release.yml +2 -2
  5. data/.github/workflows/rspec_tests.yml +7 -11
  6. data/.github/workflows/stale.yml +1 -1
  7. data/CHANGELOG.mkd +19 -0
  8. data/Gemfile +2 -2
  9. data/README.mkd +3 -3
  10. data/doc/dynamic-environments/configuration.mkd +13 -1
  11. data/doc/puppetfile.mkd +9 -3
  12. data/integration/files/pre-suite/git_config.pp.erb +1 -1
  13. data/integration/pre-suite/10_git_config.rb +0 -3
  14. data/integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb +5 -4
  15. data/integration/tests/basic_functionality/proxy_specified_in_configuration.rb +1 -1
  16. data/integration/tests/basic_functionality/proxy_with_puppetfile.rb +1 -1
  17. data/integration/tests/command_line/deploy_env_without_mod_update.rb +0 -3
  18. data/integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb +0 -3
  19. data/integration/tests/git_source/HTTP_proxy_and_git_source.rb +5 -10
  20. data/integration/tests/git_source/git_source_git.rb +0 -3
  21. data/integration/tests/git_source/git_source_repeated_remote.rb +0 -3
  22. data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +1 -1
  23. data/integration/tests/purging/content_not_purged_at_root.rb +0 -3
  24. data/integration/tests/purging/default_purging.rb +0 -3
  25. data/integration/tests/purging/{does_not_purge_files_on_white_list.rb → does_not_purge_files_on_allowlist.rb} +2 -5
  26. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +0 -3
  27. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +0 -3
  28. data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +0 -3
  29. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_forge_module.rb +0 -3
  30. data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +0 -3
  31. data/integration/tests/user_scenario/basic_workflow/negative/neg_inaccessible_forge.rb +3 -2
  32. data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +1 -5
  33. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +0 -3
  34. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_module.rb +0 -3
  35. data/integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb +0 -3
  36. data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +0 -3
  37. data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +0 -3
  38. data/integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb +0 -3
  39. data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +0 -3
  40. data/lib/r10k/action/deploy/environment.rb +2 -19
  41. data/lib/r10k/action/deploy/module.rb +1 -0
  42. data/lib/r10k/action/puppetfile/check.rb +7 -0
  43. data/lib/r10k/action/puppetfile/install.rb +1 -0
  44. data/lib/r10k/cli/deploy.rb +15 -1
  45. data/lib/r10k/content_synchronizer.rb +7 -2
  46. data/lib/r10k/environment.rb +0 -1
  47. data/lib/r10k/git/rugged/bare_repository.rb +4 -3
  48. data/lib/r10k/git/rugged/working_repository.rb +7 -5
  49. data/lib/r10k/git/shellgit/working_repository.rb +1 -1
  50. data/lib/r10k/git/stateful_repository.rb +2 -2
  51. data/lib/r10k/module/base.rb +3 -3
  52. data/lib/r10k/module/git.rb +13 -4
  53. data/lib/r10k/module_loader/puppetfile.rb +0 -7
  54. data/lib/r10k/puppetfile.rb +1 -1
  55. data/lib/r10k/settings.rb +6 -7
  56. data/lib/r10k/version.rb +1 -1
  57. data/locales/r10k.pot +10 -6
  58. data/r10k.gemspec +4 -6
  59. metadata +18 -76
  60. data/docker/.gitignore +0 -1
  61. data/docker/.rspec +0 -4
  62. data/docker/Gemfile +0 -11
  63. data/docker/Makefile +0 -99
  64. data/docker/README.md +0 -28
  65. data/docker/docker-compose.yml +0 -18
  66. data/docker/r10k/Dockerfile +0 -68
  67. data/docker/r10k/adduser.sh +0 -13
  68. data/docker/r10k/docker-entrypoint.d/10-analytics.sh +0 -30
  69. data/docker/r10k/docker-entrypoint.sh +0 -10
  70. data/docker/r10k/release.Dockerfile +0 -55
  71. data/docker/spec/dockerfile_spec.rb +0 -37
  72. data/docker/spec/fixtures/Puppetfile +0 -2
  73. data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +0 -83
  74. data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +0 -128
  75. data/integration/tests/purging/invalid_whitelist_types.rb +0 -63
  76. data/integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb +0 -49
  77. data/integration/tests/user_scenario/basic_workflow/single_env_module_last_release_deleted.rb +0 -68
  78. data/lib/r10k/environment/bare.rb +0 -13
@@ -1,49 +0,0 @@
1
- require 'git_utils'
2
- require 'r10k_utils'
3
- test_name 'CODEMGMT-127 - C64121 - Attempt to Deploy Environment with Forge Module Specified at Deleted Release'
4
-
5
- #This test uses the spotty module at https://forge-aio01-petest.puppetlabs.com//puppetlabs/spotty, with valid released 0.1.0 and 0.3.0 versions, and deleted 0.2.0 and 0.4.0 versions.
6
-
7
- #Init
8
- git_environments_path = '/root/environments'
9
- last_commit = git_last_commit(master, git_environments_path)
10
- r10k_fqp = get_r10k_fqp(master)
11
-
12
- #Verification
13
- if get_puppet_version(master) < 4.0
14
- error_notification_regex = /No releases matching '0.2.0'/
15
- else
16
- error_notification_regex = /error.* -> The module release puppetlabs-spotty-0.2.0 does not exist on/i
17
- end
18
-
19
- #File
20
- puppet_file = <<-PUPPETFILE
21
- mod "puppetlabs/spotty", '0.2.0'
22
- PUPPETFILE
23
-
24
- puppet_file_path = File.join(git_environments_path, 'Puppetfile')
25
-
26
- #Teardown
27
- teardown do
28
- clean_up_r10k(master, last_commit, git_environments_path)
29
- end
30
-
31
- #Setup
32
- step 'Stub Forge on Master'
33
- stub_forge_on(master)
34
-
35
- #Tests
36
- step 'Checkout "production" Branch'
37
- git_on(master, 'checkout production', git_environments_path)
38
-
39
- step 'Create "Puppetfile" for the "production" Environment'
40
- create_remote_file(master, puppet_file_path, puppet_file)
41
-
42
- step 'Push Changes'
43
- git_add_commit_push(master, 'production', 'Add module.', git_environments_path)
44
-
45
- #Tests
46
- step "Deploy production environment via r10k with module specified at deleted version"
47
- on(master, "#{r10k_fqp} deploy environment -p -v", :acceptable_exit_codes => 1) do |result|
48
- assert_match(error_notification_regex, result.stderr, 'Unexpected error was detected!')
49
- end
@@ -1,68 +0,0 @@
1
- require 'git_utils'
2
- require 'r10k_utils'
3
- test_name 'CODEMGMT-127 - C64120 - Single Environment with Forge Module where Latest Release has been Deleted'
4
-
5
- #This test uses the spotty module at https://forge-aio01-petest.puppetlabs.com//puppetlabs/spotty, which has valid 0.1.0 and 0.3.0 versions, and deleted 0.2.0 and 0.4.0 versions.
6
-
7
- #Init
8
- env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
9
- prod_env_modules_path = File.join(env_path, 'production', 'modules')
10
- r10k_fqp = get_r10k_fqp(master)
11
-
12
- git_environments_path = '/root/environments'
13
- last_commit = git_last_commit(master, git_environments_path)
14
-
15
- #Verification
16
- module_contents = 'Version 3'
17
- module_contents_regex = /\A#{module_contents}\n\z/
18
-
19
- module_contents_path = File.join(prod_env_modules_path, 'spotty', 'manifests', 'init.pp')
20
- module_version_filepath = File.join(prod_env_modules_path, 'spotty', 'metadata.json')
21
- module_version_3_regex = /"0.3.0"/
22
-
23
- #File
24
- puppet_file = <<-PUPPETFILE
25
- mod "puppetlabs/spotty"
26
- PUPPETFILE
27
-
28
- puppet_file_path = File.join(git_environments_path, 'Puppetfile')
29
-
30
- #Teardown
31
- teardown do
32
- clean_up_r10k(master, last_commit, git_environments_path)
33
- end
34
-
35
- #Setup
36
- step 'Stub Forge on Master'
37
- stub_forge_on(master)
38
-
39
- #Tests
40
- step 'Checkout "production" Branch'
41
- git_on(master, 'checkout production', git_environments_path)
42
-
43
- step 'Create "Puppetfile" for the "production" Environment'
44
- create_remote_file(master, puppet_file_path, puppet_file)
45
-
46
- step 'Push Changes'
47
- git_add_commit_push(master, 'production', 'Add module.', git_environments_path)
48
-
49
- #Tests
50
- step 'Deploy "production" Environment via r10k with modules'
51
- on(master, "#{r10k_fqp} deploy environment -p -v")
52
-
53
- agents.each do |agent|
54
- step "Run Puppet Agent"
55
- on(agent, puppet('agent', '--test', '--environment production'), :acceptable_exit_codes => [0,2]) do |result|
56
- assert_no_match(/Error:/, result.stderr, 'Unexpected error was detected!')
57
- end
58
-
59
- step 'Verify Contents'
60
- on(master, "cat #{module_contents_path}") do |result|
61
- assert_match(module_contents, result.stdout, 'File Content is Invalid')
62
- end
63
-
64
- step 'Verify Version'
65
- on(master, "grep version #{module_version_filepath}") do |result|
66
- assert_match(module_version_3_regex, result.stdout, 'File Content is Invalid')
67
- end
68
- end
@@ -1,13 +0,0 @@
1
- class R10K::Environment::Bare < R10K::Environment::Plain
2
-
3
- R10K::Environment.register(:bare, self)
4
-
5
- def initialize(name, basedir, dirname, options = {})
6
- logger.warn _('"bare" environment type is deprecated; please use "plain" instead (environment: %{name})') % {name: name}
7
- super
8
- end
9
-
10
- def signature
11
- 'bare-default'
12
- end
13
- end