Skip to content

Commit

Permalink
persist docker image to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
zainasir committed Jan 6, 2025
1 parent cbff4a4 commit f022375
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ commands:
echo "Build failed!"
exit 1
fi
docker save -o $DOCKER_TAG-web-shenandoah.tar $DOCKER_REPO:$DOCKER_TAG-web-shenandoah
jobs:
build_backend:
Expand Down Expand Up @@ -294,18 +293,24 @@ jobs:
image: ubuntu-2204:2024.08.1
resource_class: medium
working_directory: /tmp/repos
parameters:
push:
description: Push image to Docker Hub
type: boolean
default: false
environment:
DOCKER_REPO: cbioportal/cbioportal-dev
steps:
- attach_workspace:
at: /tmp/repos
- checkout:
path: /tmp/repos/cbioportal
- build_push_image:
push: "false"
- run:
name: Save cbioportal image as tar
command: |
export $DOCKER_TAG=$CIRCLE_SHA1
docker save -o $DOCKER_TAG-web-shenandoah.tar $DOCKER_REPO:$DOCKER_TAG-web-shenandoah
- persist_to_workspace:
root: /tmp/repos
paths:
- $DOCKER_TAG-web-shenandoah.tar

push_image:
machine:
Expand Down Expand Up @@ -336,7 +341,8 @@ jobs:
- run:
name: Load cbioportal image
command: |
docker load -i $DOCKER_REPO:$CIRCLE_SHA1-web-shenandoah.tar
export $DOCKER_TAG=$CIRCLE_SHA1
docker load -i $DOCKER_REPO:$DOCKER_TAG-web-shenandoah.tar
- run:
name: Instantiate a cbioportal instance
environment:
Expand Down

0 comments on commit f022375

Please sign in to comment.