Fix coverage on remote xdist nodes

This commit is contained in:
Jeremy Bowman
2019-01-18 14:03:54 -05:00
parent da42499320
commit f7799bad9e
4 changed files with 12 additions and 6 deletions

View File

@@ -27,6 +27,14 @@ def pythonTestCleanup() {
bash scripts/xdist/terminate_xdist_nodes.sh'''
}
def xdist_git_branch() {
if (env.ghprbActualCommit) {
return "${ghprbActualCommit}"
} else {
return "${BRANCH_NAME}"
}
}
pipeline {
agent { label "jenkins-worker" }
options {
@@ -37,7 +45,7 @@ pipeline {
XDIST_CONTAINER_SUBNET = credentials('XDIST_CONTAINER_SUBNET')
XDIST_CONTAINER_SECURITY_GROUP = credentials('XDIST_CONTAINER_SECURITY_GROUP')
XDIST_CONTAINER_TASK_NAME = "jenkins-worker-task"
XDIST_GIT_BRANCH = "${ghprbActualCommit}"
XDIST_GIT_BRANCH = xdist_git_branch()
}
stages {
stage('Mark build as pending on Github') {