kitchen-docker 3.0.0 → 3.2.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 +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/lint.yml +99 -0
- data/.github/workflows/publish.yaml +32 -0
- data/.gitignore +1 -0
- data/.markdownlint.yaml +6 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +2 -3
- data/CHANGELOG.md +40 -0
- data/Gemfile +20 -1
- data/README.md +16 -9
- data/Rakefile +13 -36
- data/cookbooks +1 -0
- data/kitchen-docker.gemspec +9 -30
- data/kitchen.windows.yml +2 -4
- data/kitchen.yml +58 -26
- data/lib/kitchen/docker/container/linux.rb +17 -17
- data/lib/kitchen/docker/container/windows.rb +11 -11
- data/lib/kitchen/docker/container.rb +7 -7
- data/lib/kitchen/docker/docker_version.rb +1 -1
- data/lib/kitchen/docker/erb_context.rb +3 -3
- data/lib/kitchen/docker/helpers/cli_helper.rb +33 -33
- data/lib/kitchen/docker/helpers/container_helper.rb +30 -28
- data/lib/kitchen/docker/helpers/dockerfile_helper.rb +34 -34
- data/lib/kitchen/docker/helpers/file_helper.rb +4 -4
- data/lib/kitchen/docker/helpers/image_helper.rb +28 -14
- data/lib/kitchen/docker/helpers/inspec_helper.rb +62 -40
- data/lib/kitchen/driver/docker.rb +34 -40
- data/lib/kitchen/transport/docker.rb +15 -16
- data/release-please-config.json +12 -0
- data/renovate.json +8 -0
- data/spec/docker_spec.rb +108 -0
- data/spec/dockerfile_helper_spec.rb +109 -0
- data/spec/inspec_helper_spec.rb +58 -0
- data/{test/spec → spec}/spec_helper.rb +5 -26
- data/test/Dockerfile +4 -5
- data/test/cookbooks/cinc_test/metadata.rb +2 -0
- data/test/cookbooks/cinc_test/recipes/default.rb +10 -0
- data/test/cookbooks/docker_test/attributes/default.rb +1 -0
- data/test/cookbooks/docker_test/metadata.rb +3 -0
- data/test/cookbooks/docker_test/recipes/default.rb +94 -0
- data/test/integration/cinc/inspec/cinc_spec.rb +21 -0
- data/test/integration/default/disabled/default_spec.rb +6 -6
- data/test/integration/inspec/inspec_spec.rb +3 -3
- metadata +26 -211
- data/.cane +0 -0
- data/.github/dependabot.yml +0 -7
- data/.github/workflows/ci.yml +0 -124
- data/.tailor +0 -4
- data/lib/docker/version.rb +0 -25
- data/lib/train/docker.rb +0 -125
- data/test/spec/docker_spec.rb +0 -64
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c9d06e9cc15a17fcaa0658c0cb33719baf0bbe46211269975ae66dbf5bfed4c
|
|
4
|
+
data.tar.gz: 367a618236ccbcb315dbe8d69cec049f7f26b5bcd35c640f7dea6d5c5528aed5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b17b6a8042a54d09b0e77ef0955d41d3e7b4574e1c634429b1a8a5c06dfed9d02ad86b03d86588f11f328897ae028e0925fbcf4b30b014d3ad81f0670017b80e
|
|
7
|
+
data.tar.gz: 4821086d0078af8b2919010e7373646922cb17e2549be27537572004f4c95ff7ac39c7fd39a61e1607bbff50e8090d564f309dd168f11b0d3560b242bbd7e1c9
|
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@test-kitchen/maintainers
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'Lint, Unit & Integration Tests'
|
|
3
|
+
|
|
4
|
+
"on":
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
CHEF_LICENSE_KEY: ${{ secrets.CHEF_LICENSE_KEY }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
lint-unit:
|
|
12
|
+
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main
|
|
13
|
+
|
|
14
|
+
integration-windows:
|
|
15
|
+
name: Windows ${{matrix.suite}} ${{matrix.os}}
|
|
16
|
+
runs-on: windows-latest
|
|
17
|
+
needs: lint-unit
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
suite:
|
|
22
|
+
- default
|
|
23
|
+
os:
|
|
24
|
+
- windows-2022
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
- uses: ruby/setup-ruby@v1
|
|
28
|
+
with:
|
|
29
|
+
ruby-version: "3.4"
|
|
30
|
+
bundler-cache: true
|
|
31
|
+
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
|
|
32
|
+
|
|
33
|
+
integration-linux:
|
|
34
|
+
name: Linux ${{matrix.suite}} ${{matrix.os}}
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
needs: lint-unit
|
|
37
|
+
strategy:
|
|
38
|
+
fail-fast: false
|
|
39
|
+
matrix:
|
|
40
|
+
suite:
|
|
41
|
+
- default
|
|
42
|
+
- no-build-context
|
|
43
|
+
- arm64
|
|
44
|
+
- amd64
|
|
45
|
+
- inspec
|
|
46
|
+
os:
|
|
47
|
+
- almalinux-8
|
|
48
|
+
- almalinux-9
|
|
49
|
+
- almalinux-10
|
|
50
|
+
- amazonlinux-2023
|
|
51
|
+
- ubuntu-2204
|
|
52
|
+
- ubuntu-2404
|
|
53
|
+
- ubuntu-2604
|
|
54
|
+
- fedora-latest
|
|
55
|
+
- centos-stream-9
|
|
56
|
+
- centos-stream-10
|
|
57
|
+
- oraclelinux-8
|
|
58
|
+
- oraclelinux-9
|
|
59
|
+
- oraclelinux-10
|
|
60
|
+
- rockylinux-8
|
|
61
|
+
- rockylinux-9
|
|
62
|
+
- rockylinux-10
|
|
63
|
+
- debian-13
|
|
64
|
+
- opensuse-16
|
|
65
|
+
- dockerfile
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v7
|
|
68
|
+
- uses: ruby/setup-ruby@v1
|
|
69
|
+
with:
|
|
70
|
+
ruby-version: "3.4"
|
|
71
|
+
bundler-cache: true
|
|
72
|
+
- name: Set up QEMU
|
|
73
|
+
uses: docker/setup-qemu-action@v4
|
|
74
|
+
- name: Set up Docker Buildx
|
|
75
|
+
uses: docker/setup-buildx-action@v4
|
|
76
|
+
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
|
|
77
|
+
|
|
78
|
+
integration-capabilities:
|
|
79
|
+
name: Linux ${{matrix.suite}} ${{matrix.os}}
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
needs: lint-unit
|
|
82
|
+
strategy:
|
|
83
|
+
fail-fast: false
|
|
84
|
+
matrix:
|
|
85
|
+
suite:
|
|
86
|
+
- capabilities
|
|
87
|
+
os:
|
|
88
|
+
- ubuntu-2204
|
|
89
|
+
- ubuntu-2404
|
|
90
|
+
- ubuntu-2604
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v7
|
|
93
|
+
- uses: ruby/setup-ruby@v1
|
|
94
|
+
with:
|
|
95
|
+
ruby-version: "3.4"
|
|
96
|
+
bundler-cache: true
|
|
97
|
+
- name: Set up Docker Buildx
|
|
98
|
+
uses: docker/setup-buildx-action@v4
|
|
99
|
+
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-please
|
|
3
|
+
|
|
4
|
+
"on":
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release-please:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: googleapis/release-please-action@v5
|
|
13
|
+
id: release
|
|
14
|
+
with:
|
|
15
|
+
token: ${{ secrets.PORTER_GITHUB_TOKEN }}
|
|
16
|
+
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v7
|
|
19
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
20
|
+
|
|
21
|
+
- name: Build and publish to GitHub Package
|
|
22
|
+
uses: actionshub/publish-gem-to-github@main
|
|
23
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
24
|
+
with:
|
|
25
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
owner: ${{ secrets.OWNER }}
|
|
27
|
+
|
|
28
|
+
- name: Build and publish to RubyGems
|
|
29
|
+
uses: actionshub/publish-gem-to-rubygems@main
|
|
30
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
31
|
+
with:
|
|
32
|
+
token: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/.gitignore
CHANGED
data/.markdownlint.yaml
ADDED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Future CHANGELOG notes will be in GitHub release notes
|
|
4
4
|
|
|
5
|
+
## [3.2.3](https://github.com/test-kitchen/kitchen-docker/compare/v3.2.2...v3.2.3) (2026-06-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* release please configs & tests ([#418](https://github.com/test-kitchen/kitchen-docker/issues/418)) ([9be9d75](https://github.com/test-kitchen/kitchen-docker/commit/9be9d754fd025dd721f1863e23e5502744f5bafb))
|
|
11
|
+
|
|
12
|
+
## [3.2.2](https://github.com/test-kitchen/kitchen-docker/compare/v3.2.1...v3.2.2) (2026-06-22)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Fix curl package conflict in Amazon Linux 2022 images ([#436](https://github.com/test-kitchen/kitchen-docker/issues/436)) ([4eccec9](https://github.com/test-kitchen/kitchen-docker/commit/4eccec928556a1c6fc48e7fcf14de83a9ced5afa))
|
|
18
|
+
|
|
19
|
+
## [3.2.1](https://github.com/test-kitchen/kitchen-docker/compare/v3.2.0...v3.2.1) (2026-01-22)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* bump tk dep <5 ([#446](https://github.com/test-kitchen/kitchen-docker/issues/446)) ([f27d137](https://github.com/test-kitchen/kitchen-docker/commit/f27d1374c1efd35769563683c5782849162c4f0c))
|
|
25
|
+
* Ignore vendor directory ([#439](https://github.com/test-kitchen/kitchen-docker/issues/439)) ([1c1c6a2](https://github.com/test-kitchen/kitchen-docker/commit/1c1c6a282ba52c2bf48b2ae0b181bc2fb3cf8bab))
|
|
26
|
+
* Remove obsolete Arch Linux limits.conf workaround ([#438](https://github.com/test-kitchen/kitchen-docker/issues/438)) ([ed14bc6](https://github.com/test-kitchen/kitchen-docker/commit/ed14bc6e1f95a0d444471c5aed837d9a0c1d852b))
|
|
27
|
+
* Remove use of DSA keys due to openssh deprecation ([#427](https://github.com/test-kitchen/kitchen-docker/issues/427)) ([f42bd6c](https://github.com/test-kitchen/kitchen-docker/commit/f42bd6c2930becd1524551b8f412ab934a80a326))
|
|
28
|
+
* Support docker build output for Docker Desktop v4.31 ([#423](https://github.com/test-kitchen/kitchen-docker/issues/423)) ([511e4ad](https://github.com/test-kitchen/kitchen-docker/commit/511e4ad36856b9e2eccceb56603586e6cebd296a))
|
|
29
|
+
* Use newer syntax for ENV variables ([#424](https://github.com/test-kitchen/kitchen-docker/issues/424)) ([2007a0d](https://github.com/test-kitchen/kitchen-docker/commit/2007a0dcc6461537412dd46084144beb89731d1a))
|
|
30
|
+
|
|
31
|
+
## [3.2.0](https://github.com/test-kitchen/kitchen-docker/compare/v3.1.0...v3.2.0) (2023-11-27)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* Tell the user when we can't remove the image if it's in use ([#406](https://github.com/test-kitchen/kitchen-docker/issues/406)) ([bcb7c2b](https://github.com/test-kitchen/kitchen-docker/commit/bcb7c2bc5144ec63c6bde7b8947de33d5484e718))
|
|
37
|
+
|
|
38
|
+
## [3.1.0](https://github.com/test-kitchen/kitchen-docker/compare/v3.0.0...v3.1.0) (2023-11-27)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* Update workflows ([#410](https://github.com/test-kitchen/kitchen-docker/issues/410)) ([01acb1e](https://github.com/test-kitchen/kitchen-docker/commit/01acb1e00e45d02f71f70f68903c39d320d962df))
|
|
44
|
+
|
|
5
45
|
## 2.14.0 - November 13, 2023
|
|
6
46
|
|
|
7
47
|
- Make sure the /etc/sudoers.d directory exists by @garethgreenaway in [#397](https://github.com/test-kitchen/kitchen-docker/pull/397)
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
source
|
|
1
|
+
source "https://rubygems.org"
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
|
+
|
|
5
|
+
group :development do
|
|
6
|
+
# Integration testing gems.
|
|
7
|
+
gem "kitchen-cinc-auditor", git: "https://github.com/test-kitchen/kitchen-cinc-auditor.git"
|
|
8
|
+
gem "cinc-auditor-bin", source: "https://rubygems.cinc.sh"
|
|
9
|
+
gem "kitchen-cinc"
|
|
10
|
+
gem "train", ">= 2.1", "< 4.0" # validate 4.x when it's released
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
group :test do
|
|
14
|
+
gem "bundler"
|
|
15
|
+
gem "rake"
|
|
16
|
+
gem "rspec", "~> 3.2"
|
|
17
|
+
gem "rspec-its", "~> 2.0"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
group :cookstyle do
|
|
21
|
+
gem "cookstyle"
|
|
22
|
+
end
|
data/README.md
CHANGED
|
@@ -127,18 +127,21 @@ Examples:
|
|
|
127
127
|
|
|
128
128
|
If you are using the InSpec verifier on Windows, using named pipes for the Docker engine will not work with the Docker transport.
|
|
129
129
|
Set the socket option with the TCP socket address of the Docker engine as shown below:
|
|
130
|
+
|
|
130
131
|
```yaml
|
|
131
132
|
socket: tcp://localhost:2375
|
|
132
133
|
```
|
|
133
134
|
|
|
134
135
|
The Docker engine must be configured to listen on a TCP port (default port is 2375). This can be configured by editing the configuration file
|
|
135
136
|
(usually located in `C:\ProgramData\docker\config\daemon.json`) and adding the hosts value:
|
|
136
|
-
|
|
137
|
+
|
|
138
|
+
```json
|
|
137
139
|
"hosts": ["tcp://0.0.0.0:2375"]
|
|
138
140
|
```
|
|
139
141
|
|
|
140
142
|
Example configuration is shown below:
|
|
141
|
-
|
|
143
|
+
|
|
144
|
+
```json
|
|
142
145
|
{
|
|
143
146
|
"registry-mirrors": [],
|
|
144
147
|
"insecure-registries": [],
|
|
@@ -171,6 +174,7 @@ Configuration section for more details).
|
|
|
171
174
|
The isolation technology for the container. This is not set by default and will use the default container isolation settings.
|
|
172
175
|
|
|
173
176
|
For example, the following driver configuration options can be used to specify the container isolation technology for Windows containers:
|
|
177
|
+
|
|
174
178
|
```yaml
|
|
175
179
|
# Hyper-V
|
|
176
180
|
isolation: hyperv
|
|
@@ -238,6 +242,7 @@ driver_config:
|
|
|
238
242
|
provision_command: curl -L https://www.opscode.com/chef/install.sh | bash
|
|
239
243
|
require_chef_omnibus: false
|
|
240
244
|
```
|
|
245
|
+
|
|
241
246
|
### env_variables
|
|
242
247
|
|
|
243
248
|
Adds environment variables to Docker container
|
|
@@ -287,12 +292,12 @@ Examples:
|
|
|
287
292
|
### memory
|
|
288
293
|
|
|
289
294
|
Sets the memory limit for the suite container in bytes. Otherwise use Dockers
|
|
290
|
-
default. You can read more about `memory.limit_in_bytes` [
|
|
295
|
+
default. You can read more about `memory.limit_in_bytes` in the [Resource Management Guide][memory_limit].
|
|
291
296
|
|
|
292
297
|
### cpu
|
|
293
298
|
|
|
294
299
|
Sets the CPU shares (relative weight) for the suite container. Otherwise use
|
|
295
|
-
Dockers defaults. You can read more about cpu.shares [
|
|
300
|
+
Dockers defaults. You can read more about cpu.shares in the [Resource Management Guide][cpu_shares].
|
|
296
301
|
|
|
297
302
|
### volume
|
|
298
303
|
|
|
@@ -376,6 +381,7 @@ Examples:
|
|
|
376
381
|
- 8.8.8.8
|
|
377
382
|
- 8.8.4.4
|
|
378
383
|
```
|
|
384
|
+
|
|
379
385
|
### http\_proxy
|
|
380
386
|
|
|
381
387
|
Sets an http proxy for the suite container using the `http_proxy` environment variable.
|
|
@@ -385,6 +391,7 @@ Examples:
|
|
|
385
391
|
```yaml
|
|
386
392
|
http_proxy: http://proxy.host.com:8080
|
|
387
393
|
```
|
|
394
|
+
|
|
388
395
|
### https\_proxy
|
|
389
396
|
|
|
390
397
|
Sets an https proxy for the suite container using the `https_proxy` environment variable.
|
|
@@ -394,6 +401,7 @@ Examples:
|
|
|
394
401
|
```yaml
|
|
395
402
|
https_proxy: http://proxy.host.com:8080
|
|
396
403
|
```
|
|
404
|
+
|
|
397
405
|
### forward
|
|
398
406
|
|
|
399
407
|
Set suite container port(s) to forward to the host machine. You may specify
|
|
@@ -525,11 +533,11 @@ Share a host device with the container. Host device must be an absolute path.
|
|
|
525
533
|
|
|
526
534
|
Examples:
|
|
527
535
|
|
|
528
|
-
```
|
|
536
|
+
```yaml
|
|
529
537
|
devices: /dev/vboxdrv
|
|
530
538
|
```
|
|
531
539
|
|
|
532
|
-
```
|
|
540
|
+
```yaml
|
|
533
541
|
devices:
|
|
534
542
|
- /dev/vboxdrv
|
|
535
543
|
- /dev/vboxnetctl
|
|
@@ -637,6 +645,7 @@ example:
|
|
|
637
645
|
|
|
638
646
|
## License
|
|
639
647
|
|
|
648
|
+
```text
|
|
640
649
|
Copyright 2013-2016, [Sean Porter](https://github.com/portertech)
|
|
641
650
|
Copyright 2015-2016, [Noah Kantrowitz](https://github.com/coderanger)
|
|
642
651
|
|
|
@@ -651,14 +660,12 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
651
660
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
652
661
|
See the License for the specific language governing permissions and
|
|
653
662
|
limitations under the License.
|
|
663
|
+
```
|
|
654
664
|
|
|
655
665
|
[issues]: https://github.com/test-kitchen/kitchen-docker/issues
|
|
656
|
-
[license]: https://github.com/test-kitchen/kitchen-docker/blob/master/LICENSE
|
|
657
666
|
[repo]: https://github.com/test-kitchen/kitchen-docker
|
|
658
667
|
[docker_installation]: https://docs.docker.com/installation/#installation
|
|
659
|
-
[docker_upstart_issue]: https://github.com/dotcloud/docker/issues/223
|
|
660
668
|
[docker_index]: https://index.docker.io/
|
|
661
|
-
[docker_default_image]: https://index.docker.io/_/base/
|
|
662
669
|
[test_kitchen_docs]: https://kitchen.ci/docs/getting-started/introduction/
|
|
663
670
|
[chef_omnibus_dl]: https://downloads.chef.io/chef-client/
|
|
664
671
|
[cpu_shares]: https://docs.fedoraproject.org/en-US/Fedora/17/html/Resource_Management_Guide/sec-cpu.html
|
data/Rakefile
CHANGED
|
@@ -1,42 +1,19 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
|
-
require 'cane/rake_task'
|
|
3
|
-
require 'tailor/rake_task'
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
cane.canefile = './.cane'
|
|
8
|
-
end
|
|
3
|
+
require "rspec/core/rake_task"
|
|
4
|
+
RSpec::Core::RakeTask.new(:unit)
|
|
9
5
|
|
|
10
|
-
|
|
6
|
+
desc "Run all unit tests"
|
|
7
|
+
task test: %i{unit}
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
begin
|
|
10
|
+
require "cookstyle/chefstyle"
|
|
11
|
+
require "rubocop/rake_task"
|
|
12
|
+
RuboCop::RakeTask.new(:style) do |task|
|
|
13
|
+
task.options += ["--display-cop-names", "--no-color"]
|
|
14
|
+
end
|
|
15
|
+
rescue LoadError
|
|
16
|
+
puts "cookstyle/chefstyle is not available. (sudo) gem install cookstyle to do style checking."
|
|
16
17
|
end
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
task :quality => [:cane, :tailor, :stats]
|
|
20
|
-
|
|
21
|
-
task :default => [:quality]
|
|
22
|
-
|
|
23
|
-
# begin
|
|
24
|
-
# require 'kitchen/rake_tasks'
|
|
25
|
-
# Kitchen::RakeTasks.new
|
|
26
|
-
# rescue LoadError
|
|
27
|
-
# puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
|
|
28
|
-
# end
|
|
29
|
-
|
|
30
|
-
# Create the spec task.
|
|
31
|
-
require 'rspec/core/rake_task'
|
|
32
|
-
RSpec::Core::RakeTask.new(:spec, :tag) do |t, args|
|
|
33
|
-
t.rspec_opts = [].tap do |a|
|
|
34
|
-
a << '--color'
|
|
35
|
-
a << "--format #{ENV['CI'] ? 'documentation' : 'Fuubar'}"
|
|
36
|
-
a << '--backtrace' if ENV['VERBOSE'] || ENV['DEBUG']
|
|
37
|
-
a << "--seed #{ENV['SEED']}" if ENV['SEED']
|
|
38
|
-
a << "--tag #{args[:tag]}" if args[:tag]
|
|
39
|
-
a << "--default-path test"
|
|
40
|
-
a << '-I test/spec'
|
|
41
|
-
end.join(' ')
|
|
42
|
-
end
|
|
19
|
+
task default: %i{style test}
|
data/cookbooks
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/cookbooks
|
data/kitchen-docker.gemspec
CHANGED
|
@@ -1,40 +1,19 @@
|
|
|
1
|
-
lib = File.expand_path(
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require
|
|
3
|
+
require "kitchen/docker/docker_version"
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = "kitchen-docker"
|
|
7
7
|
spec.version = Kitchen::Docker::DOCKER_VERSION
|
|
8
|
-
spec.authors = [
|
|
9
|
-
spec.email = [
|
|
8
|
+
spec.authors = ["Sean Porter"]
|
|
9
|
+
spec.email = ["portertech@gmail.com"]
|
|
10
10
|
spec.description = %q{A Docker Driver for Test Kitchen}
|
|
11
11
|
spec.summary = spec.description
|
|
12
|
-
spec.homepage =
|
|
13
|
-
spec.license =
|
|
12
|
+
spec.homepage = "https://github.com/test-kitchen/kitchen-docker"
|
|
13
|
+
spec.license = "Apache 2.0"
|
|
14
14
|
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
|
16
|
-
spec.
|
|
17
|
-
spec.require_paths = ['lib']
|
|
16
|
+
spec.require_paths = ["lib"]
|
|
18
17
|
|
|
19
|
-
spec.add_dependency
|
|
20
|
-
|
|
21
|
-
spec.add_development_dependency 'bundler'
|
|
22
|
-
spec.add_development_dependency 'rake'
|
|
23
|
-
|
|
24
|
-
# Style checker gems.
|
|
25
|
-
spec.add_development_dependency 'cane'
|
|
26
|
-
spec.add_development_dependency 'tailor'
|
|
27
|
-
spec.add_development_dependency 'countloc'
|
|
28
|
-
|
|
29
|
-
# Unit testing gems.
|
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.2'
|
|
31
|
-
spec.add_development_dependency 'rspec-its', '~> 1.2'
|
|
32
|
-
spec.add_development_dependency 'fuubar', '~> 2.0'
|
|
33
|
-
spec.add_development_dependency 'simplecov', '~> 0.9'
|
|
34
|
-
spec.add_development_dependency 'codecov', '~> 0.0', '>= 0.0.2'
|
|
35
|
-
spec.add_development_dependency 'chefstyle'
|
|
36
|
-
|
|
37
|
-
# Integration testing gems.
|
|
38
|
-
spec.add_development_dependency 'kitchen-inspec', '~> 2.0'
|
|
39
|
-
spec.add_development_dependency 'train', '>= 2.1', '< 4.0' # validate 4.x when it's released
|
|
18
|
+
spec.add_dependency "test-kitchen", ">= 1.0.0", "< 5.0"
|
|
40
19
|
end
|
data/kitchen.windows.yml
CHANGED
|
@@ -13,12 +13,12 @@ transport:
|
|
|
13
13
|
socket: tcp://localhost:2375
|
|
14
14
|
|
|
15
15
|
provisioner:
|
|
16
|
-
name:
|
|
16
|
+
name: cinc_infra
|
|
17
17
|
|
|
18
18
|
platforms:
|
|
19
19
|
- name: windows
|
|
20
20
|
driver_config:
|
|
21
|
-
image: mcr.microsoft.com/windows/servercore:
|
|
21
|
+
image: mcr.microsoft.com/windows/servercore:ltsc2022
|
|
22
22
|
platform: windows
|
|
23
23
|
|
|
24
24
|
suites:
|
|
@@ -27,7 +27,5 @@ suites:
|
|
|
27
27
|
driver:
|
|
28
28
|
build_context: false
|
|
29
29
|
- name: inspec
|
|
30
|
-
driver:
|
|
31
|
-
provision_command: echo 1
|
|
32
30
|
verifier:
|
|
33
31
|
name: inspec
|
data/kitchen.yml
CHANGED
|
@@ -1,62 +1,94 @@
|
|
|
1
|
-
# <% # Make sure the local copy of the driver is loaded %>
|
|
2
|
-
# <% lib = File.expand_path('../lib', __FILE__) %>
|
|
3
|
-
# <% $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) %>
|
|
4
1
|
---
|
|
5
2
|
driver:
|
|
6
3
|
name: docker
|
|
7
|
-
provision_command: curl -L https://
|
|
4
|
+
provision_command: curl -L https://omnitruck.cinc.sh/install.sh | bash
|
|
8
5
|
|
|
9
6
|
transport:
|
|
10
7
|
name: docker
|
|
11
8
|
|
|
12
9
|
provisioner:
|
|
13
|
-
name:
|
|
10
|
+
name: cinc_infra
|
|
11
|
+
install_strategy: skip
|
|
12
|
+
|
|
13
|
+
verifier:
|
|
14
|
+
name: cinc_auditor
|
|
14
15
|
|
|
15
16
|
platforms:
|
|
16
|
-
- name:
|
|
17
|
-
- name:
|
|
18
|
-
- name:
|
|
17
|
+
- name: almalinux-8
|
|
18
|
+
- name: almalinux-9
|
|
19
|
+
- name: almalinux-10
|
|
20
|
+
- name: amazonlinux-2023
|
|
21
|
+
- name: ubuntu-22.04
|
|
22
|
+
- name: ubuntu-24.04
|
|
23
|
+
- name: ubuntu-26.04
|
|
19
24
|
- name: fedora-latest
|
|
25
|
+
- name: centos-stream-9
|
|
20
26
|
driver:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- name: oraclelinux-
|
|
27
|
+
image: dokken/centos-stream-9
|
|
28
|
+
- name: centos-stream-10
|
|
29
|
+
driver:
|
|
30
|
+
image: dokken/centos-stream-10
|
|
31
|
+
- name: oraclelinux-8
|
|
32
|
+
- name: oraclelinux-9
|
|
33
|
+
- name: oraclelinux-10
|
|
26
34
|
- name: rockylinux-8
|
|
27
|
-
- name:
|
|
28
|
-
- name:
|
|
29
|
-
- name: opensuse-15
|
|
35
|
+
- name: rockylinux-9
|
|
36
|
+
- name: rockylinux-10
|
|
30
37
|
driver:
|
|
31
|
-
image:
|
|
38
|
+
image: dokken/rockylinux-10
|
|
39
|
+
- name: debian-13
|
|
40
|
+
- name: opensuse-16
|
|
41
|
+
driver:
|
|
42
|
+
image: opensuse/leap:16
|
|
32
43
|
- name: dockerfile
|
|
33
44
|
driver:
|
|
34
45
|
username: dockerfile
|
|
35
46
|
password: dockerfile
|
|
36
47
|
dockerfile: test/Dockerfile
|
|
37
|
-
|
|
48
|
+
- name: windows-2022
|
|
49
|
+
driver:
|
|
50
|
+
image: mcr.microsoft.com/windows/servercore:ltsc2022
|
|
51
|
+
provision_command:
|
|
52
|
+
- powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://omnitruck.cinc.sh/install.ps1')); Install-Project -Project cinc -Channel stable"
|
|
53
|
+
provisioner:
|
|
54
|
+
cinc_omnibus_root: 'C:\cinc-project\cinc'
|
|
55
|
+
verifier:
|
|
56
|
+
name: dummy # cinc_auditor uses WinRM for Windows but Windows containers don't have WinRM; verify via follow-up
|
|
38
57
|
|
|
39
58
|
suites:
|
|
40
59
|
- name: default
|
|
60
|
+
run_list:
|
|
61
|
+
- recipe[cinc_test::default]
|
|
62
|
+
verifier:
|
|
63
|
+
inspec_tests:
|
|
64
|
+
- test/integration/cinc/inspec
|
|
65
|
+
- name: docker-test
|
|
66
|
+
run_list:
|
|
67
|
+
- recipe[docker_test::default]
|
|
68
|
+
attributes:
|
|
69
|
+
docker_test:
|
|
70
|
+
revision: <%= `git rev-parse HEAD` %>
|
|
41
71
|
- name: no_build_context
|
|
72
|
+
run_list:
|
|
73
|
+
- recipe[cinc_test::default]
|
|
42
74
|
driver:
|
|
43
75
|
build_context: false
|
|
44
76
|
- name: capabilities
|
|
45
|
-
|
|
77
|
+
run_list:
|
|
78
|
+
- recipe[cinc_test::default]
|
|
46
79
|
driver:
|
|
47
|
-
provision_command:
|
|
48
|
-
- curl -L https://www.chef.io/chef/install.sh | bash
|
|
49
|
-
- apt-get install -y net-tools
|
|
50
80
|
cap_drop:
|
|
51
81
|
- NET_ADMIN
|
|
52
82
|
- name: arm64
|
|
83
|
+
run_list:
|
|
84
|
+
- recipe[cinc_test::default]
|
|
53
85
|
driver:
|
|
54
86
|
docker_platform: linux/arm64
|
|
55
87
|
- name: amd64
|
|
88
|
+
run_list:
|
|
89
|
+
- recipe[cinc_test::default]
|
|
56
90
|
driver:
|
|
57
91
|
docker_platform: linux/amd64
|
|
58
92
|
- name: inspec
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
verifier:
|
|
62
|
-
name: inspec
|
|
93
|
+
run_list:
|
|
94
|
+
- recipe[cinc_test::default]
|