beaker-docker 0.8.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a33de485fa44a24ca53428bc873ee91359d6d872abe4d0794a72e037a189aa4c
4
- data.tar.gz: 3e58d56f2878a8cfcfea37fb7dbafb10b6ad9a2500b3f1cad069283fb886ddfb
3
+ metadata.gz: 2de8c341eaa907ce915686f4af31417659a391ace3e844cd10de5b6b3a6f963a
4
+ data.tar.gz: 533955311e2c5a195bbc884a15dd71ae0a54603097baaf0afc41ca7226fef083
5
5
  SHA512:
6
- metadata.gz: 95fbe3d0582ce0ff014441f45f38e3c2d174f02c2eb323236a6b77a236327a9392eea43765e05bef87e26d9600be81d84c29ea2170b35d926aa9f1419bb23b77
7
- data.tar.gz: 67533e7a604103891b076a07ddf54808c360ef18833b3a1a094f1681c1ee69676fbeae8bd5db0b483c7c84e7c643c60e78f3aeaefa16b0893223c7261e590d6b
6
+ metadata.gz: a0ae7bb38381077821e427d7f46ff135649ef686b381c4438a6dd046ffec455f32169226f5e7799a52bd7360cca8fd118e06c3db507b55776647a6273736b5c7
7
+ data.tar.gz: 8250ec4f91378d821e0bbf3cf92a5038971df55f224ac03142148fe2dd8ee8137c6e86f11c94c597d1555e163c664b299076807cf6026eb1b2d6c0beaaadd08c
@@ -1,24 +1,32 @@
1
1
  name: Release
2
2
 
3
3
  on:
4
- create:
5
- ref_type: tag
4
+ push:
5
+ tags:
6
+ - '*'
6
7
 
7
8
  jobs:
8
9
  release:
9
10
  runs-on: ubuntu-latest
10
- if: github.repository == 'voxpupuli/beaker-docker'
11
- env:
12
- BUNDLE_WITHOUT: release
11
+ if: github.repository_owner == 'voxpupuli'
13
12
  steps:
14
13
  - uses: actions/checkout@v2
15
- - name: Install Ruby 2.7
14
+ - name: Install Ruby 3.0
16
15
  uses: ruby/setup-ruby@v1
17
16
  with:
18
- ruby-version: '2.7'
17
+ ruby-version: '3.0'
18
+ env:
19
+ BUNDLE_WITHOUT: release
19
20
  - name: Build gem
20
21
  run: gem build *.gemspec
21
- - name: Publish gem
22
+ - name: Publish gem to rubygems.org
22
23
  run: gem push *.gem
23
24
  env:
24
25
  GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
26
+ - name: Setup GitHub packages access
27
+ run: |
28
+ mkdir -p ~/.gem
29
+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30
+ chmod 0600 ~/.gem/credentials
31
+ - name: Publish gem to GitHub packages
32
+ run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
@@ -1,13 +1,11 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- push:
5
- branches:
6
- - test_me_github
7
- pull_request:
8
- branches:
9
- - main
10
- - master
4
+ - pull_request
5
+ - push
6
+
7
+ env:
8
+ BUNDLE_WITHOUT: release
11
9
 
12
10
  jobs:
13
11
  rspec:
@@ -15,13 +13,15 @@ jobs:
15
13
  strategy:
16
14
  fail-fast: true
17
15
  matrix:
18
- ruby:
19
- - "2.4"
20
- - "2.5"
21
- - "2.6"
22
- - "2.7"
16
+ include:
17
+ - ruby: "2.4"
18
+ - ruby: "2.5"
19
+ - ruby: "2.6"
20
+ - ruby: "2.7"
21
+ - ruby: "3.0"
22
+ coverage: "yes"
23
23
  env:
24
- BUNDLE_WITHOUT: release
24
+ COVERAGE: ${{ matrix.coverage }}
25
25
  name: RSpec - Ruby ${{ matrix.ruby }}
26
26
  steps:
27
27
  - uses: actions/checkout@v2
@@ -30,12 +30,10 @@ jobs:
30
30
  with:
31
31
  ruby-version: ${{ matrix.ruby }}
32
32
  bundler-cache: true
33
- - name: install bundler
34
- run: |
35
- gem install bundler -v '~> 1.17.3'
36
- bundle update
37
33
  - name: spec tests
38
34
  run: bundle exec rake test:spec
35
+ - name: Build gem
36
+ run: gem build *.gemspec
39
37
 
40
38
  docker:
41
39
  runs-on: ubuntu-latest
@@ -44,8 +42,6 @@ jobs:
44
42
  matrix:
45
43
  ruby:
46
44
  - "2.6"
47
- env:
48
- BUNDLE_WITHOUT: release
49
45
  name: Docker - Ruby ${{ matrix.ruby }}
50
46
  steps:
51
47
  - uses: actions/checkout@v2
@@ -78,8 +74,6 @@ jobs:
78
74
  matrix:
79
75
  ruby:
80
76
  - "2.6"
81
- env:
82
- BUNDLE_WITHOUT: release
83
77
  name: Podman - Ruby ${{ matrix.ruby }}
84
78
  steps:
85
79
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,31 +1,197 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [1.0.0](https://github.com/voxpupuli/beaker-docker/tree/1.0.0) (2021-08-06)
4
4
 
5
- The format is based on
6
- [Keep a Changelog](http://keepachangelog.com)
7
- & makes a strong effort to adhere to
8
- [Semantic Versioning](http://semver.org).
5
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.8.4...1.0.0)
9
6
 
10
- Tracking in this Changelog began for this project in version 0.8.4.
11
- If you're looking for changes from before this, refer to the project's
12
- git logs & PR history.
7
+ **Implemented enhancements:**
13
8
 
14
- The headers used in [Keep a Changelog](http://keepachangelog.com) are:
9
+ - Implement codecov reporting [\#49](https://github.com/voxpupuli/beaker-docker/pull/49) ([bastelfreak](https://github.com/bastelfreak))
15
10
 
16
- - Added - for new features.
17
- - Changed - for changes in existing functionality.
18
- - Deprecated - for soon-to-be removed features.
19
- - Removed - for now removed features.
20
- - Fixed - for any bug fixes.
21
- - Security - in case of vulnerabilities.
11
+ **Fixed bugs:**
22
12
 
23
- # [0.8.4](https://github.com/voxpupuli/beaker/compare/0.8.3...0.8.4) - 03-15-2021
13
+ - Treat Fedora 22+ and EL8 the same [\#48](https://github.com/voxpupuli/beaker-docker/pull/48) ([ekohl](https://github.com/ekohl))
14
+ - Be more aggressive about picking a connection [\#47](https://github.com/voxpupuli/beaker-docker/pull/47) ([trevor-vaughan](https://github.com/trevor-vaughan))
24
15
 
25
- ### Fixed
16
+ ## [0.8.4](https://github.com/voxpupuli/beaker-docker/tree/0.8.4) (2021-03-15)
26
17
 
27
- - Use the `docker-api` function `::Docker.rootless?` to see if the container
28
- ecosystem is running in `rootless` mode. This reduces false positive
29
- failures across the board.
30
- - Ensure that the correct port and IP is used for local docker connections
31
- - Added the `force` option to ensure container removal on error
18
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.8.3...0.8.4)
19
+
20
+ **Fixed bugs:**
21
+
22
+ - Force Container Removal [\#45](https://github.com/voxpupuli/beaker-docker/pull/45) ([trevor-vaughan](https://github.com/trevor-vaughan))
23
+
24
+ **Closed issues:**
25
+
26
+ - Wrong SSH port getting used [\#43](https://github.com/voxpupuli/beaker-docker/issues/43)
27
+ - Beaker complains about host unreachable - Ubuntu 18 and 20 [\#39](https://github.com/voxpupuli/beaker-docker/issues/39)
28
+
29
+ **Merged pull requests:**
30
+
31
+ - Fix docker usage to use correct port and IP address on local docker [\#44](https://github.com/voxpupuli/beaker-docker/pull/44) ([treydock](https://github.com/treydock))
32
+ - Update to Check Rootless [\#41](https://github.com/voxpupuli/beaker-docker/pull/41) ([trevor-vaughan](https://github.com/trevor-vaughan))
33
+ - Change from my personal fork to docker-api 2.1+ [\#40](https://github.com/voxpupuli/beaker-docker/pull/40) ([trevor-vaughan](https://github.com/trevor-vaughan))
34
+
35
+ ## [0.8.3](https://github.com/voxpupuli/beaker-docker/tree/0.8.3) (2021-02-28)
36
+
37
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.8.2...0.8.3)
38
+
39
+ **Merged pull requests:**
40
+
41
+ - Cleanup docs and gemspec [\#37](https://github.com/voxpupuli/beaker-docker/pull/37) ([genebean](https://github.com/genebean))
42
+
43
+ ## [0.8.2](https://github.com/voxpupuli/beaker-docker/tree/0.8.2) (2021-02-28)
44
+
45
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.8.1...0.8.2)
46
+
47
+ **Merged pull requests:**
48
+
49
+ - Deconflict Privileged and CAPs [\#34](https://github.com/voxpupuli/beaker-docker/pull/34) ([trevor-vaughan](https://github.com/trevor-vaughan))
50
+
51
+ ## [0.8.1](https://github.com/voxpupuli/beaker-docker/tree/0.8.1) (2021-02-28)
52
+
53
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.8.0...0.8.1)
54
+
55
+ **Merged pull requests:**
56
+
57
+ - Fix docker support and update github actions [\#32](https://github.com/voxpupuli/beaker-docker/pull/32) ([trevor-vaughan](https://github.com/trevor-vaughan))
58
+ - Add GH Action for releases [\#31](https://github.com/voxpupuli/beaker-docker/pull/31) ([genebean](https://github.com/genebean))
59
+
60
+ ## [0.8.0](https://github.com/voxpupuli/beaker-docker/tree/0.8.0) (2021-02-26)
61
+
62
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.7.1...0.8.0)
63
+
64
+ **Merged pull requests:**
65
+
66
+ - Move testing to GH Actions [\#30](https://github.com/voxpupuli/beaker-docker/pull/30) ([genebean](https://github.com/genebean))
67
+ - Add Podman Support [\#29](https://github.com/voxpupuli/beaker-docker/pull/29) ([trevor-vaughan](https://github.com/trevor-vaughan))
68
+
69
+ ## [0.7.1](https://github.com/voxpupuli/beaker-docker/tree/0.7.1) (2020-09-11)
70
+
71
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.7.0...0.7.1)
72
+
73
+ **Merged pull requests:**
74
+
75
+ - Fix: docker-api gem dependency [\#26](https://github.com/voxpupuli/beaker-docker/pull/26) ([msalway](https://github.com/msalway))
76
+ - Add Dependabot to keep thins up to date [\#23](https://github.com/voxpupuli/beaker-docker/pull/23) ([genebean](https://github.com/genebean))
77
+
78
+ ## [0.7.0](https://github.com/voxpupuli/beaker-docker/tree/0.7.0) (2020-01-23)
79
+
80
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.6.0...0.7.0)
81
+
82
+ **Merged pull requests:**
83
+
84
+ - Fix: Too many authentication failures [\#21](https://github.com/voxpupuli/beaker-docker/pull/21) ([b4ldr](https://github.com/b4ldr))
85
+ - \(MAINT\) add release section to README [\#20](https://github.com/voxpupuli/beaker-docker/pull/20) ([kevpl](https://github.com/kevpl))
86
+
87
+ ## [0.6.0](https://github.com/voxpupuli/beaker-docker/tree/0.6.0) (2019-11-12)
88
+
89
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.5.4...0.6.0)
90
+
91
+ **Merged pull requests:**
92
+
93
+ - \(BKR-1613\) add CentOS8 support [\#19](https://github.com/voxpupuli/beaker-docker/pull/19) ([ciprianbadescu](https://github.com/ciprianbadescu))
94
+
95
+ ## [0.5.4](https://github.com/voxpupuli/beaker-docker/tree/0.5.4) (2019-07-15)
96
+
97
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.5.3...0.5.4)
98
+
99
+ **Merged pull requests:**
100
+
101
+ - \(maint\) A number of fixes for rerunning tests on docker containers [\#18](https://github.com/voxpupuli/beaker-docker/pull/18) ([underscorgan](https://github.com/underscorgan))
102
+
103
+ ## [0.5.3](https://github.com/voxpupuli/beaker-docker/tree/0.5.3) (2019-05-06)
104
+
105
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.5.2...0.5.3)
106
+
107
+ **Merged pull requests:**
108
+
109
+ - BKR-1586 - allow an 'as-is' container to be used rather than rebuilding every time [\#17](https://github.com/voxpupuli/beaker-docker/pull/17) ([oldNoakes](https://github.com/oldNoakes))
110
+
111
+ ## [0.5.2](https://github.com/voxpupuli/beaker-docker/tree/0.5.2) (2019-02-11)
112
+
113
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.5.1...0.5.2)
114
+
115
+ **Merged pull requests:**
116
+
117
+ - Allow users with large keyrings to run test [\#16](https://github.com/voxpupuli/beaker-docker/pull/16) ([trevor-vaughan](https://github.com/trevor-vaughan))
118
+
119
+ ## [0.5.1](https://github.com/voxpupuli/beaker-docker/tree/0.5.1) (2018-11-29)
120
+
121
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.5.0...0.5.1)
122
+
123
+ **Merged pull requests:**
124
+
125
+ - \(SERVER-2380\) add image tagging ability [\#14](https://github.com/voxpupuli/beaker-docker/pull/14) ([tvpartytonight](https://github.com/tvpartytonight))
126
+
127
+ ## [0.5.0](https://github.com/voxpupuli/beaker-docker/tree/0.5.0) (2018-11-19)
128
+
129
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.4.0...0.5.0)
130
+
131
+ **Merged pull requests:**
132
+
133
+ - \(BKR-1551\) Updates for Beaker 4 [\#13](https://github.com/voxpupuli/beaker-docker/pull/13) ([caseywilliams](https://github.com/caseywilliams))
134
+
135
+ ## [0.4.0](https://github.com/voxpupuli/beaker-docker/tree/0.4.0) (2018-10-26)
136
+
137
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.3.3...0.4.0)
138
+
139
+ **Merged pull requests:**
140
+
141
+ - \(PUP-9212\) Allow for building containers with context [\#12](https://github.com/voxpupuli/beaker-docker/pull/12) ([tvpartytonight](https://github.com/tvpartytonight))
142
+ - \(PUP-9212\) Allow for image entry point CMDs [\#11](https://github.com/voxpupuli/beaker-docker/pull/11) ([tvpartytonight](https://github.com/tvpartytonight))
143
+ - \(BKR-1509\) Hypervisor usage instructions for Beaker 4..0 [\#9](https://github.com/voxpupuli/beaker-docker/pull/9) ([Dakta](https://github.com/Dakta))
144
+
145
+ ## [0.3.3](https://github.com/voxpupuli/beaker-docker/tree/0.3.3) (2018-04-16)
146
+
147
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.3.2...0.3.3)
148
+
149
+ **Merged pull requests:**
150
+
151
+ - \(BKR-305\) Support custom docker options [\#8](https://github.com/voxpupuli/beaker-docker/pull/8) ([double16](https://github.com/double16))
152
+
153
+ ## [0.3.2](https://github.com/voxpupuli/beaker-docker/tree/0.3.2) (2018-04-09)
154
+
155
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.3.1...0.3.2)
156
+
157
+ **Merged pull requests:**
158
+
159
+ - \(MAINT\) fix paths when using DOCKER\_TOOLBOX on windows [\#7](https://github.com/voxpupuli/beaker-docker/pull/7) ([tabakhase](https://github.com/tabakhase))
160
+
161
+ ## [0.3.1](https://github.com/voxpupuli/beaker-docker/tree/0.3.1) (2018-02-22)
162
+
163
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.3.0...0.3.1)
164
+
165
+ **Merged pull requests:**
166
+
167
+ - Fix Archlinux support [\#6](https://github.com/voxpupuli/beaker-docker/pull/6) ([bastelfreak](https://github.com/bastelfreak))
168
+
169
+ ## [0.3.0](https://github.com/voxpupuli/beaker-docker/tree/0.3.0) (2018-01-29)
170
+
171
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.2.0...0.3.0)
172
+
173
+ **Merged pull requests:**
174
+
175
+ - \[BKR-1021\] Archlinux support [\#5](https://github.com/voxpupuli/beaker-docker/pull/5) ([jantman](https://github.com/jantman))
176
+ - Don't set container name to node hostname [\#4](https://github.com/voxpupuli/beaker-docker/pull/4) ([jovrum](https://github.com/jovrum))
177
+
178
+ ## [0.2.0](https://github.com/voxpupuli/beaker-docker/tree/0.2.0) (2017-08-11)
179
+
180
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/0.1.0...0.2.0)
181
+
182
+ **Merged pull requests:**
183
+
184
+ - \(BKR-1189\) Fix port mapping [\#3](https://github.com/voxpupuli/beaker-docker/pull/3) ([rishijavia](https://github.com/rishijavia))
185
+ - Make beaker-docker work in a docker container [\#2](https://github.com/voxpupuli/beaker-docker/pull/2) ([hedinasr](https://github.com/hedinasr))
186
+
187
+ ## [0.1.0](https://github.com/voxpupuli/beaker-docker/tree/0.1.0) (2017-08-01)
188
+
189
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/7f6a78541f30385016478e810ecb0c14f3936e20...0.1.0)
190
+
191
+ **Merged pull requests:**
192
+
193
+ - \(MAINT\) Add docker-api dependency as its removed from beaker [\#1](https://github.com/voxpupuli/beaker-docker/pull/1) ([rishijavia](https://github.com/rishijavia))
194
+
195
+
196
+
197
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source ENV['GEM_SOURCE'] || "https://rubygems.org"
1
+ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
@@ -16,10 +16,19 @@ end
16
16
  # We don't put beaker in as a test dependency because we
17
17
  # don't want to create a transitive dependency
18
18
  group :acceptance_testing do
19
- gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
19
+ gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 4.30')
20
20
  end
21
21
 
22
22
 
23
23
  if File.exists? "#{__FILE__}.local"
24
24
  eval(File.read("#{__FILE__}.local"), binding)
25
25
  end
26
+
27
+ group :coverage, optional: ENV['COVERAGE']!='yes' do
28
+ gem 'simplecov-console', :require => false
29
+ gem 'codecov', :require => false
30
+ end
31
+
32
+ group :release do
33
+ gem 'github_changelog_generator', require: false
34
+ end
data/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # beaker-docker
2
2
 
3
+ [![License](https://img.shields.io/github/license/voxpupuli/beaker-docker.svg)](https://github.com/voxpupuli/beaker-docker/blob/master/LICENSE)
4
+ [![Test](https://github.com/voxpupuli/beaker-docker/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker-docker/actions/workflows/test.yml)
5
+ [![codecov](https://codecov.io/gh/voxpupuli/beaker-docker/branch/master/graph/badge.svg?token=Mypkl78hvK)](https://codecov.io/gh/voxpupuli/beaker-docker)
6
+ [![Release](https://github.com/voxpupuli/beaker-docker/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker-docker/actions/workflows/release.yml)
7
+ [![RubyGem Version](https://img.shields.io/gem/v/beaker-docker.svg)](https://rubygems.org/gems/beaker-docker)
8
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/beaker-docker.svg)](https://rubygems.org/gems/beaker-docker)
9
+ [![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice)
10
+
3
11
  Beaker library to use docker hypervisor
4
12
 
5
13
  ## How to use this wizardry
@@ -110,12 +118,24 @@ There is a simple rake task to invoke acceptance test for the library:
110
118
  bundle exec rake test:acceptance
111
119
  ```
112
120
 
113
- ## Contributing
121
+ ## Transfer Notice
122
+
123
+ This plugin was originally authored by [Puppet Inc](http://puppet.com).
124
+ The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance.
125
+ Existing pull requests and issues were transferred over, please fork and continue to contribute here.
126
+
127
+ Previously: https://github.com/puppetlabs/beaker
114
128
 
115
- Please refer to puppetlabs/beaker's [contributing](https://github.com/puppetlabs/beaker/blob/master/CONTRIBUTING.md) guide.
129
+ ## License
116
130
 
117
- ## Releasing
131
+ This gem is licensed under the Apache-2 license.
118
132
 
119
- To release new versions of beaker-docker, please use update `lib/beaker-docker/version.rb` with the new version number. The version should adhere to [semantic version standards](https://semver.org). When in doubt, ask in the `#voxpupuli` channel of the Puppet community Slack or in `#voxpupuli` on irc.freenode.net ([Webinterface](https://webchat.freenode.net/?channels=%23voxpupuli)).
133
+ ## Release information
120
134
 
121
- Once the version file has been updated, a contributor can push a new git tag to match and GitHub Actions will do the release to RubyGems.
135
+ To make a new release, please do:
136
+ * update the version in `lib/beaker-docker/version.rb`
137
+ * Install gems with `bundle install --with release --path .vendor`
138
+ * generate the changelog with `bundle exec rake changelog`
139
+ * Check if the new version matches the closed issues/PRs in the changelog
140
+ * Create a PR with it
141
+ * After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages
data/Rakefile CHANGED
@@ -163,3 +163,17 @@ namespace :docs do
163
163
  end
164
164
  end
165
165
  end
166
+
167
+ begin
168
+ require 'rubygems'
169
+ require 'github_changelog_generator/task'
170
+ rescue LoadError
171
+ else
172
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
173
+ config.exclude_labels = %w{duplicate question invalid wontfix wont-fix skip-changelog}
174
+ config.user = 'voxpupuli'
175
+ config.project = 'beaker-docker'
176
+ gem_version = Gem::Specification.load("#{config.project}.gemspec").version
177
+ config.future_release = gem_version
178
+ end
179
+ end
@@ -27,8 +27,6 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency 'rspec-its', '~> 1.3'
28
28
  s.add_development_dependency 'fakefs', '~> 1.3'
29
29
  s.add_development_dependency 'rake', '~> 13.0'
30
- s.add_development_dependency 'simplecov', '~> 0.18'
31
- s.add_development_dependency 'pry', '~> 0.10'
32
30
 
33
31
  # Run time dependencies
34
32
  s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
@@ -1,3 +1,3 @@
1
1
  module BeakerDocker
2
- VERSION = '0.8.4'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -44,6 +44,8 @@ module Beaker
44
44
  else
45
45
  @registry = ENV['DOCKER_REGISTRY']
46
46
  end
47
+ elsif ::Docker.respond_to?(:podman?) && ::Docker.podman?
48
+ @docker_type = 'podman'
47
49
  else
48
50
  @docker_type = 'docker'
49
51
  end
@@ -150,9 +152,41 @@ module Beaker
150
152
  gw = network_settings['Gateway']
151
153
  ip = gw unless (gw.nil? || gw.empty?)
152
154
  else
153
- port22 = network_settings.dig('Ports','22/tcp')
154
- ip = port22[0]["HostIp"] if port22
155
+ # The many faces of container networking
156
+
157
+ # Host to Container
158
+ port22 = network_settings.dig('PortBindings','22/tcp')
159
+ ip = port22[0]['HostIp'] if port22
155
160
  port = port22[0]['HostPort'] if port22
161
+
162
+ # Container to container
163
+ unless ip && port
164
+ ip = nil
165
+ port = nil
166
+
167
+ ip = network_settings['IPAddress']
168
+ port = 22 if ip && !ip.empty?
169
+ end
170
+
171
+ # Container through gateway
172
+ unless ip && port
173
+ ip = nil
174
+ port = nil
175
+
176
+ ip = network_settings['Gateway']
177
+
178
+ if ip && !ip.empty?
179
+ port22 = network_settings.dig('PortBindings','22/tcp')
180
+ port = port22[0]['HostPort'] if port22
181
+ end
182
+ end
183
+
184
+ # Legacy fallback
185
+ unless ip && port
186
+ port22 = network_settings.dig('Ports','22/tcp')
187
+ ip = port22[0]["HostIp"] if port22
188
+ port = port22[0]['HostPort'] if port22
189
+ end
156
190
  end
157
191
  end
158
192
 
@@ -348,7 +382,7 @@ module Beaker
348
382
  container.exec(%w(apt-get update))
349
383
  container.exec(%w(apt-get install -y openssh-server openssh-client))
350
384
  container.exec(%w(sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*))
351
- when /fedora-(2[2-9])/
385
+ when /el-8/, /fedora-(2[2-9]|3[0-9])/
352
386
  container.exec(%w(dnf clean all))
353
387
  container.exec(%w(dnf install -y sudo openssh-server openssh-clients))
354
388
  container.exec(%w(ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key))
@@ -485,15 +519,7 @@ module Beaker
485
519
  RUN apt-get update
486
520
  RUN apt-get install -y openssh-server openssh-client #{Beaker::HostPrebuiltSteps::CUMULUS_PACKAGES.join(' ')}
487
521
  EOF
488
- when /fedora-(2[2-9])/
489
- dockerfile += <<~EOF
490
- RUN dnf clean all
491
- RUN dnf install -y sudo openssh-server openssh-clients #{Beaker::HostPrebuiltSteps::UNIX_PACKAGES.join(' ')}
492
- RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
493
- RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
494
- RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*
495
- EOF
496
- when /el-8/
522
+ when /el-8/, /fedora-(2[2-9]|3)/
497
523
  dockerfile += <<~EOF
498
524
  RUN dnf clean all
499
525
  RUN dnf install -y sudo openssh-server openssh-clients #{Beaker::HostPrebuiltSteps::RHEL8_PACKAGES.join(' ')}
@@ -134,6 +134,7 @@ module Beaker
134
134
  allow( ::Docker ).to receive(:options).and_return(docker_options)
135
135
  allow( ::Docker ).to receive(:options=)
136
136
  allow( ::Docker ).to receive(:logger=)
137
+ allow( ::Docker ).to receive(:podman?).and_return(false)
137
138
  allow( ::Docker ).to receive(:version).and_return(version)
138
139
  allow( ::Docker::Image ).to receive(:build).and_return(image)
139
140
  allow( ::Docker::Image ).to receive(:create).and_return(image)
@@ -490,7 +491,7 @@ module Beaker
490
491
  ENV['DOCKER_HOST'] = nil
491
492
  docker.provision
492
493
 
493
- expect( hosts[0]['ip'] ).to be === '127.0.1.1'
494
+ expect( hosts[0]['ip'] ).to be === '192.0.2.1'
494
495
  expect( hosts[0]['port'] ).to be === 8022
495
496
  end
496
497
 
@@ -506,7 +507,7 @@ module Beaker
506
507
  ENV['DOCKER_HOST'] = nil
507
508
  docker.provision
508
509
 
509
- expect( hosts[0]['ip'] ).to be === '127.0.1.1'
510
+ expect( hosts[0]['ip'] ).to be === '192.0.2.1'
510
511
  expect( hosts[0]['port'] ).to be === 8022
511
512
  expect( hosts[0]['ssh'][:password] ).to be === 'root'
512
513
  expect( hosts[0]['ssh'][:port] ).to be === 8022
@@ -536,8 +537,8 @@ module Beaker
536
537
  ENV['DOCKER_HOST'] = nil
537
538
  docker.provision
538
539
 
539
- expect( hosts[0]['ip'] ).to be === '127.0.1.1'
540
- expect( hosts[0]['port'] ).to be === 8022
540
+ expect( hosts[0]['ip'] ).to be === '192.0.2.1'
541
+ expect( hosts[0]['port'] ).to be === 22
541
542
  end
542
543
  end
543
544
 
@@ -697,7 +698,7 @@ module Beaker
697
698
  expect( dockerfile ).to be =~ /RUN zypper -n in openssh/
698
699
  end
699
700
 
700
- (22..29).to_a.each do | fedora_release |
701
+ (22..39).to_a.each do | fedora_release |
701
702
  it "should use dnf on fedora #{fedora_release}" do
702
703
  FakeFS.deactivate!
703
704
  dockerfile = docker.send(:dockerfile_for, {
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,30 @@
1
- require 'simplecov'
2
1
  require 'rspec/its'
3
2
  require 'beaker'
4
3
 
4
+ begin
5
+ require 'simplecov'
6
+ require 'simplecov-console'
7
+ require 'codecov'
8
+ rescue LoadError
9
+ else
10
+ SimpleCov.start do
11
+ track_files 'lib/**/*.rb'
12
+
13
+ add_filter '/spec'
14
+
15
+ enable_coverage :branch
16
+
17
+ # do not track vendored files
18
+ add_filter '/vendor'
19
+ add_filter '/.vendor'
20
+ end
21
+
22
+ SimpleCov.formatters = [
23
+ SimpleCov::Formatter::Console,
24
+ SimpleCov::Formatter::Codecov,
25
+ ]
26
+ end
27
+
5
28
  Dir.glob(Dir.pwd + '/lib/beaker/hypervisor/*.rb') {|file| require file}
6
29
 
7
30
  # setup & require beaker's spec_helper.rb
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-03-15 00:00:00.000000000 Z
14
+ date: 2021-08-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
@@ -69,34 +69,6 @@ dependencies:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '13.0'
72
- - !ruby/object:Gem::Dependency
73
- name: simplecov
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - "~>"
77
- - !ruby/object:Gem::Version
78
- version: '0.18'
79
- type: :development
80
- prerelease: false
81
- version_requirements: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '0.18'
86
- - !ruby/object:Gem::Dependency
87
- name: pry
88
- requirement: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - "~>"
91
- - !ruby/object:Gem::Version
92
- version: '0.10'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '0.10'
100
72
  - !ruby/object:Gem::Dependency
101
73
  name: stringify-hash
102
74
  requirement: !ruby/object:Gem::Requirement
@@ -172,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
144
  - !ruby/object:Gem::Version
173
145
  version: '0'
174
146
  requirements: []
175
- rubygems_version: 3.1.4
147
+ rubygems_version: 3.2.22
176
148
  signing_key:
177
149
  specification_version: 4
178
150
  summary: Beaker DSL Extension Helpers!