09 octobre 2017

Jenkins Docker plugin 0.17 released

As new maintainer for this plugin, I just released 0.17. You should see it in Jenkins update center within few hours.

Plugin used to have version 0.xx as the internal API might change at any time, but has been adopted by thousands people, so I think it's time to get a 1.0. That being said, for my first release I preferred to not break everything at once, and only made few fixes and improvements. I plan to have some more 0.x fix versions if required, but next one should be 1.0.

What's new ?
First, I migrated to docker-commons for credentials management (docker API and registry). If you use docker-pipeline this is something you're familiar with. As a side effect you might need to reconfigure your jobs and/or agent templates.

I also introduced an experimental "attached" agent launcher.
Jenkins require a communication channel for the master to control the agent. Any transport protocol is fine, so depending your infrastructure you might rely on SSH or JNLP. But Docker offers an alternative : you probably are used to run docker CLI in interactive, "attached" mode

  ~ docker run -it ubuntu bash
root@89ac63c6802e:/# echo "hello from ubuntu"
hello from ubuntu

root@89ac63c6802e:/# exit

Here Docker CLI uses the plain Docker API an upgrade HTTP protocol to establish a long running terminal session with the container. Jenkins can rely on this stdin/stdout transport to setup required Jenkins remoting channel.

This feature relies on docker-java support for attached mode, my experiments so far demonstrated it works well, but only tests at scale will prove it really works as expected. So please give it a try and let me know :P

What's next in docker-plugin ?

Major point I want to address is lack of support for docker swarm mode. This one would offer Jenkins a scalable build infrastructure. But this will also require some tweaks, as Docker service API is way less powerful than the plain container API. It can't for sample inject some content in a container, or exec inside a container to run some additional commands. So probably this will introduce some constraints, but need to experiment more to know the actual options we have here.






0 commentaires: