Merge pull request #19549 from edx/youngstrom/fix-testing-problems

Fix python and quality target branches
This commit is contained in:
Michael Youngstrom
2019-01-08 11:53:34 -05:00
committed by GitHub
3 changed files with 13 additions and 3 deletions

View File

@@ -18,7 +18,8 @@ mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSibli
# branch to a target branch; depending on how the GitHub plugin refspec
# is configured, this may not already be fetched.
if [ ! -z ${TARGET_BRANCH+x} ]; then
git fetch origin $TARGET_BRANCH:refs/remotes/origin/$TARGET_BRANCH
TARGET_BRANCH_WITHOUT_ORIGIN=$(echo "${TARGET_BRANCH}" | sed 's:^origin/::')
git fetch origin $TARGET_BRANCH_WITHOUT_ORIGIN:refs/remotes/origin/$TARGET_BRANCH_WITHOUT_ORIGIN
fi
# Reset the jenkins worker's virtualenv back to the

View File

@@ -60,8 +60,16 @@ done
current_branch_hash=`git rev-parse HEAD`
if [ -z "${MAIN_COMMIT+x}" ]; then
# if commit is not set, get hash of current branch
MAIN_COMMIT="origin/master"
if [ -z ${TARGET_BRANCH+x} ]; then
# if commit is not set and no target branch, get hash of current branch
MAIN_COMMIT="origin/master"
else
if [[ $TARGET_BRANCH == origin/* ]]; then
MAIN_COMMIT=$TARGET_BRANCH
else
MAIN_COMMIT=origin/$TARGET_BRANCH
fi
fi
fi
merge_base_command="git merge-base $current_branch_hash $MAIN_COMMIT"

View File

@@ -45,6 +45,7 @@ passenv =
SELENIUM_PORT
SHARD
SKIP_NPM_INSTALL
TARGET_BRANCH
TEST_SUITE
XDIST_CONTAINER_SECURITY_GROUP
XDIST_CONTAINER_SUBNET