Travis CI and Dependabot added to Anonimatron
With new European rules like the GDPR and local variations like the Dutch AVG, interest in Anonimatron is increasing. Although I do not keep track of who is using it and where, sometimes new requirements do pop up. Recently a feature was added to Anonimatron 1.9.2 to also anonymize files.
In the wake of those additions, I planned to give Travis CI a try to automate the builds. It turns out that Travis CI integrates beautifully with GitHub, and automatically builds branches and pull requests right out of the box.
At the office, we had a discussion about keeping libraries up to date with the maven dependency plugin for our client projects. We came up with a system to use the maven dependency plugin on a separate branch to automatically do that on our buildserver. It turns out that there is a service called Dependabot which does nearly the same thing. Dependabot looks at your GitHub project, and creates pull requests for each library it upgrades.
All these services are free for Open Source projects, so Anonimatron would be a great candidate for testing them. I am pretty happy with the way it currently works, and getting this up and running was really simple:
- Make sure your Open Source project builds with any of the main stream build tools supported by Travis CI like Maven or Gradle. Try to keep the build as simple as possible.
- Create an account with Travis CI with your GitHub account. After registration, Travis CI shows you a list of your projects. Select one and follow the steps. After a few mouse clicks Travis CI should be building your project.
- Create an account with Dependabot. As in step 2, select your project and follow the Dependabot guide to setting it up.
- After a while you should see pull request arriving in your GitHub project, one for each upgraded library. Travis CI immediately builds those Pull Requests and a green tickmark or red cross shows next to the branch.
There you go, your project now has automatic builds and automatic version upgrades, like a pro. Please note that in order to confidently upgrade libraries, you need to have proper tests! Look at the Anonimatron Test Suite to get an idea.
Happy coding!