Skip to content

Commit

Permalink
This closes #157
Browse files Browse the repository at this point in the history
  • Loading branch information
ahgittin committed Dec 20, 2019
2 parents ea139c6 + bd3bde1 commit e7cfac8
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
*/

node(label: 'ubuntu') {
properties([
pipelineTriggers([
issueCommentTrigger('.*test this please.*')
if (env.CHANGE_ID) {
properties([
pipelineTriggers([
issueCommentTrigger('.*test this please.*')
])
])
])
}

catchError {
def environmentDockerImage
Expand All @@ -46,15 +48,6 @@ node(label: 'ubuntu') {
sh 'mvn clean install -Duser.home=/var/maven -Duser.name=jenkins'
}
}

// Conditional stage to deploy artifacts, when not building a PR
if (env.CHANGE_ID == null) {
stage('Deploy artifacts') {
environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} -v ${WORKSPACE}/.m2:/var/maven/.m2 --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') {
sh 'mvn deploy -DskipTests -Duser.home=/var/maven -Duser.name=jenkins'
}
}
}
}
}

Expand Down

0 comments on commit e7cfac8

Please sign in to comment.