r10k 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +17 -6
- data/CHANGELOG.mkd +33 -16
- data/azure-pipelines.yml +16 -10
- data/doc/dynamic-environments/usage.mkd +12 -0
- data/docker/.gitignore +1 -0
- data/docker/Gemfile +1 -1
- data/docker/Makefile +47 -0
- data/docker/ci/build.ps1 +81 -13
- data/docker/distelli-manifest.yml +6 -1
- data/docker/r10k/spec/dockerfile_spec.rb +28 -13
- data/docker/r10k/spec/fixtures/Puppetfile +2 -0
- data/integration/Gemfile +2 -2
- data/integration/Rakefile +0 -1
- data/integration/pre-suite/00_pe_install.rb +1 -0
- data/integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb +2 -2
- data/integration/tests/basic_functionality/proxy_with_pe_only_module.rb +2 -2
- data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +2 -12
- data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +2 -11
- data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +2 -12
- data/lib/r10k/action/deploy/environment.rb +2 -2
- data/lib/r10k/cli/deploy.rb +1 -0
- data/lib/r10k/module/git.rb +5 -0
- data/lib/r10k/puppetfile.rb +10 -3
- data/lib/r10k/version.rb +1 -1
- data/locales/r10k.pot +490 -0
- data/spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile +5 -0
- data/spec/unit/action/deploy/environment_spec.rb +4 -0
- data/spec/unit/puppetfile_spec.rb +19 -0
- metadata +6 -4
- data/docker/ci/build +0 -72
- data/integration/pre-suite/30_test_utils.rb +0 -17
@@ -19,6 +19,10 @@ describe R10K::Action::Deploy::Environment do
|
|
19
19
|
described_class.new({puppetfile: true}, [])
|
20
20
|
end
|
21
21
|
|
22
|
+
it "can accept a default_branch_override option" do
|
23
|
+
described_class.new({:'default-branch-override' => 'default_branch_override_name'}, [])
|
24
|
+
end
|
25
|
+
|
22
26
|
it "can accept a no-force option" do
|
23
27
|
described_class.new({:'no-force' => true}, [])
|
24
28
|
end
|
@@ -227,6 +227,25 @@ describe R10K::Puppetfile do
|
|
227
227
|
subject = described_class.new(path)
|
228
228
|
expect { subject.load! }.not_to raise_error
|
229
229
|
end
|
230
|
+
|
231
|
+
it "creates a git module and applies the default branch sepcified in the Puppetfile" do
|
232
|
+
path = File.join(PROJECT_ROOT, 'spec', 'fixtures', 'unit', 'puppetfile', 'default-branch-override')
|
233
|
+
pf_path = File.join(path, 'Puppetfile')
|
234
|
+
subject = described_class.new(path)
|
235
|
+
expect { subject.load! }.not_to raise_error
|
236
|
+
git_module = subject.modules[0]
|
237
|
+
expect(git_module.default_ref).to eq 'here_lies_the_default_branch'
|
238
|
+
end
|
239
|
+
|
240
|
+
it "creates a git module and applies the provided default_branch_override" do
|
241
|
+
path = File.join(PROJECT_ROOT, 'spec', 'fixtures', 'unit', 'puppetfile', 'default-branch-override')
|
242
|
+
pf_path = File.join(path, 'Puppetfile')
|
243
|
+
subject = described_class.new(path)
|
244
|
+
default_branch_override = 'default_branch_override_name'
|
245
|
+
expect { subject.load!(default_branch_override) }.not_to raise_error
|
246
|
+
git_module = subject.modules[0]
|
247
|
+
expect(git_module.default_ref).to eq default_branch_override
|
248
|
+
end
|
230
249
|
end
|
231
250
|
|
232
251
|
describe "accepting a visitor" do
|
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: 3.0.
|
4
|
+
version: 3.0.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:
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -187,13 +187,15 @@ files:
|
|
187
187
|
- doc/git/providers.mkd
|
188
188
|
- doc/puppetfile.mkd
|
189
189
|
- doc/updating-your-puppetfile.mkd
|
190
|
+
- docker/.gitignore
|
190
191
|
- docker/.rspec
|
191
192
|
- docker/Gemfile
|
192
|
-
- docker/
|
193
|
+
- docker/Makefile
|
193
194
|
- docker/ci/build.ps1
|
194
195
|
- docker/distelli-manifest.yml
|
195
196
|
- docker/r10k/Dockerfile
|
196
197
|
- docker/r10k/spec/dockerfile_spec.rb
|
198
|
+
- docker/r10k/spec/fixtures/Puppetfile
|
197
199
|
- integration/Gemfile
|
198
200
|
- integration/README.mkd
|
199
201
|
- integration/Rakefile
|
@@ -215,7 +217,6 @@ files:
|
|
215
217
|
- integration/pre-suite/00_pe_install.rb
|
216
218
|
- integration/pre-suite/10_git_config.rb
|
217
219
|
- integration/pre-suite/20_pe_r10k.rb
|
218
|
-
- integration/pre-suite/30_test_utils.rb
|
219
220
|
- integration/pre-suite/README.mkd
|
220
221
|
- integration/scripts/README.mkd
|
221
222
|
- integration/scripts/setup_r10k_env_centos5.sh
|
@@ -402,6 +403,7 @@ files:
|
|
402
403
|
- spec/fixtures/module/forge/eight_hundred/Modulefile
|
403
404
|
- spec/fixtures/module/forge/eight_hundred/metadata.json
|
404
405
|
- spec/fixtures/unit/puppetfile/argument-error/Puppetfile
|
406
|
+
- spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile
|
405
407
|
- spec/fixtures/unit/puppetfile/duplicate-module-error/Puppetfile
|
406
408
|
- spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile
|
407
409
|
- spec/fixtures/unit/puppetfile/load-error/Puppetfile
|
data/docker/ci/build
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
set -eux
|
4
|
-
|
5
|
-
PATH=$PATH:/usr/local/bin
|
6
|
-
BUNDLER_PATH=.bundle/gems
|
7
|
-
|
8
|
-
function build_and_test_image() {
|
9
|
-
container_name="$1"
|
10
|
-
|
11
|
-
: ===
|
12
|
-
: === run linter on the docker files
|
13
|
-
: ===
|
14
|
-
bundle exec puppet-docker local-lint "$container_name"
|
15
|
-
|
16
|
-
: ===
|
17
|
-
: === build and test $container_name
|
18
|
-
: ===
|
19
|
-
bundle exec puppet-docker build "$container_name" --no-cache --repository puppet --version "$version"
|
20
|
-
bundle exec puppet-docker spec "$container_name" --image "puppet/$container_name:$version"
|
21
|
-
}
|
22
|
-
|
23
|
-
function push_image() {
|
24
|
-
container_name="$1"
|
25
|
-
container_version="$2"
|
26
|
-
: ===
|
27
|
-
: === push $container_name
|
28
|
-
: ===
|
29
|
-
bundle exec puppet-docker push "$container_name" --repository puppet --version "$container_version"
|
30
|
-
}
|
31
|
-
|
32
|
-
: ===
|
33
|
-
: === bundle install to get ready
|
34
|
-
: ===
|
35
|
-
bundle install --path "$BUNDLER_PATH"
|
36
|
-
|
37
|
-
: ===
|
38
|
-
: === If we do not git pull --unshallow we get really weird results with git describe
|
39
|
-
: ===
|
40
|
-
git pull --unshallow
|
41
|
-
|
42
|
-
: ===
|
43
|
-
: === make sure we fetch tags for versioning
|
44
|
-
: ===
|
45
|
-
git fetch origin 'refs/tags/*:refs/tags/*'
|
46
|
-
git_describe=`git describe`
|
47
|
-
version="${git_describe%%-*}"
|
48
|
-
|
49
|
-
: ===
|
50
|
-
: === pull updated base images
|
51
|
-
: ===
|
52
|
-
bundle exec puppet-docker update-base-images ubuntu:16.04
|
53
|
-
|
54
|
-
container_list=(r10k)
|
55
|
-
|
56
|
-
: ===
|
57
|
-
: === build and test all the images before we push anything
|
58
|
-
: ===
|
59
|
-
for container in "${container_list[@]}"; do
|
60
|
-
build_and_test_image "$container"
|
61
|
-
done
|
62
|
-
|
63
|
-
: ===
|
64
|
-
: === push all the images
|
65
|
-
: ===
|
66
|
-
for container in "${container_list[@]}"; do
|
67
|
-
push_image "$container" "$version"
|
68
|
-
done
|
69
|
-
|
70
|
-
: ===
|
71
|
-
: === SUCCESS
|
72
|
-
: ===
|
@@ -1,17 +0,0 @@
|
|
1
|
-
test_name 'CODEMGMT-62 - C63199 - Install Utilities for r10k Integration Testing'
|
2
|
-
|
3
|
-
#Init
|
4
|
-
filebucket_path = '/opt/filebucket'
|
5
|
-
filebucket_script_path = '/etc/profile.d/filebucket_path.sh'
|
6
|
-
|
7
|
-
filebucket_script = <<-SCRIPT
|
8
|
-
#!/bin/bash
|
9
|
-
export PATH="${PATH}:#{filebucket_path}"
|
10
|
-
SCRIPT
|
11
|
-
|
12
|
-
step 'Install "filebucket" File Generator'
|
13
|
-
create_remote_file(master, filebucket_script_path, filebucket_script)
|
14
|
-
on(master, "git clone git://github.com/puppetlabs/filebucket.git #{filebucket_path}")
|
15
|
-
|
16
|
-
on(master, "chmod 755 #{filebucket_script_path}")
|
17
|
-
on(master, "chmod 755 #{filebucket_path}/filebucketapp.py")
|