Last active
August 1, 2016 07:20
-
-
Save twasink/272d2f7b439793a7adfeaa4b73aa3dd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
node { | |
// Need to replace the '%2F' used by Jenkins to deal with / in the path (e.g. story/...) | |
// because tests that do getResource will escape the % again, and the test files can't be found. | |
// See https://issues.jenkins-ci.org/browse/JENKINS-34564 for more. | |
ws("workspace/${env.JOB_NAME}/${env.BRANCH_NAME}".replace('%2F', '_')) { | |
// Mark the code checkout 'stage'.... | |
stage 'Checkout' | |
checkout scm | |
// Mark the code build 'stage'.... | |
stage 'Build' | |
def mvnHome = tool 'maven-3.3.9' | |
sh "${mvnHome}/bin/mvn clean verify -B" | |
junit testResults: '**/surefire-reports/*.xml' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment