wohali opened a new pull request #545: Jenkinsfile for multibranch pipeline build URL: https://github.com/apache/couchdb/pull/545 ## Overview Our Jenkins setup has been using the traditional Jenkins definition, with a job driven by a shell script sitting in the apache/couchdb-ci repository, and a further script baked into each Docker image. To maintain the build process, ~8GB of new images have to be pushed to Docker Hub, which isn't practical or scalable. We also now have requests to have Jenkins securely drive our binary deployment process, by triggering .deb/.rpm/Docker/snap builds. With a classic Jenkins job, we have to use dependent/downstream builds to trigger this behaviour, requiring more manual setup in the Jenkins web UI that is difficult to maintain. This PR adds a Jenkinsfile that uses the new declarative pipeline syntax introduced to Jenkins in February 2017. It's similar to a .travis.yml file but with additional functionality for a multi-stage pipeline, and extra functionality provided by various Jenkins plugins. For instance, the build automatically archives a `make dist` tarball to Jenkins with each build. A new *multibranch* pipeline job has been defined in Jenkins pointing to our repository. Only minimal configuration was required: * Generic credentials were provided for a GitHub API key to poll the couchdb repository for branches and changes. * `couchdb-vm2.a.o` CouchDB credentials were specified for the logfile uploader. * The job is set to only build these origin branches: `master 2.1.x jenkins-pipeline`. No PRs (merged or unmerged, forked or not) are being built at this time due to the heavyweight nature of our Jenkins build - let's leave those to Travis. * The job is set up to keep only the last 10 build result logfiles and archived artefacts. Minor changes were also required to the logfile uploader due to changes in the environment variables available in the multibranch pipeline build. ## Testing recommendations The job is live in Jenkins already. You can see the (list of branches)[https://builds.apache.org/blue/organizations/jenkins/CouchDB/branches/] that have run, as well as a (list of recent activity)[https://builds.apache.org/blue/organizations/jenkins/CouchDB/activity]. Across 4 runs on this branch, we have 1 success and 3 failures. The failures are of 3 sorts: * `docker pull` sometimes hangs on a Jenkins node ((bug here)[https://github.com/moby/moby/issues/12823]) * `couchjs` still segfaults under Jenkins, most often on CentOS 6/7, but at least once in these 4 runs on Debian 8. * There is one failure due to an eunit context teardown. This is an odd new failure type. The logs were successfully uploaded to `couchdb-vm2.a.o` for further analysis, just as they should have been. Note that because I have renamed the job, some of the Blue Ocean links to logfiles don't show up. You can use the Jenkins classic view to access these logs (click the Exit icon at the top left to get there.) One final change to the email address for notifications (currently just to me) will be made and squashed before I push this assuming +1. Emails will go to [email protected] unless otherwise requested. ## Checklist - [X] Code is written and works correctly; - [X] Changes are covered by tests; - [X] Documentation reflects the changes; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
