r10k 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -11
- data/CHANGELOG.mkd +68 -35
- data/CODEOWNERS +1 -0
- data/README.mkd +0 -6
- data/azure-pipelines.yml +58 -58
- data/doc/dynamic-environments/usage.mkd +12 -0
- data/doc/faq.mkd +6 -1
- data/docker/Gemfile +4 -14
- data/docker/Makefile +6 -7
- data/docker/r10k/Dockerfile +15 -5
- data/docker/{r10k/spec → spec}/dockerfile_spec.rb +1 -10
- data/docker/{r10k/spec → spec}/fixtures/Puppetfile +0 -0
- data/lib/r10k/action/deploy/environment.rb +20 -2
- data/lib/r10k/cli/deploy.rb +1 -0
- data/lib/r10k/forge/module_release.rb +51 -33
- data/lib/r10k/module/git.rb +5 -0
- data/lib/r10k/puppetfile.rb +28 -5
- data/lib/r10k/util/platform.rb +12 -0
- data/lib/r10k/version.rb +1 -1
- data/locales/r10k.pot +10 -6
- data/r10k.gemspec +1 -1
- data/spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile +5 -0
- data/spec/unit/action/deploy/environment_spec.rb +63 -0
- data/spec/unit/forge/module_release_spec.rb +63 -27
- data/spec/unit/puppetfile_spec.rb +19 -0
- metadata +8 -8
- data/docker/ci/build.ps1 +0 -108
- data/integration/tests/basic_functionality/negative/attempt_to_install_peonly_module_without_license.rb +0 -71
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32b4ab214210ba825f405bd3272d15693c253b7
|
4
|
+
data.tar.gz: 8a6ff6f3dc4ea0d1a1ad7d50bf23a2ead7a2d805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18d09be0beed3f7da6323fa76ceea9093bd69899664e617a4035a8c4de76b92f632ba94f1ab5edd6b17f9443ecbe5dcb71114b737b1213043e468c44d24c210
|
7
|
+
data.tar.gz: 604ded22aa744ebac83ef3d39991e84ced2c589627f05ae26bf9afe3ae92ecd58ac962d49a0b9efc96dbf43a8da1934155f2feb35dea9bb15917b66de1910af0
|
data/.travis.yml
CHANGED
@@ -8,7 +8,7 @@ notifications:
|
|
8
8
|
email: false
|
9
9
|
sudo: false
|
10
10
|
jdk:
|
11
|
-
|
11
|
+
- openjdk8
|
12
12
|
before_install: gem install bundler -v '< 2' --no-document
|
13
13
|
matrix:
|
14
14
|
include:
|
@@ -23,17 +23,8 @@ matrix:
|
|
23
23
|
- stage: r10k container tests
|
24
24
|
language: ruby
|
25
25
|
rvm: 2.5.5
|
26
|
-
env:
|
27
|
-
- DOCKER_COMPOSE_VERSION=1.24.0
|
28
26
|
script:
|
29
27
|
- |
|
30
28
|
set -ex
|
31
|
-
|
32
|
-
curl --location https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname --kernel-name`-`uname --machine` > docker-compose
|
33
|
-
chmod +x docker-compose
|
34
|
-
sudo mv docker-compose /usr/local/bin
|
35
|
-
cd docker
|
36
|
-
make lint
|
37
|
-
make build
|
38
|
-
make test
|
29
|
+
cd docker && make lint build test
|
39
30
|
set +x
|
data/CHANGELOG.mkd
CHANGED
@@ -1,98 +1,122 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
3.3.1
|
5
|
+
-----
|
6
|
+
|
7
|
+
### Changes
|
8
|
+
|
9
|
+
- Updated thread pool error handling and logging
|
10
|
+
|
4
11
|
3.3.0
|
5
12
|
-----
|
6
13
|
|
7
|
-
|
14
|
+
### New Feature
|
8
15
|
|
9
|
-
Adds support for installing modules concurrently
|
16
|
+
- Adds support for installing modules concurrently
|
10
17
|
|
11
|
-
|
18
|
+
### Bug Fixes
|
12
19
|
|
13
|
-
(RK-343) Pins CRI dependency to 2.15.6 to resolve regression in options
|
20
|
+
- (RK-343) Pins CRI dependency to 2.15.6 to resolve regression in options
|
14
21
|
parsing.
|
15
22
|
|
23
|
+
3.2.1
|
24
|
+
----
|
25
|
+
|
26
|
+
### Changes
|
27
|
+
|
28
|
+
- Flag for overriding default branch configuration in Puppetfile
|
29
|
+
- Plumbing for internationalization
|
30
|
+
- Numerous test fixes and legacy docker work
|
31
|
+
|
16
32
|
3.2.0
|
17
33
|
-----
|
18
34
|
|
19
|
-
|
35
|
+
### Changes
|
20
36
|
|
21
|
-
Add support for running `puppet generate types`
|
37
|
+
- Add support for running `puppet generate types`
|
22
38
|
|
23
39
|
3.1.1
|
24
40
|
-----
|
25
41
|
|
26
|
-
|
42
|
+
### Changes
|
27
43
|
|
28
|
-
(RK-335) Postrun `modifiedenvs` doesn't include environment prefixes
|
44
|
+
- (RK-335) Postrun `modifiedenvs` doesn't include environment prefixes
|
29
45
|
|
30
46
|
3.1.0
|
31
47
|
-----
|
32
48
|
|
33
|
-
|
49
|
+
### Changes
|
50
|
+
|
51
|
+
- Substitute environments acted on in postrun command.
|
34
52
|
|
35
|
-
|
53
|
+
Now post run commands that contain the string "$modifiedenvs"
|
54
|
+
(eg. ["/usr/local/bin/my-postrun-cmd", "--verbose", "$modifiedenvs"])
|
55
|
+
will have the string substituted with a space separated list
|
56
|
+
of environments acted upon (either a single environment if
|
57
|
+
specified on the command line or all environments).
|
36
58
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
of environments acted upon (either a single environment if
|
41
|
-
specified on the command line or all environments).
|
59
|
+
Specifically this should allow users to easily wrap
|
60
|
+
`puppet generate types` and matches the terminology used
|
61
|
+
in g10k.
|
42
62
|
|
43
|
-
|
44
|
-
`puppet generate types` and matches the terminology used
|
45
|
-
in g10k.
|
63
|
+
Many thanks to @raphink for the contribution.
|
46
64
|
|
47
|
-
|
65
|
+
3.0.4
|
66
|
+
----
|
67
|
+
|
68
|
+
### Changes
|
48
69
|
|
70
|
+
- Flag for overriding default branch configuration in Puppetfile
|
71
|
+
- Plumbing for internationalization
|
72
|
+
- Numerous test fixes and legacy docker work
|
49
73
|
|
50
74
|
3.0.3
|
51
75
|
----
|
52
76
|
|
53
|
-
|
77
|
+
### Changes
|
54
78
|
|
55
|
-
(RK-324) Fix Ruby pipe bug affecting Ubuntu
|
79
|
+
- (RK-324) Fix Ruby pipe bug affecting Ubuntu
|
56
80
|
|
57
81
|
3.0.2
|
58
82
|
----
|
59
83
|
|
60
|
-
|
84
|
+
### Changes
|
61
85
|
|
62
|
-
Minor test fixes.
|
86
|
+
- Minor test fixes.
|
63
87
|
|
64
88
|
3.0.1
|
65
89
|
----
|
66
90
|
|
67
|
-
|
91
|
+
### Changes
|
68
92
|
|
69
93
|
Because of dependency issues R10K 3.0.0 required Ruby >= 2.3
|
70
94
|
rather than the reported 2.0. This release makes the requirement of
|
71
95
|
Ruby >= 2.3 official and documented.
|
72
96
|
|
73
|
-
(#853) ([RK-327](https://tickets.puppetlabs.com/browse/RK-327) Uninitialized Constant Cri::Error
|
74
|
-
|
75
|
-
|
76
|
-
|
97
|
+
- (#853) ([RK-327](https://tickets.puppetlabs.com/browse/RK-327) Uninitialized Constant Cri::Error
|
98
|
+
When resolving the Cri dependency >= 2.13 R10K would fail with an
|
99
|
+
uninitialized constant error. Thanks to @ostavnaas for the bug report,
|
100
|
+
@ddfreyne for the fix, and @baurmatt for the review.
|
77
101
|
|
78
102
|
|
79
103
|
3.0.0
|
80
104
|
----
|
81
105
|
|
82
|
-
|
106
|
+
### Changes
|
83
107
|
|
84
|
-
|
108
|
+
#### Known issues
|
85
109
|
- Child processes may die unexpectedly when deploying many environments
|
86
110
|
on Ubuntu Bionic. See
|
87
111
|
[RK-324](https://tickets.puppetlabs.com/browse/RK-324).
|
88
112
|
|
89
|
-
|
113
|
+
#### Backwards breaking changes
|
90
114
|
- Drop support for Ruby < 2.0
|
91
115
|
- Remove support for PUPPETFILE and PUPPETFILE_DIR environment variables
|
92
116
|
when running the `puppetfile` action, please use flags instead.
|
93
117
|
- Fail when duplicate module definitions in Puppetfile
|
94
118
|
|
95
|
-
|
119
|
+
#### Bug fixes
|
96
120
|
- More reliable pruning of refs on fetch
|
97
121
|
- Improved error messaging when:
|
98
122
|
- Unable to connect to a proxy
|
@@ -100,24 +124,32 @@ Ruby >= 2.3 official and documented.
|
|
100
124
|
- Unable to parse Puppetfile
|
101
125
|
- Various perfomance improvements
|
102
126
|
|
127
|
+
2.6.6
|
128
|
+
----
|
129
|
+
|
130
|
+
### Changes
|
131
|
+
- Flag for overriding default branch configuration in Puppetfile
|
132
|
+
- Plumbing for internationalization
|
133
|
+
- Numerous test fixes and legacy docker work
|
103
134
|
|
104
135
|
2.6.5
|
105
136
|
----
|
106
137
|
|
107
|
-
|
138
|
+
### Bug Fix
|
108
139
|
|
109
140
|
(RK-324) Fix Ruby pipe bug affecting Ubuntu
|
110
141
|
|
111
142
|
2.6.4
|
112
143
|
----
|
113
144
|
|
114
|
-
|
145
|
+
### Changes
|
115
146
|
|
116
147
|
Numerous test fixes.
|
117
148
|
|
118
149
|
2.6.3
|
119
150
|
----
|
120
|
-
|
151
|
+
|
152
|
+
### Changes
|
121
153
|
|
122
154
|
Update specs with new error string.
|
123
155
|
|
@@ -126,6 +158,7 @@ when a release is made on that branch.
|
|
126
158
|
|
127
159
|
2.6.2
|
128
160
|
-----
|
161
|
+
|
129
162
|
### Changes
|
130
163
|
|
131
164
|
(RK-311) Yard dependency updated for security fix.
|
data/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/docker/ @puppetlabs/pupperware
|
data/README.mkd
CHANGED
@@ -105,12 +105,6 @@ Getting help
|
|
105
105
|
* Mailing lists: [puppet-users](https://groups.google.com/forum/#!forum/puppet-users)
|
106
106
|
* Q&A: [Puppet Ask](https://ask.puppetlabs.com/questions/)
|
107
107
|
|
108
|
-
|
109
|
-
More information
|
110
|
-
----------------
|
111
|
-
|
112
|
-
The original impetus for r10k is explained at http://somethingsinistral.net/blog/rethinking-puppet-deployment/
|
113
|
-
|
114
108
|
Contributors
|
115
109
|
------------
|
116
110
|
|
data/azure-pipelines.yml
CHANGED
@@ -1,80 +1,80 @@
|
|
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
|
+
|
1
10
|
pool:
|
2
|
-
# self-hosted agent on Windows 10
|
11
|
+
# self-hosted agent on Windows 10 1903 environment
|
3
12
|
# includes newer Docker engine with LCOW enabled, new build of LCOW image
|
4
|
-
# includes Ruby 2.5, Go 1.10, Node.js 10.10
|
13
|
+
# includes Ruby 2.5, Go 1.10, Node.js 10.10
|
5
14
|
name: Default
|
6
15
|
|
7
16
|
variables:
|
8
17
|
NAMESPACE: puppet
|
18
|
+
CONTAINER_NAME: r10k
|
19
|
+
CONTAINER_BUILD_PATH: .
|
20
|
+
LINT_IGNORES: DL3008 DL3018 DL4000 DL4001 DL3028
|
21
|
+
|
22
|
+
workspace:
|
23
|
+
clean: resources
|
9
24
|
|
10
25
|
steps:
|
11
|
-
- checkout: self
|
12
|
-
clean: true
|
26
|
+
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
27
|
+
clean: true # whether to fetch clean each time
|
28
|
+
|
13
29
|
- powershell: |
|
14
|
-
$
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
$
|
24
|
-
|
25
|
-
if ($assetTag -eq '7783-7084-3265-9085-8269-3286-77')
|
26
|
-
{
|
27
|
-
Write-Host "`n`n$line`nAzure`n$line`n"
|
28
|
-
Invoke-RestMethod -Headers @{'Metadata'='true'} -URI http://169.254.169.254/metadata/instance?api-version=2017-12-01 -Method Get |
|
29
|
-
ConvertTo-Json -Depth 10 |
|
30
|
-
Write-Host
|
31
|
-
}
|
32
|
-
#
|
33
|
-
# Docker
|
34
|
-
#
|
35
|
-
Write-Host "`n`n$line`nDocker`n$line`n"
|
36
|
-
docker version
|
37
|
-
docker images
|
38
|
-
docker info
|
39
|
-
sc.exe qc docker
|
40
|
-
#
|
41
|
-
# Ruby
|
42
|
-
#
|
43
|
-
Write-Host "`n`n$line`nRuby`n$line`n"
|
44
|
-
ruby --version
|
45
|
-
gem --version
|
46
|
-
gem env
|
47
|
-
bundle --version
|
48
|
-
#
|
49
|
-
# Environment
|
50
|
-
#
|
51
|
-
Write-Host "`n`n$line`nEnvironment`n$line`n"
|
52
|
-
Get-ChildItem Env: | % { Write-Host "$($_.Key): $($_.Value)" }
|
30
|
+
$gemfile = Join-Path -Path (Get-Location) -ChildPath 'docker/Gemfile'
|
31
|
+
$gempath = Join-Path -Path (Get-Location) -ChildPath 'docker/.bundle/gems'
|
32
|
+
bundle config --local gemfile $gemfile
|
33
|
+
bundle config --local path $gempath
|
34
|
+
bundle install
|
35
|
+
displayName: Fetch Dependencies
|
36
|
+
name: fetch_deps
|
37
|
+
|
38
|
+
- powershell: |
|
39
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
40
|
+
Write-HostDiagnostics
|
53
41
|
displayName: Diagnostic Host Information
|
54
42
|
name: hostinfo
|
43
|
+
|
55
44
|
- powershell: |
|
56
|
-
.
|
57
|
-
Lint-Dockerfile -
|
58
|
-
displayName: Lint
|
45
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
46
|
+
Lint-Dockerfile -Name $ENV:CONTAINER_NAME -Ignore ($ENV:LINT_IGNORES -split ' ')
|
47
|
+
displayName: Lint $(CONTAINER_NAME) Dockerfile
|
59
48
|
name: lint_dockerfile
|
49
|
+
|
50
|
+
- powershell: |
|
51
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
52
|
+
Build-Container -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE -PathOrUri $ENV:CONTAINER_BUILD_PATH
|
53
|
+
displayName: Build $(CONTAINER_NAME) Container
|
54
|
+
name: build_container
|
55
|
+
|
60
56
|
- powershell: |
|
61
|
-
.
|
62
|
-
|
63
|
-
displayName:
|
64
|
-
name:
|
57
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
58
|
+
Initialize-TestEnv
|
59
|
+
displayName: Prepare Test Environment
|
60
|
+
name: test_prepare
|
61
|
+
|
65
62
|
- powershell: |
|
66
|
-
.
|
67
|
-
Invoke-ContainerTest -Namespace $ENV:NAMESPACE
|
68
|
-
displayName: Test
|
69
|
-
name:
|
63
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
64
|
+
Invoke-ContainerTest -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE
|
65
|
+
displayName: Test $(CONTAINER_NAME)
|
66
|
+
name: test_container
|
67
|
+
|
70
68
|
- task: PublishTestResults@2
|
71
|
-
displayName: Publish
|
69
|
+
displayName: Publish $(CONTAINER_NAME) test results
|
72
70
|
inputs:
|
73
71
|
testResultsFormat: 'JUnit'
|
74
72
|
testResultsFiles: 'docker/TEST-*.xml'
|
75
|
-
testRunTitle:
|
73
|
+
testRunTitle: $(CONTAINER_NAME) Test Results
|
74
|
+
|
76
75
|
- powershell: |
|
77
|
-
.
|
78
|
-
Clear-
|
76
|
+
. "$(bundle show pupperware)/ci/build.ps1"
|
77
|
+
Clear-BuildState -Name $ENV:CONTAINER_NAME -Namespace $ENV:NAMESPACE
|
79
78
|
displayName: Container Cleanup
|
79
|
+
timeoutInMinutes: 3
|
80
80
|
condition: always()
|
@@ -60,6 +60,18 @@ Update a single environment and force an update of modules:
|
|
60
60
|
This will update the given environment and update all contained modules. This is
|
61
61
|
useful if you want to make sure that a given environment is fully up to date.
|
62
62
|
|
63
|
+
- - -
|
64
|
+
|
65
|
+
Update a single environment and specify a default branch override:
|
66
|
+
|
67
|
+
r10k deploy environment my_working_environment --puppetfile --default-branch-override default_branch_override
|
68
|
+
|
69
|
+
This will update the given environment and update all contained modules, overrideing
|
70
|
+
the :default_branch entry in the Puppetfile of each module. This is used primarily to allow
|
71
|
+
automated r10k solutions using the control_branch pattern with a temporary branch deployment to
|
72
|
+
ensure the deployment is pushed to the correct module repository branch. Note that the :default_branch
|
73
|
+
is only ever utilized if the desired ref cannot be located.
|
74
|
+
|
63
75
|
### Deploying modules
|
64
76
|
|
65
77
|
Update a single module across all environments:
|
data/doc/faq.mkd
CHANGED
@@ -151,4 +151,9 @@ modulepath = internal-modules:modules
|
|
151
151
|
|
152
152
|
#### What does the name mean?
|
153
153
|
|
154
|
-
It
|
154
|
+
It’s called R10K because I’m terrible at names. When I started working on R10K
|
155
|
+
I couldn’t come up with a decent name. While trying to come up with something
|
156
|
+
clever, I recalled that Randall Munroe wrote a bot for [controlling IRC chatter](http://blog.xkcd.com/2008/01/14/robot9000-and-xkcd-signal-attacking-noise-in-chat/),
|
157
|
+
and gave it the most generic name he could think of - Robot 9000. Since I just
|
158
|
+
needed a name, any name, I decided to go with an equally generic name by
|
159
|
+
incrementing the robot index.
|
data/docker/Gemfile
CHANGED
@@ -1,18 +1,8 @@
|
|
1
|
-
source
|
2
|
-
|
3
|
-
def location_for(place, fake_version = nil)
|
4
|
-
if place =~ /^((?:git|https?)[:@][^#]*)#(.*)/
|
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
|
1
|
+
source "https://rubygems.org"
|
12
2
|
|
13
3
|
gem 'rspec'
|
14
4
|
gem 'rspec_junit_formatter'
|
15
5
|
gem 'pupperware',
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
:git => 'https://github.com/puppetlabs/pupperware.git',
|
7
|
+
:branch => 'master',
|
8
|
+
:glob => 'gem/*.gemspec'
|