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

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS