Add fallback branch until CI configuration is fixed to pass GIT_BRANCH

Original commit: elastic/x-pack-elasticsearch@68d12b33e9
This commit is contained in:
Ryan Ernst 2016-12-05 16:34:08 -08:00
parent 13e427d83f
commit 7483abb226
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ if [ -z ${USE_EXISTING_ES:+x} ]; then
echo "Either define 'USE_EXISTING_ES' or remove the existing 'elasticsearch' sibling."
exit 1
fi
BRANCH=${PR_SOURCE_BRANCH:-$GIT_BRANCH} # fall back to CI branch if not testing a PR
# AWAITSFIX: the fallback to master should be removed, see https://github.com/elastic/infra/issues/1557
BRANCH=${PR_SOURCE_BRANCH:-${GIT_BRANCH:-master}} # fall back to CI branch if not testing a PR
echo "Checking if branch '$BRANCH' has elasticsearch sibling..."
if [[ -z "$(git ls-remote --heads git@github.com:elastic/elasticsearch.git $BRANCH)" ]]; then
echo "No sibling branch, using PR target branch"