beaker-docker 3.0.1 → 3.1.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/.github/workflows/release.yml +6 -6
- data/.github/workflows/test.yml +8 -8
- data/.rubocop.yml +0 -3
- data/.rubocop_todo.yml +6 -1
- data/CHANGELOG.md +17 -1
- data/beaker-docker.gemspec +4 -2
- data/lib/beaker/hypervisor/docker.rb +3 -1
- data/lib/beaker-docker/version.rb +1 -1
- data/spec/beaker/hypervisor/docker_spec.rb +38 -0
- metadata +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20458b7863defa8965bb32ebf8509c39cb8879b6a3d77c738fe76c55ad80b7b0
|
|
4
|
+
data.tar.gz: de353c5f2b2a75edefed8e4926eeb07792717173db68cfa3081fa5e747920a17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b17e5c8962e810565652fd962a7240c2d328e3ac08793da48416040fa7b4351863b85d0e0043518c57e1b31db7cd5c433103e394bc262504fae6f7d42485c4f2
|
|
7
|
+
data.tar.gz: 38928914ecb2b8b5bbfc9fff9dacfce07a852d0c937e22b5ebea97dcccba77a7442ca0c9c61ad23bd0b224a6c26037cf2f9b08e34a984c39fe0aa3207b5e4e30
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
name: Build the gem
|
|
16
16
|
runs-on: ubuntu-24.04
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
19
|
- name: Install Ruby
|
|
20
20
|
uses: ruby/setup-ruby@v1
|
|
21
21
|
with:
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
shell: bash
|
|
25
25
|
run: gem build --verbose *.gemspec
|
|
26
26
|
- name: Upload gem to GitHub cache
|
|
27
|
-
uses: actions/upload-artifact@
|
|
27
|
+
uses: actions/upload-artifact@v6
|
|
28
28
|
with:
|
|
29
29
|
name: gem-artifact
|
|
30
30
|
path: '*.gem'
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
contents: write # clone repo and create release
|
|
40
40
|
steps:
|
|
41
41
|
- name: Download gem from GitHub cache
|
|
42
|
-
uses: actions/download-artifact@
|
|
42
|
+
uses: actions/download-artifact@v7
|
|
43
43
|
with:
|
|
44
44
|
name: gem-artifact
|
|
45
45
|
- name: Create Release
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
packages: write # publish to rubygems.pkg.github.com
|
|
57
57
|
steps:
|
|
58
58
|
- name: Download gem from GitHub cache
|
|
59
|
-
uses: actions/download-artifact@
|
|
59
|
+
uses: actions/download-artifact@v7
|
|
60
60
|
with:
|
|
61
61
|
name: gem-artifact
|
|
62
62
|
- name: Publish gem to GitHub packages
|
|
@@ -73,7 +73,7 @@ jobs:
|
|
|
73
73
|
id-token: write # rubygems.org authentication
|
|
74
74
|
steps:
|
|
75
75
|
- name: Download gem from GitHub cache
|
|
76
|
-
uses: actions/download-artifact@
|
|
76
|
+
uses: actions/download-artifact@v7
|
|
77
77
|
with:
|
|
78
78
|
name: gem-artifact
|
|
79
79
|
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
92
92
|
- release-to-rubygems
|
|
93
93
|
steps:
|
|
94
94
|
- name: Download gem from GitHub cache
|
|
95
|
-
uses: actions/download-artifact@
|
|
95
|
+
uses: actions/download-artifact@v7
|
|
96
96
|
with:
|
|
97
97
|
name: gem-artifact
|
|
98
98
|
- name: Install Ruby
|
data/.github/workflows/test.yml
CHANGED
|
@@ -16,16 +16,16 @@ jobs:
|
|
|
16
16
|
outputs:
|
|
17
17
|
ruby: ${{ steps.ruby.outputs.versions }}
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
20
|
-
- name: Install Ruby
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
- name: Install Ruby 4.0
|
|
21
21
|
uses: ruby/setup-ruby@v1
|
|
22
22
|
with:
|
|
23
|
-
ruby-version:
|
|
23
|
+
ruby-version: '4.0'
|
|
24
24
|
bundler-cache: true
|
|
25
25
|
- name: Run Rubocop
|
|
26
26
|
run: bundle exec rake rubocop
|
|
27
27
|
- id: ruby
|
|
28
|
-
uses: voxpupuli/ruby-version@
|
|
28
|
+
uses: voxpupuli/ruby-version@v2
|
|
29
29
|
|
|
30
30
|
rspec:
|
|
31
31
|
runs-on: ubuntu-24.04
|
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
|
37
37
|
name: RSpec - Ruby ${{ matrix.ruby }}
|
|
38
38
|
steps:
|
|
39
|
-
- uses: actions/checkout@
|
|
39
|
+
- uses: actions/checkout@v6
|
|
40
40
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
41
41
|
uses: ruby/setup-ruby@v1
|
|
42
42
|
with:
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
|
57
57
|
name: Docker on Ruby ${{ matrix.ruby }}
|
|
58
58
|
steps:
|
|
59
|
-
- uses: actions/checkout@
|
|
59
|
+
- uses: actions/checkout@v6
|
|
60
60
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
61
61
|
uses: ruby/setup-ruby@v1
|
|
62
62
|
with:
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
# needs: rubocop_and_matrix
|
|
72
72
|
# name: Docker - Beaker in container connection test
|
|
73
73
|
# steps:
|
|
74
|
-
# - uses: actions/checkout@
|
|
74
|
+
# - uses: actions/checkout@v6
|
|
75
75
|
# # use this and not container key from gha to not have a docker network from github
|
|
76
76
|
# - name: Run Beaker in docker container
|
|
77
77
|
# uses: addnab/docker-run-action@v3
|
|
@@ -99,7 +99,7 @@ jobs:
|
|
|
99
99
|
run: |
|
|
100
100
|
sudo systemctl stop docker.service docker.socket && systemctl start --user podman.socket
|
|
101
101
|
echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
|
|
102
|
-
- uses: actions/checkout@
|
|
102
|
+
- uses: actions/checkout@v6
|
|
103
103
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
104
104
|
uses: ruby/setup-ruby@v1
|
|
105
105
|
with:
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
|
|
3
|
-
# using RuboCop version 1.
|
|
3
|
+
# using RuboCop version 1.81.7.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
RSpec/ExampleLength:
|
|
12
12
|
Max: 36
|
|
13
13
|
|
|
14
|
+
# Offense count: 1
|
|
15
|
+
RSpec/LeakyLocalVariable:
|
|
16
|
+
Exclude:
|
|
17
|
+
- 'spec/beaker/hypervisor/docker_spec.rb'
|
|
18
|
+
|
|
14
19
|
# Offense count: 60
|
|
15
20
|
# Configuration parameters: .
|
|
16
21
|
# SupportedStyles: have_received, receive
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [3.
|
|
3
|
+
## [3.1.1](https://github.com/voxpupuli/beaker-docker/tree/3.1.1) (2026-01-31)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/3.1.0...3.1.1)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- Handle both podman and docker to get SUT container IP address [\#180](https://github.com/voxpupuli/beaker-docker/pull/180) ([alelindq](https://github.com/alelindq))
|
|
10
|
+
|
|
11
|
+
## [3.1.0](https://github.com/voxpupuli/beaker-docker/tree/3.1.0) (2025-12-27)
|
|
12
|
+
|
|
13
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/3.0.1...3.1.0)
|
|
14
|
+
|
|
15
|
+
**Implemented enhancements:**
|
|
16
|
+
|
|
17
|
+
- Add Ruby 4.0 support [\#177](https://github.com/voxpupuli/beaker-docker/pull/177) ([bastelfreak](https://github.com/bastelfreak))
|
|
18
|
+
|
|
19
|
+
## [3.0.1](https://github.com/voxpupuli/beaker-docker/tree/3.0.1) (2025-10-01)
|
|
4
20
|
|
|
5
21
|
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/3.0.0...3.0.1)
|
|
6
22
|
|
data/beaker-docker.gemspec
CHANGED
|
@@ -22,13 +22,15 @@ Gem::Specification.new do |s|
|
|
|
22
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
23
23
|
s.require_paths = ['lib']
|
|
24
24
|
|
|
25
|
-
s.required_ruby_version = '>= 3.2', '<
|
|
25
|
+
s.required_ruby_version = '>= 3.2', '< 5'
|
|
26
26
|
|
|
27
27
|
# Testing dependencies
|
|
28
28
|
s.add_development_dependency 'fakefs', '>= 1.3', '< 4'
|
|
29
|
+
# can be removed when https://github.com/fakefs/fakefs/pull/527 is merged
|
|
30
|
+
s.add_development_dependency 'irb', '< 2'
|
|
29
31
|
s.add_development_dependency 'rake', '~> 13.0'
|
|
30
32
|
s.add_development_dependency 'rspec', '~> 3.0'
|
|
31
|
-
s.add_development_dependency 'voxpupuli-rubocop', '~>
|
|
33
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 5.1.0'
|
|
32
34
|
|
|
33
35
|
# Run time dependencies
|
|
34
36
|
s.add_dependency 'beaker', '>= 4', '< 8'
|
|
@@ -164,7 +164,9 @@ module Beaker
|
|
|
164
164
|
|
|
165
165
|
# Container to container
|
|
166
166
|
unless ip && port
|
|
167
|
-
ip = network_settings['IPAddress']
|
|
167
|
+
ip = network_settings['IPAddress'] # podman
|
|
168
|
+
# also handle scenarios where network_settings['IPAddress'] is not set (e.g. docker-ce >= v29)
|
|
169
|
+
ip = network_settings['Networks'][host_config['NetworkMode']]['IPAddress'] if ip.nil? || ip.empty?
|
|
168
170
|
port = (ip && !ip.empty?) ? 22 : nil
|
|
169
171
|
end
|
|
170
172
|
|
|
@@ -688,6 +688,44 @@ module Beaker
|
|
|
688
688
|
end
|
|
689
689
|
end
|
|
690
690
|
end
|
|
691
|
+
|
|
692
|
+
context 'when IPAddress is empty but available in Networks' do
|
|
693
|
+
let(:container_config) do
|
|
694
|
+
{
|
|
695
|
+
'HostConfig' => {
|
|
696
|
+
'NetworkMode' => 'bridge',
|
|
697
|
+
},
|
|
698
|
+
'NetworkSettings' => {
|
|
699
|
+
'IPAddress' => '',
|
|
700
|
+
'Ports' => {
|
|
701
|
+
'22/tcp' => [
|
|
702
|
+
{
|
|
703
|
+
'HostIp' => '0.0.0.0',
|
|
704
|
+
'HostPort' => 8022,
|
|
705
|
+
},
|
|
706
|
+
],
|
|
707
|
+
},
|
|
708
|
+
'Gateway' => '192.0.2.254',
|
|
709
|
+
'Networks' => {
|
|
710
|
+
'bridge' => {
|
|
711
|
+
'IPAddress' => '192.0.2.10',
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
},
|
|
715
|
+
}
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
it 'falls back to Networks[NetworkMode][IPAddress]' do
|
|
719
|
+
ENV['DOCKER_IN_DOCKER'] = 'true'
|
|
720
|
+
FakeFS do
|
|
721
|
+
FileUtils.touch('/.dockerenv')
|
|
722
|
+
docker.provision
|
|
723
|
+
|
|
724
|
+
expect(hosts[0]['ip']).to eq '192.0.2.10'
|
|
725
|
+
expect(hosts[0]['port']).to eq 22
|
|
726
|
+
end
|
|
727
|
+
end
|
|
728
|
+
end
|
|
691
729
|
end
|
|
692
730
|
|
|
693
731
|
it 'generates a new /etc/hosts file referencing each host' do
|
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: 3.
|
|
4
|
+
version: 3.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vox Pupuli
|
|
@@ -32,6 +32,20 @@ dependencies:
|
|
|
32
32
|
- - "<"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
34
|
version: '4'
|
|
35
|
+
- !ruby/object:Gem::Dependency
|
|
36
|
+
name: irb
|
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '2'
|
|
42
|
+
type: :development
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - "<"
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '2'
|
|
35
49
|
- !ruby/object:Gem::Dependency
|
|
36
50
|
name: rake
|
|
37
51
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,14 +80,14 @@ dependencies:
|
|
|
66
80
|
requirements:
|
|
67
81
|
- - "~>"
|
|
68
82
|
- !ruby/object:Gem::Version
|
|
69
|
-
version:
|
|
83
|
+
version: 5.1.0
|
|
70
84
|
type: :development
|
|
71
85
|
prerelease: false
|
|
72
86
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
87
|
requirements:
|
|
74
88
|
- - "~>"
|
|
75
89
|
- !ruby/object:Gem::Version
|
|
76
|
-
version:
|
|
90
|
+
version: 5.1.0
|
|
77
91
|
- !ruby/object:Gem::Dependency
|
|
78
92
|
name: beaker
|
|
79
93
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -197,14 +211,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
197
211
|
version: '3.2'
|
|
198
212
|
- - "<"
|
|
199
213
|
- !ruby/object:Gem::Version
|
|
200
|
-
version: '
|
|
214
|
+
version: '5'
|
|
201
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
216
|
requirements:
|
|
203
217
|
- - ">="
|
|
204
218
|
- !ruby/object:Gem::Version
|
|
205
219
|
version: '0'
|
|
206
220
|
requirements: []
|
|
207
|
-
rubygems_version:
|
|
221
|
+
rubygems_version: 4.0.3
|
|
208
222
|
specification_version: 4
|
|
209
223
|
summary: Docker hypervisor for Beaker acceptance testing framework
|
|
210
224
|
test_files: []
|