Skip to content

Commit

Permalink
Merge pull request #45 from CMU-cabot/daisukes/improve-scripts
Browse files Browse the repository at this point in the history
bake-docker.sh -t option can handle single/multiple tags
  • Loading branch information
dsato80 authored Jan 30, 2025
2 parents 6d06fdc + ec4adeb commit b0b9c38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions bake-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function help {
echo "-l build using local registry"
echo "-P <platform> specify platform"
echo " build linux/arm64 and linux/amd64 if not specified"
echo "-t <tags> additional tags"
echo "-t <tag>[,<tag>] tag or tags"
}

platform=
Expand Down Expand Up @@ -116,9 +116,13 @@ fi
# tag option
tag_option=
if [[ -z $tags ]]; then
tags="latest,$(git rev-parse --abbrev-ref HEAD)"
tags="latest,$(git rev-parse --abbrev-ref HEAD | tr '/' '-')"
fi
if [[ "$tags" == *,* ]]; then
tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:{$tags}"
else
tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:$tags"
fi
tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:{${tags}}"

# platform option
platform_option=
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-base.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
driver-base:
image: cmucal/cabot-driver
image: cmucal/cabot-driver:${CABOT_LAUNCH_IMAGE_TAG:-latest}
build:
context: ./docker/driver
additional_contexts:
Expand Down

0 comments on commit b0b9c38

Please sign in to comment.