- 追加された行はこの色です。
- 削除された行はこの色です。
-jenkins 2.0から利用可能になったpipelineのまとめ
#contents
*Jenkins Pipelineビルダーをつかう [#ce257e7a]
http://JENKINS_URL/job/test/pipeline-syntax/
*svnチェックアウト&ビルドサンプル [#eeb5f276]
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'
}
}