Skip to content

Commit

Permalink
Add validation before creating DLC_builder (#359)
Browse files Browse the repository at this point in the history
* Do not try to create DLC builder when it exists

* Add test for extra build step
  • Loading branch information
marboledacci authored Sep 24, 2024
1 parent 8cf0fb5 commit b942008
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ jobs:
path: << parameters.path >>
platform: << parameters.platform >>
push_image: << parameters.push_image >>
- aws-ecr/build_and_push_image:
auth: << parameters.auth >>
attach_workspace: << parameters.attach_workspace >>
workspace_root: << parameters.workspace_root >>
repo: << parameters.repo >>
create_repo: false
tag: dummy
dockerfile: << parameters.dockerfile >>
path: << parameters.path >>
platform: << parameters.platform >>
push_image: false
- run:
name: Tests for docker image
command: |
Expand Down
6 changes: 5 additions & 1 deletion src/scripts/docker_buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ if [ "${AWS_ECR_BOOL_SKIP_WHEN_TAGS_EXIST}" -eq "0" ] || [[ "${AWS_ECR_BOOL_SKIP
# if no builder instance is currently used, create one
elif ! docker buildx ls | grep -q "default * docker"; then
set -x
docker buildx create --name DLC_builder --use
if ! docker buildx ls | grep -q DLC_builder; then
docker buildx create --name DLC_builder --use
else
docker buildx use DLC_builder
fi
echo "Context is set to DLC_builder"
set +x
fi
Expand Down

0 comments on commit b942008

Please sign in to comment.