Jenkins Pipelineビルダーをつかう

http://JENKINS_URL/job/test/pipeline-syntax/

svnチェックアウト&ビルドサンプル

  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'
     }
     // call another job without parameter
     stage('PostProcess') {
         build job: 'echotest'
     }
     stage('PostProcess') {
         build job: 'echotest',paramaters:[$class: 'StringParamaterValue', name: 'message', value: 'from previous' ]
     }
  }

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS