Minimal Jenkinsfile for a Gradle Build
Starting work on a new project for a client, and their devops organization is off working on some new framework for CI/CD deploys. So in the meantime we just need a super minimal Jenkins build.
The requirements I have
for this are:
- Run the build
- Run the tests
- Display test report
- Execute on every push to git, including PR branches
- Email failures
With that in mind, here is a quite minimal
Jenkins script for our gradle build:
I'm not 100% sure if that last email block is needed, but it worked and I don't feel like messing with it.
Also our builds are running against BitBucket using a Jenkins plugin, and even though we have it setup without needing polling, we still needed that Bitbucket poll hack. So here you go!