r10k 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/integration/Gemfile +14 -3
  4. data/integration/component/pre-suite/05_install_dev_r10k.rb +4 -2
  5. data/integration/pre-suite/30_test_utils.rb +1 -1
  6. data/integration/tests/Puppetfile/{HTTP_PROXY_effects_forge_source.rb → HTTP_PROXY_affects_forge_source.rb} +1 -1
  7. data/integration/tests/Puppetfile/{HTTP_PROXY_effects_git_source.rb → HTTP_PROXY_affects_git_source.rb} +1 -1
  8. data/integration/tests/git_source/HTTP_proxy_and_git_source.rb +1 -1
  9. data/integration/tests/purging/content_not_purged_at_root.rb +2 -2
  10. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +1 -1
  11. data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +1 -1
  12. data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +1 -1
  13. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module.rb +1 -1
  14. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module_ref.rb +1 -1
  15. data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +8 -1
  16. data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +8 -2
  17. data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +1 -1
  18. data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +8 -1
  19. data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +1 -1
  20. data/lib/r10k/version.rb +1 -1
  21. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 181e280a63e21a47dd182183bbfbed9d8b7cb624
4
- data.tar.gz: 67dd254d0ad0c7404a07953e8813260ee8078541
3
+ metadata.gz: 57e5c32f14eddc3386bb26d91697fcce47f1a3bc
4
+ data.tar.gz: 94d053fc19eb6cc38561571193e05a205613a444
5
5
  SHA512:
6
- metadata.gz: 90efcc7e2a7122ad759cc67d1caf135d6dad8a605e9d9bca382b92e39d43aad768e7015c587c413a7b10e7d7b73fb56e084ae220662aded12be02ce3b1d8c34c
7
- data.tar.gz: e6ce307498e65fe437deea1950c32bd2705058ae61483140aa03b0379845ae110347123542594957d6b509ff3011f880386f323c6ecc4d84d7b70beb062a836d
6
+ metadata.gz: abb8f5c18eff9074b2b66c2121cd3b74d5205536a78e9bfe8e50afd0c3fd02e34cbcee16e03a30e601bfa05af63b40163373a5970712accda38d43cee542a527
7
+ data.tar.gz: 4b4238d221dd262c5b86c939b228221e01989fbfc8bbe88bd1eda0afd0d7792e9de1548729730fa90031bc68498dc827e7cbd9b75af52cb8d1c2c37088a5a9a8
data/.gitignore CHANGED
@@ -5,3 +5,6 @@ Gemfile.lock
5
5
  bundle
6
6
  coverage
7
7
  locales/r10k.pot
8
+ integration/log
9
+ integration/junit
10
+ integration/configs
@@ -1,6 +1,17 @@
1
1
  source ENV['GEM_SOURCE'] || 'https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/'
2
2
 
