From 324b3faba79993fc29292ab09245f421e9dd40e2 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 26 Dec 2015 21:32:16 -0800 Subject: [PATCH] Add a Jenkinsfile for building --- Jenkinsfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..f402453 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,37 @@ +/* + * This is a multibranch workflow file for defining how this project should be + * built, tested and deployed + */ + +def nodeLabel = 'java' + +node(nodeLabel) { + stage 'Clean workspace' + /* Running on a fresh Docker instance makes this redundant, but just in + * case the host isn't configured to give us a new Docker image for every + * build, make sure we clean things before we do anything + */ + deleteDir() + + + stage 'Checkout source' + /* + * Represents the SCM configuration in a "Workflow from SCM" project build. Use checkout + * scm to check out sources matching Jenkinsfile with the SCM details from + * the build that is executing this Jenkinsfile. + * + * when not in multibranch: https://issues.jenkins-ci.org/browse/JENKINS-31386 + */ + checkout scm + + + stage 'Build and test' + /* if we can't install everything we need for Ruby in less than 15 minutes + * we might as well just give up + */ + timeout(30) { + sh './gradlew -iS' + } +} + +// vim: ft=groovy