Reputation: 1390
I'm looking for the best way to integrate Docker into Jenkins to execute build/test commands. The best source I have found is this blog post: http://blog.howareyou.com/post/62157486858/continuous-delivery-with-docker-and-jenkins-part-i
It basically offers to wrap all execution commands with "docker run".
I would like to see better integrations with Jenkins plugin but I couldn't find anything in this area. Could anyone suggest a good way to proceed? Is there any project on the way to address this?
Thanks
Upvotes: 8
Views: 6002
Reputation: 337
Wouldn't you just create a shell script to setup the docker environment as you normally would (or better still push the docker container in to a private repo) and get Jenkins to pull it down and run the test suite inside docker using the daemonised mode?
Maybe you could use directory shares to drop the output of the test data so that Jenkins can read it and display?
Hopefully a point in the right direction...
Upvotes: 2
Reputation: 107
There's a second blog post which goes into more detail about the setup. The missing piece was dockerize which makes the Jenkins & Docker integration painless. If you look into the Ruby app example, there's a Vagrantfile which will set everything up for you, use that as the starting point for your own setup.
Upvotes: 3