Skip to content

Commit

Permalink
#11 use ${env.BRANCH_NAME}
Browse files Browse the repository at this point in the history
  • Loading branch information
p-a-s-c-a-l committed Apr 27, 2017
1 parent 92a0bbd commit 4956c9f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -3,25 +3,20 @@ pipeline {

options {
buildDiscarder(logRotator(numToKeepStr:'5'))
timeout(time: 60, unit: 'MINUTES')
timeout(time: 15, unit: 'MINUTES')
disableConcurrentBuilds()
}

stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/dev']],
checkout([$class: 'GitSCM', branches: [[name: "*/${env.BRANCH_NAME}"]],
extensions: [[$class: 'CleanCheckout'],
[$class: 'LocalBranch', localBranch: 'dev']]])
[$class: 'LocalBranch', localBranch: "${env.BRANCH_NAME}"]]])
}
}

stage('build') {

when {
branch 'dev'
}

steps {
withMaven(
maven: 'default', // Tools declared in the Jenkins "Global Tool Configuration"

0 comments on commit 4956c9f

Please sign in to comment.