Skip to content

Commit

Permalink
configure tests to use PR code
Browse files Browse the repository at this point in the history
  • Loading branch information
zainasir committed Nov 20, 2024
1 parent 7295a27 commit a80eb6b
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,16 @@ jobs:
at: /tmp/repos
- checkout:
path: /tmp/repos/cbioportal
- run:
name: Build cBioPortal docker image
command: |
cd cbioportal-test
./scripts/build-push-image.sh --src=/tmp/repos/cbioportal
- run:
name: Instantiate a cbioportal instance
environment:
DOCKER_IMAGE_CBIOPORTAL: cbioportal/cbioportal:demo-rfc80-poc-web-shenandoah
command: |
cd cbioportal-test
export DOCKER_IMAGE_CBIOPORTAL=$(jq -r '.["containerimage.digest"]' web-metadata.json)
nohup ./scripts/docker-compose.sh >> /tmp/repos/docker-compose-logs.txt 2>&1 &
- run:
name: Wait for cbioportal to be live at localhost
Expand All @@ -288,6 +292,24 @@ jobs:
done
echo "Failed to connect to cbioportal at localhost:8080!"
exit 1
- run:
name: Confirm cbioportal config matches PR
command: |
cd cbioportal
echo "Matching gitCommitId..."
INSTANCE_COMMIT_ID=$(curl -s http://localhost:8080/api/info | jq -r '.["gitCommitId"]')
PR_COMMIT_ID=$(git rev-parse head)
if [ "$INSTANCE_COMMIT_ID" = "$PR_COMMIT_ID" ]; then
echo "gitCommitId successfully matched!"
echo "cBioPortal is ready:"
curl -s http://localhost:8080/api/info
exit 0
else
echo "gitCommitIds do not match!"
echo "Instance Commit ID: $INSTANCE_COMMIT_ID"
echo "PR Commit ID: $PR_COMMIT_ID"
exit 1
fi
- run:
name: Run API Tests
environment:
Expand Down

0 comments on commit a80eb6b

Please sign in to comment.