r10k 3.0.2 → 3.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6281d4bfac7643c0d48ac1b282c7d6f8e957c8a9
4
- data.tar.gz: a72916e0b6cad77bd8e4936c3aa2ead9c2841656
3
+ metadata.gz: 86a62176969a42b8de330d9f940f8a70b2ddde34
4
+ data.tar.gz: 630a698650dd7633ea5af47c01d2da9e3b4bbce9
5
5
  SHA512:
6
- metadata.gz: 6d39ac8d7dac530a97728cfcf264d5f2e17f5649331b9638b3b11ec599f2f5701b0b7a6567f6994af082880e55d265fda84138439bc4539abe2a59045f89cdfe
7
- data.tar.gz: e91d47a1ebe85a73731b8b9068931f17b9358ce523d6519c81eaa16cc4ff27b014127e78a2a558c5892e7cc1cce21f51984110ca53fd73d81641d8f653388b4b
6
+ metadata.gz: 88539ba2554f8a4cd81e768598aa242907d59ac1a1cfffcf5a192f9e4b8e2458beece89673615be5336f3d02478cf0ebd2d55d2f372f4bfe864a070cf598f20c
7
+ data.tar.gz: cac1fc4ca0ac0b9c8b9ec6aabcb8a1d3596ddfad2e551649895144bcf9458469850641ed9e42a441138c429ba0072482365d8fde2d425b349f136d0af003db38
@@ -0,0 +1 @@
1
+ docker/r10k/* text eol=lf
@@ -1,6 +1,20 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 3.0.3
5
+ ----
6
+
7
+ ## Bug Fixes
8
+
9
+ (RK-324) Fix Ruby pipe bug affecting Ubuntu
10
+
11
+ 3.0.2
12
+ ----
13
+
14
+ ## Changes
15
+
16
+ Minor test fixes.
17
+
4
18
  3.0.1
5
19
  ----
6
20
 
@@ -41,6 +55,12 @@ Ruby >= 2.3 official and documented.
41
55
  - Various perfomance improvements
42
56
 
43
57
 
58
+ 2.6.5
59
+ ----
60
+
61
+ ## Bug Fix
62
+
63
+ (RK-324) Fix Ruby pipe bug affecting Ubuntu
44
64
 
45
65
  2.6.4
46
66
  ----
@@ -0,0 +1,72 @@
1
+ pool:
2
+ # self-hosted agent on Windows 10 1709 environment
3
+ # includes newer Docker engine with LCOW enabled, new build of LCOW image
4
+ # includes Ruby 2.5, Go 1.10, Node.js 10.10, hadolint
5
+ name: Default
6
+
7
+ variables:
8
+ BUILD_REPOSITORY: 127.0.0.1
9
+
10
+ steps:
11
+ - powershell: |
12
+ $line = '=' * 80
13
+ Write-Host "$line`nWindows`n$line`n"
14
+ Get-ComputerInfo |
15
+ select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer |
16
+ Out-String |
17
+ Write-Host
18
+ #
19
+ # Azure
20
+ #
21
+ Write-Host "`n`n$line`nAzure`n$line`n"
22
+ Invoke-RestMethod -Headers @{'Metadata'='true'} -URI http://169.254.169.254/metadata/instance?api-version=2017-12-01 -Method Get |
23
+ ConvertTo-Json -Depth 10 |
24
+ Write-Host
25
+ #
26
+ # Docker
27
+ #
28
+ Write-Host "`n`n$line`nDocker`n$line`n"
29
+ docker version
30
+ docker images
31
+ docker info
32
+ sc.exe qc docker
33
+ #
34
+ # Ruby
35
+ #
36
+ Write-Host "`n`n$line`nRuby`n$line`n"
37
+ ruby --version
38
+ gem --version
39
+ bundle --version
40
+ #
41
+ # Environment
42
+ #
43
+ Write-Host "`n`n$line`nEnvironment`n$line`n"
44
+ Get-ChildItem Env: | % { Write-Host "$($_.Key): $($_.Value)" }
45
+ displayName: Diagnostic Host Information
46
+ name: hostinfo
47
+ - powershell: |
48
+ . ./docker/ci/build.ps1
49
+ Invoke-ContainerBuildSetup
50
+ displayName: Prepare Build Environment
51
+ name: build_prepare
52
+ - powershell: |
53
+ . ./docker/ci/build.ps1
54
+ Build-Container -Name r10k -Repository $ENV:BUILD_REPOSITORY
55
+ displayName: Build r10k
56
+ name: build_r10k
57
+ - powershell: |
58
+ . ./docker/ci/build.ps1
59
+ Invoke-ContainerTest -Name r10k -Repository $ENV:BUILD_REPOSITORY
60
+ displayName: Test r10k
61
+ name: test_r10k
62
+ - task: PublishTestResults@2
63
+ displayName: Publish r10k test results
64
+ inputs:
65
+ testResultsFormat: 'JUnit'
66
+ testResultsFiles: 'docker/**/TEST-*.xml'
67
+ testRunTitle: r10k Test Results
68
+ - powershell: |
69
+ . ./docker/ci/build.ps1
70
+ Clear-ContainerBuilds
71
+ displayName: Container Cleanup
72
+ condition: always()
@@ -0,0 +1,3 @@
1
+ --format RspecJunitFormatter
2
+ --out TEST-rspec.xml
3
+ --format documentation
@@ -1,8 +1,8 @@
1
1
  source ENV['GEM_SOURCE'] || "https://rubygems.org"
2
2
 
3
- def location_for(place)
3
+ def location_for(place, fake_version = nil)
4
4
  if place =~ /^((?:git|https?)[:@][^#]*)#(.*)/
5
- [{ :git => $1, :branch => $2, :require => false }]
5
+ [fake_version, { :git => $1, :branch => $2, :require => false }].compact
6
6
  elsif place =~ /^file:\/\/(.*)/
7
7
  ['>= 0', { :path => File.expand_path($1), :require => false }]
8
8
  else
@@ -10,4 +10,5 @@ def location_for(place)
10
10
  end
11
11
  end
12
12
 
13
- gem 'puppet_docker_tools', *location_for(ENV['PUPPET_DOCKER_LOCATION'] || '~> 0.1.5')
13
+ gem 'puppet_docker_tools', *location_for(ENV['PUPPET_DOCKER_LOCATION'] || '~> 0.2')
14
+ gem 'rspec_junit_formatter'
@@ -17,7 +17,7 @@ function build_and_test_image() {
17
17
  : === build and test $container_name
18
18
  : ===
19
19
  bundle exec puppet-docker build "$container_name" --no-cache --repository puppet --version "$version"
20
- bundle exec puppet-docker spec "$container_name"
20
+ bundle exec puppet-docker spec "$container_name" --image "puppet/$container_name:$version"
21
21
  }
22
22
 
23
23
  function push_image() {
@@ -0,0 +1,38 @@
1
+ $ErrorActionPreference = 'Stop'
2
+
3
+ function Get-CurrentDirectory
4
+ {
5
+ $thisName = $MyInvocation.MyCommand.Name
6
+ [IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
7
+ }
8
+
9
+ # installs gems for build and test and grabs base images
10
+ function Invoke-ContainerBuildSetup
11
+ {
12
+ Push-Location (Get-CurrentDirectory)
13
+ bundle install --path '.bundle/gems'
14
+ bundle exec puppet-docker update-base-images ubuntu:16.04
15
+ Pop-Location
16
+ }
17
+
18
+ function Build-Container($Name, $Repository = '127.0.0.1')
19
+ {
20
+ Push-Location (Join-Path (Get-CurrentDirectory) '..')
21
+ bundle exec puppet-docker local-lint $Name
22
+ bundle exec puppet-docker build $Name --no-cache --repository $Repository --build-arg namespace=$Repository
23
+ Pop-Location
24
+ }
25
+
26
+ function Invoke-ContainerTest($Name, $Repository = '127.0.0.1')
27
+ {
28
+ Push-Location (Join-Path (Get-CurrentDirectory) '..')
29
+ bundle exec puppet-docker spec $Name --image $Repository/$Name
30
+ Pop-Location
31
+ }
32
+
33
+ # removes any temporary containers / images used during builds
34
+ function Clear-ContainerBuilds
35
+ {
36
+ docker container prune --force
37
+ docker image prune --filter "dangling=true" --force
38
+ }
@@ -4,13 +4,21 @@ CURRENT_DIRECTORY = File.dirname(File.dirname(__FILE__))
4
4
 
5
5
  describe 'Dockerfile' do
6
6
  include_context 'with a docker image'
7
+ include_context 'with a docker container' do
8
+ def docker_run_options
9
+ '--entrypoint /bin/bash'
10
+ end
11
+ end
12
+
13
+ describe 'uses the correct version of Ubuntu' do
14
+ it_should_behave_like 'a running container', 'cat /etc/lsb-release', nil, 'Ubuntu 16.04'
15
+ end
7
16
 
8
- describe package('puppet-agent') do
9
- it { is_expected.to be_installed }
17
+ describe 'has puppet-agent installed' do
18
+ it_should_behave_like 'a running container', 'dpkg -l puppet-agent', 0
10
19
  end
11
20
 
12
- describe file('/opt/puppetlabs/puppet/bin/r10k') do
13
- it { should exist }
14
- it { should be_executable }
21
+ describe 'has /opt/puppetlabs/puppet/bin/r10k' do
22
+ it_should_behave_like 'a running container', 'stat -L /opt/puppetlabs/puppet/bin/r10k', 0, 'Access: \(0755\/\-rwxr\-xr\-x\)'
15
23
  end
16
24
  end
@@ -28,15 +28,15 @@ class R10K::Util::Subprocess::Runner::POSIX < R10K::Util::Subprocess::Runner
28
28
 
29
29
  @stdout_pump = R10K::Util::Subprocess::Runner::Pump.new(@stdout_r)
30
30
  @stderr_pump = R10K::Util::Subprocess::Runner::Pump.new(@stderr_r)
31
- @stdout_pump.start
32
- @stderr_pump.start
33
-
34
31
  pid = fork do
35
32
  exec_r.close
36
33
  execute_child(exec_w)
37
34
  end
38
35
 
39
36
  exec_w.close
37
+ @stdout_pump.start
38
+ @stderr_pump.start
39
+
40
40
  execute_parent(exec_r, pid)
41
41
 
42
42
  @result
@@ -1,3 +1,3 @@
1
1
  module R10K
2
- VERSION = '3.0.2'
2
+ VERSION = '3.0.3'
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: 3.0.2
4
+ version: 3.0.3
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-09-28 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored
@@ -160,6 +160,7 @@ executables:
160
160
  extensions: []
161
161
  extra_rdoc_files: []
162
162
  files:
163
+ - ".gitattributes"
163
164
  - ".gitignore"
164
165
  - ".travis.yml"
165
166
  - CHANGELOG.mkd
@@ -169,6 +170,7 @@ files:
169
170
  - MAINTAINERS
170
171
  - README.mkd
171
172
  - Rakefile
173
+ - azure-pipelines.yml
172
174
  - bin/r10k
173
175
  - doc/common-patterns.mkd
174
176
  - doc/dynamic-environments.mkd
@@ -185,8 +187,10 @@ files:
185
187
  - doc/git/providers.mkd
186
188
  - doc/puppetfile.mkd
187
189
  - doc/updating-your-puppetfile.mkd
190
+ - docker/.rspec
188
191
  - docker/Gemfile
189
192
  - docker/ci/build
193
+ - docker/ci/build.ps1
190
194
  - docker/distelli-manifest.yml
191
195
  - docker/r10k/Dockerfile
192
196
  - docker/r10k/spec/dockerfile_spec.rb