feat: added use_internal_docker_network feature#304
feat: added use_internal_docker_network feature#304tas50 merged 1 commit intotest-kitchen:masterfrom amalucelli:use_internal_docker_network
Conversation
Co-authored-by: AaronKalair
Codecov Report
@@ Coverage Diff @@
## master #304 +/- ##
=======================================
- Coverage 33.77% 32.78% -1%
=======================================
Files 2 2
Lines 228 241 +13
=======================================
+ Hits 77 79 +2
- Misses 151 162 +11
Continue to review full report at Codecov.
|
|
+1 for this, I'm running a Dind (Docker in Docker) setup and I'm getting the following error: |
|
Can we please have this? I do a terrible hack of clobbering |
|
|
||
| def container_ip(state) | ||
| begin | ||
| cmd = "inspect --format '{{ .NetworkSettings.IPAddress }}'" |
There was a problem hiding this comment.
@amalucelli @AaronKalair FYI, there is an issue when using this setup with user defined networks.
In those cases, the IPAddress at the NetworkSettings level is empty, and instead needs to be found on the Network. That nested value is also there when using the default bridge network, so I would think that it should be safe to use in any case:
I was able to get this working by changing the template to '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
|
Nice, I needed this to get Please see the image: ruby:2.5-alpine
services:
- docker:dind
stages:
- functional
verify-centos-7:
before_script:
- apk add docker libffi-dev build-base patch
- docker info
- bundle install
- cd $(bundle show kitchen-docker)
- wget -O use_internal_docker_network.patch https://patch-diff.githubusercontent.com/raw/test-kitchen/kitchen-docker/pull/304.patch
- patch -p1 < use_internal_docker_network.patch
- cd -
stage: functional
tags:
- aws
artifacts:
expire_in: 7d
when: on_failure
paths:
- .kitchen/logs
script:
- kitchen test default-centos-7 -d always |
|
I also need this to get things running on circleci, would love to see this get merged. |
|
Hello, I've verified that this works using our CI system, too. This script is what I used to apply the PR, install the gem with ChefDK, and run Test Kitchen in my cookbook repository. #!/bin/bash
mkdir -p /kitchen
pushd /kitchen
git clone https://github.com/test-kitchen/kitchen-docker
pushd kitchen-docker
git fetch origin pull/304/head:use_internal_docker_network
git checkout use_internal_docker_network
chef exec bundle install
chef exec bundle exec rake install
popd
popd
chef exec kitchen test |
|
Merging based on @jtimberman's experience |
|
It seems that I cannot use kitchen-docker with Will investigate and maybe create another PR. |
As I don't have write access in the base branch of the PR #283, I forked from
master, made the changes of the origin PR and also the one suggested in the comments.Co-authored-by: @AaronKalair