Skip to content

Commit

Permalink
Add s390x kaniko build to multi-arch list (#1475)
Browse files Browse the repository at this point in the history
This is extenion of current code to build s390x version of kaniko
executor image and add it to multi-arch manifest

Signed-off-by: Yulia Gaponenko <[email protected]>
  • Loading branch information
barthy1 authored Nov 4, 2020
1 parent bbd06c4 commit 49e7d8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/executor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_binary(
ARCHITECTURES = [
"amd64",
"arm64",
"s390x",
]

[
Expand Down
11 changes: 9 additions & 2 deletions deploy/cloudbuild-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ steps:
bazel run //:gazelle
bazel run --host_force_python=PY2 //cmd/executor:image_amd64
bazel run --host_force_python=PY2 //cmd/executor:image_arm64
bazel run --host_force_python=PY2 //cmd/executor:image_s390x
# Publish the individual container images
- name: docker
Expand All @@ -57,11 +58,15 @@ steps:
docker tag bazel/cmd/executor:image_amd64 gcr.io/kaniko-project/executor:amd64-$TAG_NAME
docker tag bazel/cmd/executor:image_arm64 gcr.io/kaniko-project/executor:arm64
docker tag bazel/cmd/executor:image_arm64 gcr.io/kaniko-project/executor:arm64-$TAG_NAME
docker tag bazel/cmd/executor:image_arm64 gcr.io/kaniko-project/executor:s390x
docker tag bazel/cmd/executor:image_arm64 gcr.io/kaniko-project/executor:s390x-$TAG_NAME
docker push gcr.io/kaniko-project/executor:amd64
docker push gcr.io/kaniko-project/executor:amd64-$TAG_NAME
docker push gcr.io/kaniko-project/executor:arm64
docker push gcr.io/kaniko-project/executor:arm64-$TAG_NAME
docker push gcr.io/kaniko-project/executor:s390x
docker push gcr.io/kaniko-project/executor:s390x-$TAG_NAME
# Enable "manifest list" support in docker, and publish one covering the per-architecture
# images published above.
Expand All @@ -85,12 +90,14 @@ steps:
docker manifest create gcr.io/kaniko-project/executor:multi-arch \
gcr.io/kaniko-project/executor:amd64 \
gcr.io/kaniko-project/executor:arm64
gcr.io/kaniko-project/executor:arm64 \
gcr.io/kaniko-project/executor:s390x
docker manifest push gcr.io/kaniko-project/executor:multi-arch
docker manifest create gcr.io/kaniko-project/executor:multi-arch-$TAG_NAME \
gcr.io/kaniko-project/executor:amd64-$TAG_NAME \
gcr.io/kaniko-project/executor:arm64-$TAG_NAME
gcr.io/kaniko-project/executor:arm64-$TAG_NAME \
gcr.io/kaniko-project/executor:s390x-$TAG_NAME
docker manifest push gcr.io/kaniko-project/executor:multi-arch-$TAG_NAME
Expand Down
6 changes: 5 additions & 1 deletion deploy/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ steps:
bazel run //:gazelle
bazel run --host_force_python=PY2 //cmd/executor:image_amd64
bazel run --host_force_python=PY2 //cmd/executor:image_arm64
bazel run --host_force_python=PY2 //cmd/executor:image_s390x
# Publish the individual container images
- name: docker
Expand All @@ -45,9 +46,11 @@ steps:
docker tag bazel/cmd/executor:image_amd64 gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:amd64-${COMMIT_SHA}
docker tag bazel/cmd/executor:image_arm64 gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:arm64-${COMMIT_SHA}
docker tag bazel/cmd/executor:image_s390x gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:s390x-${COMMIT_SHA}
docker push gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:amd64-${COMMIT_SHA}
docker push gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:arm64-${COMMIT_SHA}
docker push gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:s390x-${COMMIT_SHA}
# Enable "manifest list" support in docker, and publish one covering the per-architecture
# images published above.
Expand All @@ -71,7 +74,8 @@ steps:
docker manifest create gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:multi-arch-${COMMIT_SHA} \
gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:amd64-${COMMIT_SHA} \
gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:arm64-${COMMIT_SHA}
gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:arm64-${COMMIT_SHA} \
gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:s390x-${COMMIT_SHA}
docker manifest push gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:multi-arch-${COMMIT_SHA}
Expand Down

0 comments on commit 49e7d8a

Please sign in to comment.