Skip to content

Commit

Permalink
CI: Fix localdb e2e test outside PR context
Browse files Browse the repository at this point in the history
Local e2e test were working on PRs but not when running on the branch.
  • Loading branch information
inodb committed Nov 23, 2019
1 parent a3deedc commit 5743e18
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,19 @@ jobs:
name: Setup python libraries
command: |
pip3 install requests pyyaml
- run:
name: Indicate what backend image to run against
command: |
if [[ -n "${CIRCLE_PR_USERNAME}" ]]; then \
sed -i '/BACKEND.*/d' env/custom.sh && \
echo -e "\nexport BACKEND=$CIRCLE_PR_USERNAME:$CIRCLE_SHA1" >> $PORTAL_SOURCE_DIR/env/custom.sh; \
else \
echo -e "\nexport BACKEND=$CIRCLE_PROJECT_USERNAME:$CIRCLE_SHA1" >> $PORTAL_SOURCE_DIR/env/custom.sh; \
fi
- run:
name: Setup e2e-environment
command: |
sed -i '/BACKEND.*/d' env/custom.sh && \
echo -e "\nexport BACKEND=$CIRCLE_PR_USERNAME:$CIRCLE_SHA1" >> $PORTAL_SOURCE_DIR/env/custom.sh && \
source $PORTAL_SOURCE_DIR/env/custom.sh || true && \
source $PORTAL_SOURCE_DIR/env/custom.sh && \
cd $TEST_HOME/local/runtime-config && \
./setup_environment.sh && ./setup_environment.sh >> $BASH_ENV
- run:
Expand Down

0 comments on commit 5743e18

Please sign in to comment.