Continuos Integration with docker
The Problem
Git has made merging almost a non event. A common way to handle development is to have a separate branch per feature and merge that feature back to the development/master branches when the feature is done and all tests pass. For unit tests, there is already viable tooling that can help you auto-test feature branches before you merge them into develop or master.Travis-ci already offers this for Github projects, you should try it out if you haven’t already!
When it comes to integration tests there is a problem. When you have complex integration tests that need a running environment, it can become hard to manage all these branches and environments. You could spin up VMs for each feature branch that you create or try to share one environment for all feature branches. Or the worst alternative: you can leave integration tests for the integration branch. The problem with the last option is that it breaks the principle of “do no harm”: you want to merge when you know it won’t break things and now you have a branch that’s meant to break? Sounds like bad design to me.
DockerOver the last year Docker sprung up as a technology. Docker is a technology to manage and run lightweight Linux containers. Containers can be booted in milliseconds and provide full isolation of the filesystem, network and processes. A couple of months ago I realised Docker could be the solution to the issues we’ve been having with our old CI setup and started looking into ways to integrate Docker with Jenkins.
Integrating Jenkins with Docker
I started by looking at existing Jenkins plugins that would handle this, but wasn’t pleased with the existing solutions. For example the Jenkins Docker plugin requires Docker images running SSH and provisions those containers dynamically as Jenkins slaves which is in my opinion needlessly complex. I also wanted to integrate Docker as seamlessly as possible, without requiring team members to have a lot of work settings things up.
To Dpwnlaod Docker-plugin click here
Part1
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment