Merge pull request #19549 from edx/youngstrom/fix-testing-problems
Fix python and quality target branches
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user