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') {

View File

@@ -13,7 +13,7 @@ do
container_reqs_cmd="ssh -o StrictHostKeyChecking=no ubuntu@$ip 'cd /edx/app/edxapp;
git clone --branch master --depth 1 --no-tags -q https://github.com/edx/edx-platform.git; cd edx-platform;
git fetch --depth=1 --no-tags -q origin ${XDIST_GIT_BRANCH}; git checkout -q ${XDIST_GIT_BRANCH};
source /edx/app/edxapp/edxapp_env; pip install -qr requirements/edx/testing.txt' & "
source /edx/app/edxapp/edxapp_env; pip install -qr requirements/edx/testing.txt; mkdir reports' & "
cmd=$cmd$container_reqs_cmd
done