Unverified Commit 68c40dd2 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #2040 from hypothesis/fix-jenkins-wrong-deploy

Attempt to fix issue where wrong code was sometimes deployed
parents 53d4d897 c2e5d0d6
......@@ -82,17 +82,15 @@ node {
}
}
}
}
}
if (env.BRANCH_NAME != releaseFromBranch) {
echo "Skipping deployment because ${env.BRANCH_NAME} is not the ${releaseFromBranch} branch"
return
}
if (env.BRANCH_NAME != releaseFromBranch) {
echo "Skipping QA deployment because ${env.BRANCH_NAME} is not the ${releaseFromBranch} branch"
return
}
milestone()
stage('Publish to QA') {
node {
milestone()
stage('Publish to QA') {
qaVersion = pkgVersion + "-${lastCommitHash}"
nodeEnv.inside("-e HOME=${workspace}") {
withCredentials([
......@@ -128,6 +126,12 @@ stage('Publish to QA') {
}
}
}
}
if (env.BRANCH_NAME != releaseFromBranch) {
echo "Skipping prod deployment because ${env.BRANCH_NAME} is not the ${releaseFromBranch} branch"
return
}
milestone()
stage('Publish') {
......@@ -135,6 +139,8 @@ stage('Publish') {
milestone()
node {
checkout scm
echo "Publishing ${pkgName} v${newPkgVersion} from ${releaseFromBranch} branch."
nodeEnv.inside("-e HOME=${workspace} -e BRANCH_NAME=${env.BRANCH_NAME}") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment