Dockerizing our CI plugin test environments
Docker is a fantastic virtualization tool that became a game changer when it was released a few years back.
Initially Linux-only, it's now a powerful system that enables users to save time setting up test environments regardless of the OS they use. That's a remarkable feature, especially when you're working with an extensible, multi-platform system such as Plastic SCM.
Developing plugins for third-party systems can be tricky. Especially when you have to set up complex systems just try a new feature. You just want to get the work done, right?
We usually worked with virtual machines. We had a couple of Linux instances, we reverted one of them to a clean state and then we installed the CI system that the plugin extends. This way we don't have hard drives filled up with CI installations. That wouldn't be easy to maintain since it's difficult to know in which state each snapshot is.
Unfortunately, that's really tedious.
So, to scratch that itch, we started building Docker environments that make the process easier. We wanted to bring up the full CI system with one command, plugins included. We wanted to avoid using virtual machines. And we wanted to make the whole process easy to replicate and share, so our teammates can take advantage of the time we invested to make that happen.
We already have Docker Compose definitions for Bamboo and Jenkins. We'll keep improving them and even adding definitions for other CI systems (TeamCity, CI with mergebots...) as soon as we have a need for that.
Remember! These setups are not meant to be used in a production environment. They're just a way to spend less time setting up environments and more time improving the plugins. That said, you can always take our definitions to prepare your own Docker images or Compose definitions. It might be helpful if you're interested in using Plastic SCM in your dockerized CI setup!
Have a look at the code in our plasticscm-ci-testing repo
It's worth pointing out that this wasn't possible until VMWare released version 15.5.5. That was the first version that could run in Windows hosts with Hyper-V features - precisely what Docker needs. We use VMWare almost everyday to test our product in multiple platforms, so we couldn't simply ditch it and move to Docker. We also use Windows machines to develop.
But the current version of VMWare allows us to bring the best of both worlds to our Windows machines. And we can also enable version 2 of the Windows Subsystem for Linux! That's terrific news for Linux enthusiasts such as myself.
In a nutshell, we're introducing Docker in our regular development to bring time spent setting up environments to a minimum. That translates in a greater throughput in our release pipeline, which esentially means more features for you, faster!
0 comentarios: