Skip to content

Commit

Permalink
Use PULL_NUMBER in e2e tests scripts
Browse files Browse the repository at this point in the history
CI has one shell env variable PULL_NUMBER which should be used while
running e2e tests.

This is same PR as dora-metrics#487, however another merge reverted it, so
we need to have this one.
  • Loading branch information
mpryc committed Jun 10, 2022
1 parent 7810f2a commit 17d229b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/run-pelorus-e2e-tests
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ fi
# From now on, exit if something goes wrong
set -e

# Check if PULL_NUMBER exists and it's actual number
if [ ${PULL_NUMBER+x} ] && [[ $PULL_NUMBER =~ ^[0-9]+$ ]]; then
echo "Provided PULL_NUMBER: '$PULL_NUMBER'"
sed -i "s/source_ref:.*/source_ref: refs\/pull\/${PULL_NUMBER}\/head/" "${DWN_DIR}/ci_values.yaml"
fi

# Ensure we are in the top-level directory of pelorus project
pushd "${SCRIPT_DIR}/../"

Expand Down

0 comments on commit 17d229b

Please sign in to comment.