Skip to content

Commit

Permalink
Merge pull request #2281 from amazeeio/MINISHIFT_GITHUB_API_TOKEN
Browse files Browse the repository at this point in the history
pass in MINISHIFT_GITHUB_API_TOKEN variable
  • Loading branch information
Schnitzel authored Oct 23, 2020
2 parents 2fc7e05 + a313b7b commit 3d0f3c7
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,21 @@ node {
}
}
stage ('minishift tests') {
try {
if (env.CHANGE_ID && pullRequest.labels.contains("skip-openshift-tests")) {
sh script: 'echo "PR identified as not needing Openshift testing."', label: "Skipping Openshift testing stage"
} else {
sh 'make minishift/cleanall || echo'
sh script: "make minishift MINISHIFT_CPUS=\$(nproc --ignore 3) MINISHIFT_MEMORY=24GB MINISHIFT_DISK_SIZE=70GB MINISHIFT_VERSION=${minishift_version} OPENSHIFT_VERSION=${openshift_version}", label: "Making openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} push-minishift -j5", label: "Pushing built images into openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j1", label: "Making openshift tests"
withCredentials([string(credentialsId: 'github_api_public_read', variable: 'MINISHIFT_GITHUB_API_TOKEN')]) {
try {
if (env.CHANGE_ID && pullRequest.labels.contains("skip-openshift-tests")) {
sh script: 'echo "PR identified as not needing Openshift testing."', label: "Skipping Openshift testing stage"
} else {
sh 'make minishift/cleanall || echo'
sh script: "make minishift MINISHIFT_GITHUB_API_TOKEN=$MINISHIFT_GITHUB_API_TOKEN MINISHIFT_CPUS=\$(nproc --ignore 3) MINISHIFT_MEMORY=24GB MINISHIFT_DISK_SIZE=70GB MINISHIFT_VERSION=${minishift_version} OPENSHIFT_VERSION=${openshift_version}", label: "Making openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} push-minishift -j5", label: "Pushing built images into openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j1", label: "Making openshift tests"
}
} catch (e) {
echo "Something went wrong, trying to cleanup"
cleanup()
throw e
}
} catch (e) {
echo "Something went wrong, trying to cleanup"
cleanup()
throw e
}
}
stage ('cleanup') {
Expand Down

0 comments on commit 3d0f3c7

Please sign in to comment.