Skip to content

Commit e7d2b05

Browse files
authored
chore(build): sync latest image for v-prefixed TAG (alibaba#331)
1 parent 5904d62 commit e7d2b05

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

components/egress/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ docker buildx create --use --name egress-builder
2727
docker buildx inspect --bootstrap
2828
docker buildx ls
2929

30+
LATEST_TAGS=()
31+
if [[ "${TAG}" == v* ]]; then
32+
LATEST_TAGS+=(-t opensandbox/egress:latest -t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:latest)
33+
fi
34+
3035
docker buildx build \
3136
-t opensandbox/egress:${TAG} \
3237
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:${TAG} \
38+
"${LATEST_TAGS[@]}" \
3339
-f components/egress/Dockerfile \
3440
--build-arg VERSION="${VERSION}" \
3541
--build-arg GIT_COMMIT="${GIT_COMMIT}" \

components/execd/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ docker buildx inspect --bootstrap
3131

3232
docker buildx ls
3333

34+
LATEST_TAGS=()
35+
if [[ "${TAG}" == v* ]]; then
36+
LATEST_TAGS+=(-t opensandbox/execd:latest -t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:latest)
37+
fi
38+
3439
docker buildx build \
3540
-t opensandbox/execd:${TAG} \
3641
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:${TAG} \
42+
"${LATEST_TAGS[@]}" \
3743
-f components/execd/Dockerfile \
3844
--build-arg VERSION="${VERSION}" \
3945
--build-arg GIT_COMMIT="${GIT_COMMIT}" \

components/ingress/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ docker buildx inspect --bootstrap
3131

3232
docker buildx ls
3333

34+
LATEST_TAGS=()
35+
if [[ "${TAG}" == v* ]]; then
36+
LATEST_TAGS+=(-t opensandbox/ingress:latest -t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/ingress:latest)
37+
fi
38+
3439
docker buildx build \
3540
-t opensandbox/ingress:${TAG} \
3641
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/ingress:${TAG} \
42+
"${LATEST_TAGS[@]}" \
3743
-f components/ingress/Dockerfile \
3844
--build-arg VERSION="${VERSION}" \
3945
--build-arg GIT_COMMIT="${GIT_COMMIT}" \

server/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ docker buildx inspect --bootstrap
2525

2626
docker buildx ls
2727

28+
LATEST_TAGS=()
29+
if [[ "${TAG}" == v* ]]; then
30+
LATEST_TAGS+=(-t opensandbox/server:latest -t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/server:latest)
31+
fi
32+
2833
docker buildx build \
2934
-t opensandbox/server:${TAG} \
3035
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/server:${TAG} \
36+
"${LATEST_TAGS[@]}" \
3137
--platform linux/amd64,linux/arm64 \
3238
--push \
3339
.

0 commit comments

Comments
 (0)