test-driven-infrastructure-example
test-driven-infrastructure-example copied to clipboard
jenkins job config
Hello,
Could you please share some details about Jenkins job configuration?
Thanks in advance!
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 thanks