http://JENKINS_URL/job/test/pipeline-syntax/
node { def mvnHome stage('Preparation') { // for display purposes checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: 'クレデンシャルID', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: 'リポジトリURL']], workspaceUpdater: [$class: 'UpdateUpdater']]) mvnHome = tool 'M3' } stage('Build') { // Run the maven build if (isUnix()) { sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package" } else { bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/) } } stage('Results') { junit '**/target/surefire-reports/TEST-*.xml' archive 'target/*.jar' } }