Add s390x kaniko build to multi-arch list (#1475)

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 <yulia.gaponenko1@de.ibm.com>
This commit is contained in:
Yulia Gaponenko 2020-11-04 23:03:16 +01:00 committed by GitHub
parent bbd06c48bd
commit 49e7d8a8cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -19,6 +19,7 @@ go_binary(
ARCHITECTURES = [
"amd64",
"arm64",
"s390x",
]
[

View File

@ -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
@ -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.
@ -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

View File

@ -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
@ -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.
@ -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}