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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +17 -0
- data/.github/workflows/docker.yml +4 -4
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/rspec_tests.yml +7 -11
- data/.github/workflows/stale.yml +1 -1
- data/CHANGELOG.mkd +19 -0
- data/Gemfile +2 -2
- data/README.mkd +3 -3
- data/doc/dynamic-environments/configuration.mkd +13 -1
- data/doc/puppetfile.mkd +9 -3
- data/integration/files/pre-suite/git_config.pp.erb +1 -1
- data/integration/pre-suite/10_git_config.rb +0 -3
- data/integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb +5 -4
- data/integration/tests/basic_functionality/proxy_specified_in_configuration.rb +1 -1
- data/integration/tests/basic_functionality/proxy_with_puppetfile.rb +1 -1
- data/integration/tests/command_line/deploy_env_without_mod_update.rb +0 -3
- data/integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb +0 -3
- data/integration/tests/git_source/HTTP_proxy_and_git_source.rb +5 -10
- data/integration/tests/git_source/git_source_git.rb +0 -3
- data/integration/tests/git_source/git_source_repeated_remote.rb +0 -3
- data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +1 -1
- data/integration/tests/purging/content_not_purged_at_root.rb +0 -3
- data/integration/tests/purging/default_purging.rb +0 -3
- data/integration/tests/purging/{does_not_purge_files_on_white_list.rb → does_not_purge_files_on_allowlist.rb} +2 -5
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_forge_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/negative/neg_inaccessible_forge.rb +3 -2
- data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +1 -5
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +0 -3
- data/integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb +0 -3
- data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +0 -3
- data/lib/r10k/action/deploy/environment.rb +2 -19
- data/lib/r10k/action/deploy/module.rb +1 -0
- data/lib/r10k/action/puppetfile/check.rb +7 -0
- data/lib/r10k/action/puppetfile/install.rb +1 -0
- data/lib/r10k/cli/deploy.rb +15 -1
- data/lib/r10k/content_synchronizer.rb +7 -2
- data/lib/r10k/environment.rb +0 -1
- data/lib/r10k/git/rugged/bare_repository.rb +4 -3
- data/lib/r10k/git/rugged/working_repository.rb +7 -5
- data/lib/r10k/git/shellgit/working_repository.rb +1 -1
- data/lib/r10k/git/stateful_repository.rb +2 -2
- data/lib/r10k/module/base.rb +3 -3
- data/lib/r10k/module/git.rb +13 -4
- data/lib/r10k/module_loader/puppetfile.rb +0 -7
- data/lib/r10k/puppetfile.rb +1 -1
- data/lib/r10k/settings.rb +6 -7
- data/lib/r10k/version.rb +1 -1
- data/locales/r10k.pot +10 -6
- data/r10k.gemspec +4 -6
- metadata +18 -76
- data/docker/.gitignore +0 -1
- data/docker/.rspec +0 -4
- data/docker/Gemfile +0 -11
- data/docker/Makefile +0 -99
- data/docker/README.md +0 -28
- data/docker/docker-compose.yml +0 -18
- data/docker/r10k/Dockerfile +0 -68
- data/docker/r10k/adduser.sh +0 -13
- data/docker/r10k/docker-entrypoint.d/10-analytics.sh +0 -30
- data/docker/r10k/docker-entrypoint.sh +0 -10
- data/docker/r10k/release.Dockerfile +0 -55
- data/docker/spec/dockerfile_spec.rb +0 -37
- data/docker/spec/fixtures/Puppetfile +0 -2
- data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +0 -83
- data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +0 -128
- data/integration/tests/purging/invalid_whitelist_types.rb +0 -63
- data/integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb +0 -49
- data/integration/tests/user_scenario/basic_workflow/single_env_module_last_release_deleted.rb +0 -68
- data/lib/r10k/environment/bare.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8209d4d067f8bfb87d3ea39cd66402d17b1b72a9c7ef6047f22ca9b7d2dd7114
|
4
|
+
data.tar.gz: b742aed73430365dec9d82a5007d1d1bef130b932307c2128d1cb08d789735cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c77bbce995d3f69fa1fa2c67bdb1db79c4bcda6f783a365ca7a06d6d3e873e661bdadb9cd4c5637fe8010b92c1081aab7fb93b5ee725aa74339dab70e110039
|
7
|
+
data.tar.gz: 3c694c48a648ca097662568efe27b228ca99610a0f7f6b5f3858459bbc41a0fd805b1a2d9bde707a724c9473327f35ea5c4409f0c71749ce4b26175ec5819f40
|
@@ -0,0 +1,17 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
# raise PRs for gem updates
|
4
|
+
- package-ecosystem: bundler
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: daily
|
8
|
+
time: "13:00"
|
9
|
+
open-pull-requests-limit: 10
|
10
|
+
|
11
|
+
# Maintain dependencies for GitHub Actions
|
12
|
+
- package-ecosystem: github-actions
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: daily
|
16
|
+
time: "13:00"
|
17
|
+
open-pull-requests-limit: 10
|
@@ -17,7 +17,7 @@ jobs:
|
|
17
17
|
runs-on: ubuntu-latest
|
18
18
|
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v3
|
21
21
|
- uses: azure/docker-login@v1
|
22
22
|
with: # This doesn't seem to work unless we point directly to the secrets
|
23
23
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
@@ -27,11 +27,11 @@ jobs:
|
|
27
27
|
with:
|
28
28
|
ruby-version: 2.6.x
|
29
29
|
- run: gem install bundler
|
30
|
-
- uses: actions/checkout@
|
30
|
+
- uses: actions/checkout@v3
|
31
31
|
- name: Set up QEMU
|
32
|
-
uses: docker/setup-qemu-action@
|
32
|
+
uses: docker/setup-qemu-action@v2
|
33
33
|
- name: Set up Docker Buildx
|
34
|
-
uses: docker/setup-buildx-action@
|
34
|
+
uses: docker/setup-buildx-action@v2
|
35
35
|
- name: Build container
|
36
36
|
working-directory: docker
|
37
37
|
run: |
|
@@ -11,11 +11,11 @@ jobs:
|
|
11
11
|
release:
|
12
12
|
runs-on: ubuntu-latest
|
13
13
|
steps:
|
14
|
-
- uses: actions/checkout@
|
14
|
+
- uses: actions/checkout@v3
|
15
15
|
with:
|
16
16
|
fetch-depth: '0'
|
17
17
|
- name: Bump version and push tag
|
18
|
-
uses: anothrNick/github-tag-action@1.
|
18
|
+
uses: anothrNick/github-tag-action@1.67.0
|
19
19
|
env:
|
20
20
|
GITHUB_TOKEN: ${{ secrets.PUPPET_RELEASE_GH_TOKEN }}
|
21
21
|
DEFAULT_BUMP: patch
|
@@ -3,7 +3,7 @@ name: Rspec tests
|
|
3
3
|
on:
|
4
4
|
pull_request:
|
5
5
|
branches:
|
6
|
-
-
|
6
|
+
- 4.x
|
7
7
|
|
8
8
|
jobs:
|
9
9
|
rspec_tests:
|
@@ -11,20 +11,18 @@ jobs:
|
|
11
11
|
strategy:
|
12
12
|
matrix:
|
13
13
|
cfg:
|
14
|
-
- {os: ubuntu-
|
15
|
-
- {os: ubuntu-
|
16
|
-
- {os: ubuntu-
|
17
|
-
- {os: ubuntu-
|
18
|
-
- {os: ubuntu-
|
19
|
-
- {os: ubuntu-18.04, ruby: jruby-9.2.10.0}
|
20
|
-
- {os: windows-2019, ruby: 2.5}
|
14
|
+
- {os: ubuntu-latest, ruby: 2.6}
|
15
|
+
- {os: ubuntu-latest, ruby: 2.7}
|
16
|
+
- {os: ubuntu-latest, ruby: 3.1}
|
17
|
+
- {os: ubuntu-latest, ruby: 3.2}
|
18
|
+
- {os: ubuntu-latest, ruby: jruby-9.3}
|
21
19
|
- {os: windows-2019, ruby: 2.6}
|
22
20
|
- {os: windows-2019, ruby: 2.7}
|
23
21
|
|
24
22
|
runs-on: ${{ matrix.cfg.os }}
|
25
23
|
steps:
|
26
24
|
- name: Checkout current PR
|
27
|
-
uses: actions/checkout@
|
25
|
+
uses: actions/checkout@v3
|
28
26
|
|
29
27
|
- name: Install ruby version ${{ matrix.cfg.ruby }}
|
30
28
|
uses: ruby/setup-ruby@v1
|
@@ -33,8 +31,6 @@ jobs:
|
|
33
31
|
|
34
32
|
- name: Install bundler and gems
|
35
33
|
run: |
|
36
|
-
# Pin bundler to maintain support for Ruby 2.4 and 2.5
|
37
|
-
gem install bundler -v 2.3.26
|
38
34
|
bundle config set without packaging documentation
|
39
35
|
bundle install --jobs 4 --retry 3
|
40
36
|
|
data/.github/workflows/stale.yml
CHANGED
data/CHANGELOG.mkd
CHANGED
@@ -3,6 +3,17 @@ CHANGELOG
|
|
3
3
|
|
4
4
|
Unreleased
|
5
5
|
----------
|
6
|
+
- Update GitHub Actions & introduce dependabot [#1337](https://github.com/puppetlabs/r10k/pull/1337)
|
7
|
+
|
8
|
+
- Drop Ruby 2.3/2.4/2.5 support; puppet_forge: Use 4.1 and newer [#1336](https://github.com/puppetlabs/r10k/pull/1336)
|
9
|
+
|
10
|
+
|
11
|
+
3.16.0
|
12
|
+
------
|
13
|
+
- Emit more debug output when modules fail to sync [#1347](https://github.com/puppetlabs/r10k/pull/1347)
|
14
|
+
- Update GitHub Actions & introduce dependabot [#1337](https://github.com/puppetlabs/r10k/pull/1337)
|
15
|
+
- Update R10K proxy usage to follow newer rugged best practices [PE-35980](https://tickets.puppet.com/browse/PE-35980)
|
16
|
+
- Update Acceptance tests to be compatible with Puppet 8 [#1349](https://github.com/puppetlabs/r10k/pull/1349)
|
6
17
|
|
7
18
|
3.15.4
|
8
19
|
------
|
@@ -22,6 +33,14 @@ Unreleased
|
|
22
33
|
- Add TOC to configuration docs [#1298](https://github.com/puppetlabs/r10k/issues/1298)
|
23
34
|
- Remove the spec folder from gemspec [#1316](https://github.com/puppetlabs/r10k/issues/1316)
|
24
35
|
|
36
|
+
- (RK-368) remove `purge_whitelist` setting [#1277](https://github.com/puppetlabs/r10k/pull/1277)
|
37
|
+
- (RK-390) Remove default ref for deploying git modules [#1275](http://github.com/puppetlabs/r10k/pull/1275)
|
38
|
+
- (RK-391) Change `exclude_spec` default to true for module spec dir deletion [#1264](https://github.com/puppetlabs/r10k/pull/1261)
|
39
|
+
- (maint) Add Ruby 3.0 to rspec CI matrix [#1261](https://github.com/puppetlabs/r10k/pull/1261)
|
40
|
+
- (RK-383) Remove deprecated `basedir` method from Puppetfile DSL. Users should use `environment_name` instead. [#1254](https://github.com/puppetlabs/r10k/pull/1254)
|
41
|
+
- (RK-386) Remove deprecated `bare` environment type. [#1235](https://github.com/puppetlabs/r10k/issues/1235)
|
42
|
+
- Drop EoL Ruby 2.3/2.4 support [#1280](https://github.com/puppetlabs/r10k/pull/1208)
|
43
|
+
|
25
44
|
3.15.0
|
26
45
|
------
|
27
46
|
|
data/Gemfile
CHANGED
@@ -6,10 +6,10 @@ group :extra do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
group :development do
|
9
|
-
gem 'simplecov', '~> 0.
|
9
|
+
gem 'simplecov', '~> 0.17.1'
|
10
10
|
gem 'ruby-prof', :platforms => :ruby
|
11
11
|
end
|
12
12
|
|
13
|
-
if File.
|
13
|
+
if File.exist? "#{__FILE__}.local"
|
14
14
|
eval(File.read("#{__FILE__}.local"), binding)
|
15
15
|
end
|
data/README.mkd
CHANGED
@@ -27,14 +27,14 @@ based alternative.
|
|
27
27
|
Requirements
|
28
28
|
------------
|
29
29
|
|
30
|
-
R10k supports the Ruby versions `>= 2.
|
30
|
+
R10k supports the Ruby versions `>= 2.6.0`. It's tested on Ruby 2.6.0 up to
|
31
31
|
Ruby 3.1.0 + Jruby.
|
32
32
|
|
33
33
|
R10k requires additional components, depending on how you plan on managing
|
34
34
|
environments and modules.
|
35
35
|
|
36
|
-
- Installing modules from the Puppet Forge requires Puppet
|
37
|
-
Puppet
|
36
|
+
- Installing modules from the Puppet Forge requires Puppet 7.0.0+ or later.
|
37
|
+
Puppet 5 and 6 may work, but is generally not recommended.
|
38
38
|
- Git is required for creating environments and modules from Git
|
39
39
|
- SVN is required for creating environments and modules from SVN
|
40
40
|
|
@@ -160,6 +160,18 @@ git:
|
|
160
160
|
See the [git provider documentation](../git/providers.mkd) for more information
|
161
161
|
regarding Git providers.
|
162
162
|
|
163
|
+
#### default_ref
|
164
|
+
|
165
|
+
r10k is unable to deploy a git module if no `ref` is specified. A `default_ref` can be
|
166
|
+
set in the r10k config that will become the ref a module uses if not otherwise specified. This
|
167
|
+
is the lowest priority setting for a module's `ref`. Read the [Puppetfile documentation](../puppetfile.mkd#git)
|
168
|
+
for higher priority settings to determine a module's ref.
|
169
|
+
|
170
|
+
```yaml
|
171
|
+
git:
|
172
|
+
default_ref: main
|
173
|
+
```
|
174
|
+
|
163
175
|
#### proxy
|
164
176
|
|
165
177
|
The 'proxy' setting allows you to set or override the global proxy setting specifically
|
@@ -437,7 +449,7 @@ deploy:
|
|
437
449
|
|
438
450
|
#### exclude_spec
|
439
451
|
|
440
|
-
During module deployment, r10k's default behavior is to
|
452
|
+
During module deployment, r10k's default behavior is to delete the spec directory. Setting
|
441
453
|
`exclude_spec` to true will deploy modules without their spec directory. This behavior
|
442
454
|
can be configured for all modules using the `exclude_spec` setting in the r10k config.
|
443
455
|
It can also be passed as a CLI argument for `deploy environment/module`, overriding the
|
data/doc/puppetfile.mkd
CHANGED
@@ -135,6 +135,12 @@ operations when updating the repo, which can speed up install times. When
|
|
135
135
|
Module versions can also be specified using `:branch` to track a specific
|
136
136
|
branch reference.
|
137
137
|
|
138
|
+
In r10k 3.x the default branch was hardcoded to `master`; in 4.x that was
|
139
|
+
removed. A `default_ref` can be specified in the r10k config to
|
140
|
+
to mimic that old behavior, but it is recommended to set the ref on a
|
141
|
+
per-module basis in the Puppetfile. Read [here](dynamic-environments/configuration.mkd#default_ref) for more info
|
142
|
+
on the `default_ref` setting.
|
143
|
+
|
138
144
|
#### Examples
|
139
145
|
|
140
146
|
```ruby
|
@@ -327,15 +333,15 @@ on managing internal and external modules in the same directory.
|
|
327
333
|
|
328
334
|
### Per-Item spec dir deployment
|
329
335
|
|
330
|
-
During deployment, r10k's default behavior is to
|
336
|
+
During deployment, r10k's default behavior is to delete the spec directory. The
|
331
337
|
Puppetfile can modify this per module, overriding settings from the default
|
332
|
-
r10k config. The following example sets the module to
|
338
|
+
r10k config. The following example sets the module to deploy the spec
|
333
339
|
directory.
|
334
340
|
|
335
341
|
```
|
336
342
|
mod 'apache',
|
337
343
|
:git => 'git@github.com:puppetlabs/puppetlabs-apache.git',
|
338
|
-
:exclude_spec =>
|
344
|
+
:exclude_spec => false
|
339
345
|
```
|
340
346
|
|
341
347
|
### Per-Item Install Path
|
@@ -23,9 +23,6 @@ pe_version = get_puppet_version(master)
|
|
23
23
|
fail_test('This pre-suite requires PE 3.7 or above!') if pe_version < 3.7
|
24
24
|
|
25
25
|
#Setup
|
26
|
-
step 'Stub Forge on Master'
|
27
|
-
stub_forge_on(master)
|
28
|
-
|
29
26
|
step 'Read module path'
|
30
27
|
on(master, puppet('config print basemodulepath')) do |result|
|
31
28
|
(result.stdout.include? ':') ? separator = ':' : separator = ';'
|
@@ -19,7 +19,7 @@ r10k_config_bak_path = "#{r10k_config_path}.bak"
|
|
19
19
|
|
20
20
|
puppetfile =<<-EOS
|
21
21
|
mod 'motd',
|
22
|
-
:git => 'https://github.com/puppetlabs/puppetlabs-motd'
|
22
|
+
:git => 'https://github.com/puppetlabs/puppetlabs-motd', :branch => 'main'
|
23
23
|
EOS
|
24
24
|
|
25
25
|
proxy_env_value = 'http://ferritsarebest.net:3219'
|
@@ -36,7 +36,7 @@ sources:
|
|
36
36
|
CONF
|
37
37
|
|
38
38
|
teardown do
|
39
|
-
master.clear_env_var('
|
39
|
+
master.clear_env_var('HTTPS_PROXY')
|
40
40
|
|
41
41
|
step 'Restore Original "r10k" Config'
|
42
42
|
on(master, "mv #{r10k_config_bak_path} #{r10k_config_path}")
|
@@ -45,7 +45,7 @@ teardown do
|
|
45
45
|
clean_up_r10k(master, last_commit, git_environments_path)
|
46
46
|
end
|
47
47
|
|
48
|
-
master.add_env_var('
|
48
|
+
master.add_env_var('HTTPS_PROXY', proxy_env_value)
|
49
49
|
|
50
50
|
step 'Backup Current "r10k" Config'
|
51
51
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
@@ -64,7 +64,8 @@ git_add_commit_push(master, 'production', 'add Puppetfile', git_environments_pat
|
|
64
64
|
|
65
65
|
#test
|
66
66
|
on(master, "#{r10k_fqp} deploy environment -p", :accept_all_exit_codes => true) do |r|
|
67
|
-
|
67
|
+
# Rugged as of 0.28 has a different error message than shellgit
|
68
|
+
regex = /((failed to resolve address for)|(Could not resolve proxy:)) ferritsarebest\.net/
|
68
69
|
assert(r.exit_code == 1, 'expected error code was not observed')
|
69
70
|
assert_match(regex, r.stderr, 'The expected error message was not observed' )
|
70
71
|
end
|
@@ -21,7 +21,7 @@ remove_squid = "#{pkg_manager} remove -y squid"
|
|
21
21
|
squid_log = "/var/log/squid/access.log"
|
22
22
|
|
23
23
|
#Verification
|
24
|
-
squid_log_regex = /CONNECT forgeapi.
|
24
|
+
squid_log_regex = /CONNECT forgeapi.puppet(labs)?.com:443/
|
25
25
|
|
26
26
|
#Teardown
|
27
27
|
teardown do
|
@@ -16,28 +16,24 @@ r10k_config_bak_path = "#{r10k_config_path}.bak"
|
|
16
16
|
|
17
17
|
puppetfile =<<-EOS
|
18
18
|
mod 'motd',
|
19
|
-
:git
|
19
|
+
:git => 'https://github.com/puppetlabs/puppetlabs-motd', :branch => 'main'
|
20
20
|
EOS
|
21
21
|
|
22
|
-
proxy_env_value = 'http://cattastic.net:3219'
|
23
|
-
|
24
22
|
#In-line files
|
25
23
|
r10k_conf = <<-CONF
|
26
24
|
cachedir: '/var/cache/r10k'
|
27
25
|
git:
|
28
26
|
provider: '#{git_provider}'
|
29
27
|
repositories:
|
30
|
-
- remote: '
|
28
|
+
- remote: 'https://something.else/repo'
|
31
29
|
proxy: 'http://foooooooo.unresolvable:3128'
|
32
30
|
sources:
|
33
31
|
control:
|
34
32
|
basedir: "#{env_path}"
|
35
|
-
remote:
|
33
|
+
remote: 'https://something.else/repo'
|
36
34
|
CONF
|
37
35
|
|
38
36
|
teardown do
|
39
|
-
master.clear_env_var('HTTP_PROXY')
|
40
|
-
|
41
37
|
step 'Restore Original "r10k" Config'
|
42
38
|
on(master, "mv #{r10k_config_bak_path} #{r10k_config_path}")
|
43
39
|
|
@@ -45,8 +41,6 @@ teardown do
|
|
45
41
|
clean_up_r10k(master, last_commit, git_environments_path)
|
46
42
|
end
|
47
43
|
|
48
|
-
master.add_env_var('HTTP_PROXY', proxy_env_value)
|
49
|
-
|
50
44
|
step 'Backup Current "r10k" Config'
|
51
45
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
52
46
|
|
@@ -64,7 +58,8 @@ git_add_commit_push(master, 'production', 'add Puppetfile', git_environments_pat
|
|
64
58
|
|
65
59
|
#test
|
66
60
|
on(master, "#{r10k_fqp} deploy environment -p", :accept_all_exit_codes => true) do |r|
|
67
|
-
|
61
|
+
# Rugged as of 0.28 has a different error message than shellgit
|
62
|
+
regex = /((failed to resolve address for)|(Could not resolve proxy:)) foooooooo\.unresolvable/
|
68
63
|
assert(r.exit_code == 1, 'expected error code was not observed')
|
69
64
|
assert_match(regex, r.stderr, 'The expected error message was not observed' )
|
70
65
|
end
|
@@ -68,6 +68,6 @@ on(master, "chmod 600 #{ssh_private_key_path}")
|
|
68
68
|
|
69
69
|
#Tests
|
70
70
|
step 'Attempt to Deploy via r10k'
|
71
|
-
on(master, "#{r10k_fqp} deploy environment -v", :acceptable_exit_codes => 1) do |result|
|
71
|
+
on(master, "SSH_AUTH_SOCK= SSH_CONNECTION= SSH_CLIENT= #{r10k_fqp} deploy environment -v", :acceptable_exit_codes => 1) do |result|
|
72
72
|
assert_match(error_message_regex, result.stderr, 'Expected message not found!')
|
73
73
|
end
|
@@ -51,9 +51,6 @@ fake_file_b_to_be_left_alone = "#{fake_environment_path_b}/fakefile2.txt"
|
|
51
51
|
fake_file_c_to_be_purged = "#{fake_environment_path_c}/fakefile3.txt"
|
52
52
|
|
53
53
|
# initalize file content
|
54
|
-
step 'Stub the forge'
|
55
|
-
stub_forge_on(master)
|
56
|
-
|
57
54
|
step 'Backup Current "r10k" Config'
|
58
55
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
59
56
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'git_utils'
|
2
2
|
require 'r10k_utils'
|
3
3
|
require 'master_manipulator'
|
4
|
-
test_name 'RK-257 - C98046 - r10k does not purge files on
|
4
|
+
test_name 'RK-257 - C98046 - r10k does not purge files on allowlist'
|
5
5
|
|
6
6
|
#Init
|
7
7
|
env_path = on(master, puppet('config print environmentpath')).stdout.rstrip
|
@@ -26,9 +26,6 @@ teardown do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# initalize file content
|
29
|
-
step 'Stub the forge'
|
30
|
-
stub_forge_on(master)
|
31
|
-
|
32
29
|
step 'Backup Current "r10k" Config'
|
33
30
|
on(master, "mv #{r10k_config_path} #{r10k_config_bak_path}")
|
34
31
|
|
@@ -42,7 +39,7 @@ sources:
|
|
42
39
|
remote: "#{git_control_remote}"
|
43
40
|
deploy:
|
44
41
|
purge_levels: ['deployment', 'environment', 'puppetfile']
|
45
|
-
|
42
|
+
purge_allowlist: ['**/*.pp']
|
46
43
|
CONF
|
47
44
|
|
48
45
|
step 'Update the "r10k" Config'
|
@@ -19,7 +19,7 @@ PUPPETFILE
|
|
19
19
|
puppet_file_path = File.join(git_environments_path, 'Puppetfile')
|
20
20
|
|
21
21
|
#Verification
|
22
|
-
error_message_regex = /Error: Could not connect via HTTPS to https:\/\/forgeapi.
|
22
|
+
error_message_regex = /Error: Could not connect via HTTPS to https:\/\/forgeapi.puppet(labs)?.com/
|
23
23
|
|
24
24
|
#Teardown
|
25
25
|
teardown do
|
@@ -34,7 +34,8 @@ step 'Backup "/etc/hosts" File on Master'
|
|
34
34
|
on(master, "mv #{hosts_file_path} #{hosts_file_path}.bak")
|
35
35
|
|
36
36
|
step 'Point Forge Hostname to Localhost'
|
37
|
-
on(master, "echo '127.0.0.1 forgeapi.
|
37
|
+
on(master, "echo '127.0.0.1 forgeapi.puppet.com' > #{hosts_file_path}")
|
38
|
+
on(master, "echo '127.0.0.1 forgeapi.puppetlabs.com' >> #{hosts_file_path}")
|
38
39
|
|
39
40
|
step 'Checkout "production" Branch'
|
40
41
|
git_on(master, 'checkout production', git_environments_path)
|
data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb
CHANGED
@@ -10,7 +10,7 @@ last_commit = git_last_commit(master, git_environments_path)
|
|
10
10
|
r10k_fqp = get_r10k_fqp(master)
|
11
11
|
|
12
12
|
#Verification
|
13
|
-
error_notification_regex = /The module puppetlabs-regret does not appear to have any published releases/
|
13
|
+
error_notification_regex = /(The module puppetlabs-regret does not appear to have any published releases)|(module puppetlabs-regret does not exist on)/
|
14
14
|
|
15
15
|
#File
|
16
16
|
puppet_file = <<-PUPPETFILE
|
@@ -24,10 +24,6 @@ teardown do
|
|
24
24
|
clean_up_r10k(master, last_commit, git_environments_path)
|
25
25
|
end
|
26
26
|
|
27
|
-
#Setup
|
28
|
-
step 'Stub Forge on Master'
|
29
|
-
stub_forge_on(master)
|
30
|
-
|
31
27
|
#Tests
|
32
28
|
step 'Checkout "production" Branch'
|
33
29
|
git_on(master, 'checkout production', git_environments_path)
|