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',parameters: [[$class: 'StringParameterValue', name: 'message', value: 'from previous']]
     }
       
  }

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-10-14 (金) 13:16:53