r10k 2.6.4 → 2.6.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +5 -5
  2. data/.github/pull_request_template.md +4 -0
  3. data/.github/workflows/release.yml +36 -0
  4. data/.gitignore +0 -1
  5. data/.travis.yml +16 -9
  6. data/CHANGELOG.mkd +51 -1
  7. data/CODEOWNERS +1 -0
  8. data/doc/dynamic-environments/usage.mkd +12 -0
  9. data/integration/Gemfile +2 -2
  10. data/integration/Rakefile +2 -3
  11. data/integration/pre-suite/00_pe_install.rb +2 -0
  12. data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +2 -2
  13. data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +2 -2
  14. data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +2 -12
  15. data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +2 -11
  16. data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +2 -12
  17. data/lib/r10k/action/deploy/environment.rb +15 -2
  18. data/lib/r10k/cli/deploy.rb +1 -0
  19. data/lib/r10k/module/git.rb +5 -0
  20. data/lib/r10k/puppetfile.rb +17 -6
  21. data/lib/r10k/util/subprocess/runner/posix.rb +3 -3
  22. data/lib/r10k/version.rb +4 -1
  23. data/locales/r10k.pot +486 -0
  24. data/r10k.gemspec +7 -3
  25. data/spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile +5 -0
  26. data/spec/unit/action/deploy/environment_spec.rb +63 -0
  27. data/spec/unit/puppetfile_spec.rb +39 -0
  28. metadata +48 -22
  29. data/MAINTAINERS +0 -18
  30. data/integration/pre-suite/30_test_utils.rb +0 -17
  31. data/integration/scripts/README.mkd +0 -86
  32. data/integration/scripts/setup_r10k_env_centos5.sh +0 -23
  33. data/integration/scripts/setup_r10k_env_centos6.sh +0 -23
  34. data/integration/scripts/setup_r10k_env_rhel7.sh +0 -23
  35. data/integration/scripts/setup_r10k_env_sles11.sh +0 -23
  36. data/integration/scripts/setup_r10k_env_sles12.sh +0 -23
  37. data/integration/scripts/setup_r10k_env_ubuntu1004.sh +0 -23
  38. data/integration/scripts/setup_r10k_env_ubuntu1204.sh +0 -23
  39. data/integration/scripts/setup_r10k_env_ubuntu1404.sh +0 -23
  40. data/integration/tests/basic_functionality/negative/attempt_to_install_peonly_module_without_license.rb +0 -71
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/centos-6-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/redhat-7-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/sles-11-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/sles-12-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/ubuntu-1004-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/ubuntu-1204-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
- SCRIPT_PATH=$(pwd)
3
- BASENAME_CMD="basename ${SCRIPT_PATH}"
4
- SCRIPT_BASE_PATH=`eval ${BASENAME_CMD}`
5
-
6
- if [ $SCRIPT_BASE_PATH = "scripts" ]; then
7
- cd ../
8
- fi
9
-
10
- export pe_dist_dir=http://neptune.puppetlabs.lan/4.0/ci-ready/
11
- export GIT_PROVIDER=shellgit
12
-
13
- bundle install --path .bundle/gems
14
-
15
- bundle exec beaker \
16
- --preserve-hosts always \
17
- --config configs/pe/ubuntu-1404-64mda \
18
- --debug \
19
- --keyfile ~/.ssh/id_rsa-acceptance \
20
- --pre-suite pre-suite \
21
- --load-path lib
22
-
23
- rm -rf .bundle
@@ -1,71 +0,0 @@
1
- require 'git_utils'
2
- require 'r10k_utils'
3
- require 'master_manipulator'
4
- test_name 'RK-158 - C92361 - Attempt to install a PE-only module with no license file'
5
-
6
- #Init
7
- env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
8
- r10k_fqp = get_r10k_fqp(master)
9
- master_certname = on(master, puppet('config', 'print', 'certname')).stdout.rstrip
10
-
11
- git_repo_path = '/git_repos'
12
- git_repo_name = 'environments'
13
- git_control_remote = File.join(git_repo_path, "#{git_repo_name}.git")
14
- git_environments_path = '/root/environments'
15
- last_commit = git_last_commit(master, git_environments_path)
16
- git_provider = ENV['GIT_PROVIDER'] || 'shellgit'
17
-
18
- r10k_config_path = get_r10k_config_file_path(master)
19
- r10k_config_bak_path = "#{r10k_config_path}.bak"
20
-
21
- #In-line files
22
- r10k_conf = <<-CONF
23
- cachedir: '/var/cache/r10k'
24
- git:
25
- provider: '#{git_provider}'
26
- sources:
27
- control:
28
- basedir: "#{env_path}"
29
- remote: "#{git_control_remote}"
30
- CONF
31
-
32
- #Manifest
33
- site_pp_path = File.join(git_environments_path, 'manifests', 'site.pp')
34
- site_pp = create_site_pp(master_certname, ' include peonly')
35
-
36
- # Verification
37
- error_message_regex = /You must have a valid Puppet Enterprise® license on this node in order to download ztr-peonly/
38
-
39
- #Teardown
40
- teardown do
41
- step 'Restore Original "r10k" Config'
42
- on(master, "mv #{r10k_config_bak_path} #{r10k_config_path}")
43
-
44
- step 'cleanup r10k'
45
- clean_up_r10k(master, last_commit, git_environments_path)
46
- end
47
-
48
- #Setup
49
- step 'Stub the forge'
50
- stub_forge_on(master)
51
-
52
- step 'Backup a Valid "r10k" Config'
53
- on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
54
-
55
- step 'Update the "r10k" Config'
56
- create_remote_file(master, r10k_config_path, r10k_conf)
57
-
58
- step 'Inject New "site.pp" to the "production" Environment'
59
- inject_site_pp(master, site_pp_path, site_pp)
60
-
61
- step 'Copy Puppetfile to "production" Environment Git Repo'
62
- create_remote_file(master, "#{git_environments_path}/Puppetfile", 'mod "ztr-peonly"')
63
-
64
- step 'Push Changes'
65
- git_add_commit_push(master, 'production', 'add Puppetfile', git_environments_path)
66
-
67
- #Test
68
- step 'Deploy "production" Environment via r10k'
69
- on(master, "#{r10k_fqp} deploy environment -p", :acceptable_exit_codes => [0,1]) do |result|
70
- assert_match(error_message_regex, result.stderr, 'Expected error message was not observed!')
71
- end