Skip to content
Permalink
Browse files
Merge pull request #89 from jcabrerizo/master
Adding mvn deploy if not PR
  • Loading branch information
jcabrerizo committed Sep 7, 2021
2 parents ea4337e + 26a6c89 commit fb19c166a61e1da1db107302090a0646c919d93c
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 fb19c16

Please sign in to comment.