test-driven-infrastructure-example icon indicating copy to clipboard operation
test-driven-infrastructure-example copied to clipboard

jenkins job config

Open bborysenko opened this issue 9 years ago • 2 comments

Hello,

Could you please share some details about Jenkins job configuration?

Thanks in advance!

bborysenko avatar Nov 18 '15 09:11 bborysenko

Hello,

The jenkins job looks like:

for image in default production; do
    docker pull philpep/test-driven-infrastructure-example:$image &
done
wait
vagrant up --no-provision --provider=docker
tox

I also use the jenkins docker plugin with the image philpep/jenkins-slave:jessie (from https://github.com/philpep/jenkins-slave). The image have docker and vagrant so in the build config I also start docker with

sudo DOCKER_DAEMON_ARGS="--registry-mirror=http://192.168.31.24:5000" wrapdocker true > docker.log 2>&1

(The mirror is part of my infrastructure).

BUT: This setup isn't very stable and running docker in docker is not a good idea (see https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/)

So I recommend that you use a normal jenkins slave who has vagrant and docker installed. Just make a vagrant destroy -f after and before the build config.

philpep avatar Nov 18 '15 13:11 philpep

@philpep thanks

bborysenko avatar Nov 19 '15 13:11 bborysenko