Skip to content
Permalink
Browse files
Adding mvn deploy if not PR
  • Loading branch information
jcabrerizo committed Sep 7, 2021
1 parent cf64d86 commit 26a6c89366d1b4b034f48f21149bdb99f61f9c8f
Showing 1 changed file with 9 additions and 0 deletions.
@@ -48,6 +48,15 @@ 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'
}
}
}
}
}

0 comments on commit 26a6c89

Please sign in to comment.