Skip to content

Commit

Permalink
consolidate api tests and security tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zainasir committed Jan 6, 2025
1 parent e345f8f commit 4a57b53
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
paths:
- cbioportal-frontend

build_push_image:
build_image:
machine:
image: ubuntu-2204:2024.08.1
resource_class: medium
Expand All @@ -281,7 +281,7 @@ jobs:
exit 0
fi
cd cbioportal-test
./scripts/build-push-image.sh --src=/tmp/repos/cbioportal --push=true --skip_web_and_data=true
./scripts/build-push-image.sh --src=/tmp/repos/cbioportal --push=false --skip_web_and_data=true
EXISTS=$(docker manifest inspect $DOCKER_REPO:$DOCKER_TAG-web-shenandoah > /dev/null; echo $?)
if [ $EXISTS -eq 0 ]; then
echo "Build succeeded!"
Expand All @@ -290,6 +290,24 @@ jobs:
exit 1
fi
push_image:
machine:
image: ubuntu-2204:2024.08.1
resource_class: medium
steps:
- run:
name: Log in to Docker
command: |
export DOCKER_TAG=$CIRCLE_SHA1-web-shenandoah
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
- run:
name: Push cBioPortal image to Docker Hub
environment:
DOCKER_REPO: cbioportal/cbioportal-dev
command: |
export DOCKER_TAG=$CIRCLE_SHA1-web-shenandoah
docker image push cbioportal/cbioportal-dev:$DOCKER_TAG
run_api_tests:
machine:
image: ubuntu-2204:2024.08.1
Expand Down Expand Up @@ -417,28 +435,24 @@ workflows:
- build_backend
- pull_frontend_codebase
- install_yarn
api_tests:
tests:
jobs:
- pull_cbioportal_test_codebase
- pull_cbioportal_frontend_codebase
- wait_for_approval:
type: approval
- build_image:
requires:
- pull_cbioportal_test_codebase
- pull_cbioportal_frontend_codebase
- build_push_image:
context:
- api-tests
requires:
- wait_for_approval
- run_api_tests:
context:
- api-tests
requires:
- build_push_image

security_tests:
jobs:
- build_image
- run_security_tests:
context:
- docker-scout
- docker-scout
requires:
- build_image
- push_image:
context:
- api-tests

0 comments on commit 4a57b53

Please sign in to comment.