3
- gem 'beaker', '~> 2.7'
4
- gem 'beaker-abs', '~> 0.2'
3
+ def location_for(place, fake_version = nil)
4
+ if place =~ /^(git:[^#]*)#(.*)/
5
+ [fake_version, { :git => $1, :branch => $2, :require => false }].compact
6
+ elsif place =~ /^file:\/\/(.*)/
7
+ ['>= 0', { :path => File.expand_path($1), :require => false }]
8
+ else
9
+ [place, { :require => false }]
10
+ end
11
+ end
12
+
13
+ gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 3.33')
14
+ gem 'beaker-pe', '~> 1.22'
15
+ gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || '~> 1.1')
16
+ gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.4')
5
17
  gem 'rototiller', '= 0.1.0'
6
- gem 'beaker-hostgenerator', '~> 0.7.0'
@@ -1,10 +1,12 @@
1
1
  test_name "Install PE r10k" do
2
2
 
3
3
  step "Install PE r10k" do
4
+ variant, version, arch, codename = master['platform'].to_array
5
+ if variant == 'ubuntu' && version.split('.').first.to_i >= 18
6
+ on master, "echo 'Acquire::AllowInsecureRepositories \"true\";' > /etc/apt/apt.conf.d/90insecure"
7
+ end
4
8
 
5
- # taken from beaker-pe/lib/beaker-pe/pe-client-tools/install_helper.rb
6
9
  install_dev_repos_on('pe-r10k', master, ENV['SHA'], '/tmp/repo_configs', {:dev_builds_url => 'http://builds.delivery.puppetlabs.net'})
7
10
  master.install_package('pe-r10k')
8
-
9
11
  end
10
12
  end
@@ -11,7 +11,7 @@ SCRIPT
11
11
 
12
12
  step 'Install "filebucket" File Generator'
13
13
  create_remote_file(master, filebucket_script_path, filebucket_script)
14
- on(master, "git clone https://github.com/cowofevil/filebucket.git #{filebucket_path}")
14
+ on(master, "git clone git://github.com/puppetlabs/filebucket.git #{filebucket_path}")
15
15
 
16
16
  on(master, "chmod 755 #{filebucket_script_path}")
17
17
  on(master, "chmod 755 #{filebucket_path}/filebucketapp.py")
@@ -1,7 +1,7 @@
1
1
  require 'git_utils'
2
2
  require 'r10k_utils'
3
3
  require 'master_manipulator'
4
- test_name 'CODEMGMT-730 - C97981 - HTTP_PROXY effects git source in puppetfile'
4
+ test_name 'CODEMGMT-730 - C97981 - HTTP_PROXY affects git source in puppetfile'
5
5
 
6
6
  #Init
7
7
  env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
@@ -1,7 +1,7 @@
1
1
  require 'git_utils'
2
2
  require 'r10k_utils'
3
3
  require 'master_manipulator'
4
- test_name 'CODEMGMT-730 - C97982 - HTTP_PROXY effects git source in puppetfile'
4
+ test_name 'CODEMGMT-730 - C97982 - HTTP_PROXY affects git source in puppetfile'
5
5
 
6
6
  #Init
7
7
  env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
@@ -16,7 +16,7 @@ r10k_config_bak_path = "#{r10k_config_path}.bak"
16
16
 
17
17
  puppetfile =<<-EOS
18
18
  mod 'motd',
19
- :git => 'https://github.com/puppetlabs/puppetlabs-motd'
19
+ :git => 'git://github.com/puppetlabs/puppetlabs-motd'
20
20
  EOS
21
21
 
22
22
  proxy_env_value = 'http://cattastic.net:3219'
@@ -30,12 +30,12 @@ CONF
30
30
  puppetfile = <<-EOS
31
31
  mod 'non_module_object_1',
32
32
  :install_path => './',
33
- :git => 'https://github.com/puppetlabs/control-repo.git',
33
+ :git => 'git://github.com/puppetlabs/control-repo.git',
34
34
  :branch => 'production'
35
35
 
36
36
  mod 'non_module_object_2',
37
37
  :install_path => '',
38
- :git => 'https://github.com/puppetlabs/control-repo.git',
38
+ :git => 'git://github.com/puppetlabs/control-repo.git',
39
39
  :branch => 'production'
40
40
  EOS
41
41
 
@@ -27,7 +27,7 @@ stdlib_notify_message_regex = /The test message is:.*one.*=>.*1.*two.*=>.*bats.*
27
27
  puppet_file = <<-PUPPETFILE
28
28
  mod "puppetlabs/motd"
29
29
  mod 'puppetlabs/stdlib',
30
- :git => 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
30
+ :git => 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
31
31
  PUPPETFILE
32
32
 
33
33
  puppet_file_path = File.join(git_environments_path, 'Puppetfile')
@@ -31,7 +31,7 @@ puppet_file = <<-PUPPETFILE
31
31
  moduledir '#{@module_path}'
32
32
  mod "puppetlabs/motd"
33
33
  mod 'puppetlabs/stdlib',
34
- :git => 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
34
+ :git => 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
35
35
  PUPPETFILE
36
36
 
37
37
  puppet_file_path = File.join(git_environments_path, 'Puppetfile')
@@ -65,7 +65,7 @@ env_structs = {:production => GitEnv.new('/git_repos',
65
65
  '/git_repos_alt/environments_alt.git',
66
66
  '/root/environments_alt',
67
67
  '/root/environments_alt/Puppetfile',
68
- 'mod "puppetlabs/stdlib", :git => "https://github.com/puppetlabs/puppetlabs-stdlib.git"',
68
+ 'mod "puppetlabs/stdlib", :git => "git://github.com/puppetlabs/puppetlabs-stdlib.git"',
69
69
  '/root/environments_alt/manifests/site.pp',
70
70
  create_site_pp(master_certname, stage_env_manifest)
71
71
  ),
@@ -15,7 +15,7 @@ r10k_fqp = get_r10k_fqp(master)
15
15
 
16
16
  #File
17
17
  puppet_file = <<-PUPPETFILE
18
- mod 'broken', :git => 'https://github.com/puppetlabs/puppetlabs-broken'
18
+ mod 'broken', :git => 'git://github.com/puppetlabs/puppetlabs-broken'
19
19
  PUPPETFILE
20
20
 
21
21
  puppet_file_path = File.join(git_environments_path, 'Puppetfile')
@@ -12,7 +12,7 @@ r10k_fqp = get_r10k_fqp(master)
12
12
  #File
13
13
  puppet_file = <<-PUPPETFILE
14
14
  mod 'broken',
15
- :git => 'https://github.com/puppetlabs/puppetlabs-motd',
15
+ :git => 'git://github.com/puppetlabs/puppetlabs-motd',
16
16
  :ref => 'does_not_exist'
17
17
  PUPPETFILE
18
18
 
@@ -20,8 +20,15 @@ r10k_config_bak_path = "#{r10k_config_path}.bak"
20
20
 
21
21
  tmpfs_path = '/mnt/tmpfs'
22
22
 
23
+ if on(master, 'which python', :acceptable_exit_codes => [0, 1]).exit_code == 1
24
+ python_bin = 'python3'
25
+ else
26
+ python_bin = 'python'
27
+ end
28
+
23
29
  file_bucket_path = '/opt/filebucket'
24
30
  file_bucket_command_path = File.join(file_bucket_path, 'filebucketapp.py')
31
+ file_bucket_command = "#{python_bin} #{file_bucket_command_path}"
25
32
  pattern_file_path = File.join(file_bucket_path, 'psuedo_random_128k.pat')
26
33
 
27
34
  test_files_path = File.join(git_environments_path, 'test_files')
@@ -66,7 +73,7 @@ on(master, "mount -osize=10m tmpfs #{tmpfs_path} -t tmpfs")
66
73
  step 'Create Large Binary File'
67
74
  create_remote_file(master, File.join(git_environments_path, '.gitattributes'), '*.file binary')
68
75
  on(master, "mkdir -p #{test_files_path}")
69
- on(master, "#{file_bucket_command_path} -s 11 -f #{test_files_path}/test.file -d #{pattern_file_path}")
76
+ on(master, "#{file_bucket_command} -s 11 -f #{test_files_path}/test.file -d #{pattern_file_path}")
70
77
 
71
78
  step 'Push Changes'
72
79
  git_add_commit_push(master, 'production', 'Add large file.', git_environments_path)
@@ -21,9 +21,15 @@ helloworld_module_path = File.join(local_files_root_path, 'modules', 'helloworld
21
21
  test_files = 'test_files'
22
22
  test_files_path = File.join(git_environments_path, test_files)
23
23
 
24
+ if on(master, 'which python', :acceptable_exit_codes => [0, 1]).exit_code == 1
25
+ python_bin = 'python3'
26
+ else
27
+ python_bin = 'python'
28
+ end
29
+
24
30
  file_bucket_path = '/opt/filebucket'
25
31
  file_bucket_command_path = File.join(file_bucket_path, 'filebucketapp.py')
26
- pattern_file_path = File.join(file_bucket_path, 'psuedo_random_128k.pat')
32
+ file_bucket_command = "#{python_bin} #{file_bucket_command_path}"
27
33
 
28
34
  #Manifest
29
35
  site_pp_path = File.join(git_environments_path, 'manifests', 'site.pp')
@@ -54,7 +60,7 @@ inject_site_pp(master, site_pp_path, site_pp)
54
60
  step 'Create 10,000 Files'
55
61
  create_remote_file(master, File.join(git_environments_path, '.gitattributes'), '*.file binary')
56
62
  on(master, "mkdir -p #{test_files_path}")
57
- on(master, "#{file_bucket_command_path} -k -c 10000 -p #{test_files_path}/test -u .file")
63
+ on(master, "#{file_bucket_command} -k -c 10000 -p #{test_files_path}/test -u .file")
58
64
 
59
65
  step 'Create MD5 Checksum of Files'
60
66
  on(master, "cd #{test_files_path};md5sum *.file > #{checksum_file_name}")
@@ -28,7 +28,7 @@ notify_message_regex = /I am in the production environment/
28
28
  puppet_file = <<-PUPPETFILE
29
29
  mod "puppetlabs/motd"
30
30
  mod 'puppetlabs/inifile',
31
- :git => 'https://github.com/puppetlabs/puppetlabs-inifile'
31
+ :git => 'git://github.com/puppetlabs/puppetlabs-inifile'
32
32
  PUPPETFILE
33
33
 
34
34
  puppet_file_path = File.join(git_environments_path, 'Puppetfile')
@@ -21,9 +21,16 @@ helloworld_module_path = File.join(local_files_root_path, 'modules', 'helloworld
21
21
  test_files = 'test_files'
22
22
  test_files_path = File.join(git_environments_path, 'test_files')
23
23
 
24
+ if on(master, 'which python', :acceptable_exit_codes => [0, 1]).exit_code == 1
25
+ python_bin = 'python3'
26
+ else
27
+ python_bin = 'python'
28
+ end
29
+
24
30
  file_bucket_path = '/opt/filebucket'
25
31
  file_bucket_command_path = File.join(file_bucket_path, 'filebucketapp.py')
26
32
  pattern_file_path = File.join(file_bucket_path, 'psuedo_random_128k.pat')
33
+ file_bucket_command = "#{python_bin} #{file_bucket_command_path}"
27
34
 
28
35
  #Manifest
29
36
  site_pp_path = File.join(git_environments_path, 'manifests', 'site.pp')
@@ -54,7 +61,7 @@ inject_site_pp(master, site_pp_path, site_pp)
54
61
  step 'Create Large Binary Files'
55
62
  create_remote_file(master, File.join(git_environments_path, '.gitattributes'), '*.file binary')
56
63
  on(master, "mkdir -p #{test_files_path}")
57
- on(master, "#{file_bucket_command_path} -c 10 -s 25 -p #{test_files_path}/test -u .file -d #{pattern_file_path}")
64
+ on(master, "#{file_bucket_command} -c 10 -s 25 -p #{test_files_path}/test -u .file -d #{pattern_file_path}")
58
65
 
59
66
  step 'Create MD5 Checksum of Files'
60
67
  on(master, "cd #{test_files_path};md5sum *.file > #{checksum_file_name}")
@@ -27,7 +27,7 @@ PUPPETFILE
27
27
 
28
28
  puppet_file_git = <<-PUPPETFILE
29
29
  mod "puppetlabs/motd",
30
- :git => 'https://github.com/puppetlabs/puppetlabs-motd',
30
+ :git => 'git://github.com/puppetlabs/puppetlabs-motd',
31
31
  :tag => '1.2.0'
32
32
  PUPPETFILE
33
33
 
@@ -1,3 +1,3 @@
1
1
  module R10K
2
- VERSION = '2.6.3'
2
+ VERSION = '2.6.4'
3
3
  end
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: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2018-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored
@@ -217,8 +217,8 @@ files:
217
217
  - integration/scripts/setup_r10k_env_ubuntu1004.sh
218
218
  - integration/scripts/setup_r10k_env_ubuntu1204.sh
219
219
  - integration/scripts/setup_r10k_env_ubuntu1404.sh
220
- - integration/tests/Puppetfile/HTTP_PROXY_effects_forge_source.rb
221
- - integration/tests/Puppetfile/HTTP_PROXY_effects_git_source.rb
220
+ - integration/tests/Puppetfile/HTTP_PROXY_affects_forge_source.rb
221
+ - integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb
222
222
  - integration/tests/README.mkd
223
223
  - integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb
224
224
  - integration/tests/basic_functionality/negative/attempt_to_install_peonly_module_without_license.rb