Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deploy images #37

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading