Skip to content

Commit

Permalink
Merge pull request #37 from DeNA/fix-deploy-images
Browse files Browse the repository at this point in the history
Fix deploy images
  • Loading branch information
Kuniwak authored Apr 25, 2024
2 parents 7f089fc + 79d1379 commit 8289616
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 73 deletions.
6 changes: 2 additions & 4 deletions scripts/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ main() {
./scripts/deploy-bins

if [[ "$arg" == "--latest" ]]; then
./scripts/build-image --latest
./scripts/push-image --latest
./scripts/deploy-images --latest
else
./scripts/build-image
./scripts/push-image
./scripts/deploy-images
fi
)
}
Expand Down
57 changes: 49 additions & 8 deletions scripts/build-image → scripts/deploy-images
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CIRCLECI_DOCKERFILE="${BASE_DIR}/.circleci/images/Dockerfile"

usage() {
cat - 1>&2 <<-EOS
usage: build-image [<options>]
usage: deploy-images [<options>]
OPTIONS
-h, --help print this usage
Expand Down Expand Up @@ -48,21 +48,62 @@ main() {
fi

# NOTE: --push is necessary, because --load is not supported for multi-platform build yet.
docker buildx build --builder unity-meta-check-driver --platform linux/arm64,linux/amd64 -t "$builder_image:latest" -f "$BUILDER_DOCKERFILE" . --push
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$builder_image:latest" \
-f "$BUILDER_DOCKERFILE" .

docker buildx build --builder unity-meta-check-driver --platform linux/arm64,linux/amd64 -t "$image:$version" -f "$DOCKERFILE" .
if [[ "$arg" == "--latest" ]]; then
docker tag "$image:$version" "$image:latest"
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$image:$version" \
-t "$image:latest" \
-f "$DOCKERFILE" .
else
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$image:$version" \
-f "$DOCKERFILE" .
fi

docker buildx build --builder unity-meta-check-driver --platform linux/arm64,linux/amd64 -t "$gh_action_image:$version" -f "$GH_ACTION_DOCKERFILE" .
if [[ "$arg" == "--latest" ]]; then
docker tag "$gh_action_image:$version" "$gh_action_image:latest"
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$gh_action_image:$version" \
-t "$gh_action_image:latest" \
-f "$GH_ACTION_DOCKERFILE" .
else
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$gh_action_image:$version" \
-f "$GH_ACTION_DOCKERFILE" .
fi

docker buildx build --builder unity-meta-check-driver --platform linux/arm64,linux/amd64 -t "$circleci_image:$version" -f "$CIRCLECI_DOCKERFILE" .
if [[ "$arg" == "--latest" ]]; then
docker tag "$circleci_image:$version" "$circleci_image:latest"
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$circleci_image:$version" \
-t "$circleci_image:latest" \
-f "$CIRCLECI_DOCKERFILE" .
else
docker buildx build \
--builder unity-meta-check-driver \
--platform linux/arm64,linux/amd64 \
--push \
-t "$circleci_image:$version" \
-f "$CIRCLECI_DOCKERFILE" .
fi
)
}
Expand Down
61 changes: 0 additions & 61 deletions scripts/push-image

This file was deleted.

0 comments on commit 8289616

Please sign in to comment.