Prior to March 2019 we, the JUnit team, used various continuous integration (CI) services to perform CI checks, from a self-managed Jenkins instance on CloudBees to a Travis CI and AppVeyor setup.
Managing three different setups was not ideal, so the team reduced the CI services used to two: Travis for Linux and Mac builds and AppVeyor for Windows checks. This worked quite well, but we always wanted to have a single CI service to tackle all platforms and tasks. Travis CI introduced support for Windows, but the performance and internal setup made us hang on to AppVeyor for now.
Enter: Azure Pipelines
With Microsoft releasing Azure Pipelines to the public and with a good free plan for open source projects, the JUnit team quickly saw that this service matched all of the technical requirements needed to build, test, and release the JUnit project, under a single hood.
That’s why Azure Pipelines is now the official CI build service for JUnit 5. It performs all of the checks on submitted pull requests, including builds on top of the latest released version of OpenJDK and early access builds of the next OpenJDK, and does so across the three major operating systems: macOS, Linux, and Windows.
Initial work and next steps
Users of the JUnit project can visit dev.azure.com/junit-team/junit5/_build to inspect all builds produced by the JUnit team in detail. Users will find four build jobs for operating systems, one build specifically set up for test coverage, and two builds related to publishing snapshot assets.
Besides building the project, the JUnit team also uses Azure Pipelines to update snapshot releases of the JUnit project on the open source software repository by Sonatype at oss.sonatype.org/content/repositories/snapshots/org/junit/, as well the user guide that is published under junit.org/junit5/docs/snapshot/user-guide/.
The next step for our team is to look at adopting the service to also release the stable versions to Maven Central. Hopefully this will meet nicely with the upcoming feature of caching for even faster builds, which the Azure Pipelines engineering team has already started developing.
In summary, the JUnit team is realizing the following benefits from this solution:
- Easy configuration.
- Use of a single service for all platforms.
- Ability to fully customize the builds using shell scripts.
- Ability to test the builds on latest and early access builds of OpenJDK using Docker containers.
- High performance and access to parallel builds.
- Straightforward integration with GitHub.
- Great support from the Azure team.
Developers interested in learning how the JUnit team is using Azure Pipelines are welcome to read the two configuration files needed for the entire pipeline flow: azure-pipelines.yml and azure-gradle-step.yml.
Thanks to Bruno Borges and Edward Thomson for helping us in this journey with Azure Pipelines.