From b3dfd5ebc6ff5298f1ad5f3b998de27d7aeee648 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 13 Feb 2020 11:37:27 -0500 Subject: [PATCH] Build all images on ppc64le and s390x --- .travis.yml | 60 ++++++++++++++++++++++++++++++++++++++++++---- Makefile | 10 +++++++- doc/dev/release.md | 4 ++-- 3 files changed, 67 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index dc2a3cd288..d4b1702b09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -135,14 +135,30 @@ jobs: after_success: echo 'Tests Passed' after_failure: echo 'Failure in unit, sanity and markdown tests' - # Build and deploy ansible-operator docker image + # Build and deploy amd64 ansible-operator docker image - <<: *deploy - name: Docker image for ansible-operator + name: Docker image for ansible-operator (amd64) arch: amd64 script: - make image-build-ansible - make image-push-ansible + # Build and deploy ppc64le ansible-operator docker image + - <<: *deploy + name: Docker image for ansible-operator (ppc64le) + arch: ppc64le + script: + - make image-build-ansible + - make image-push-ansible + + # Build and deploy s390x ansible-operator docker image + - <<: *deploy + name: Docker image for ansible-operator (s390x) + arch: s390x + script: + - make image-build-ansible + - make image-push-ansible + # Build and deploy amd64 helm-operator docker image - <<: *deploy name: Docker image for helm-operator (amd64) @@ -159,17 +175,53 @@ jobs: - make image-build-helm - make image-push-helm - # Build and deploy scorecard-proxy docker image + # Build and deploy s390x helm-operator docker image + - <<: *deploy + name: Docker image for helm-operator (s390x) + arch: s390x + script: + - make image-build-helm + - make image-push-helm + + # Build and deploy amd64 scorecard-proxy docker image - <<: *deploy - name: Docker image for scorecard-proxy + name: Docker image for scorecard-proxy (amd64) arch: amd64 script: - make image-build-scorecard-proxy - make image-push-scorecard-proxy + # Build and deploy ppc64le scorecard-proxy docker image + - <<: *deploy + name: Docker image for scorecard-proxy (ppc64le) + arch: ppc64le + script: + - make image-build-scorecard-proxy + - make image-push-scorecard-proxy + + # Build and deploy s390x scorecard-proxy docker image + - <<: *deploy + name: Docker image for scorecard-proxy (s390x) + arch: s390x + script: + - make image-build-scorecard-proxy + - make image-push-scorecard-proxy + + # Build and deploy ansible multi-arch manifest list + - <<: *manifest-deploy + name: Manifest list for ansible-operator + script: + - make image-push-ansible-multiarch + # Build and deploy helm multi-arch manifest list - <<: *manifest-deploy name: Manifest list for helm-operator script: - make image-push-helm-multiarch + # Build and deploy scorecard-proxy multi-arch manifest list + - <<: *manifest-deploy + name: Manifest list for scorecard-proxy + script: + - make image-push-scorecard-proxy-multiarch + diff --git a/Makefile b/Makefile index f4722b9b50..8c6eeebaa1 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,9 @@ ANSIBLE_IMAGE ?= $(ANSIBLE_BASE_IMAGE) HELM_IMAGE ?= $(HELM_BASE_IMAGE) SCORECARD_PROXY_IMAGE ?= $(SCORECARD_PROXY_BASE_IMAGE) -HELM_ARCHES:="amd64" "ppc64le" +ANSIBLE_ARCHES:="amd64" "ppc64le" "s390x" +HELM_ARCHES:="amd64" "ppc64le" "s390x" +SCORECARD_PROXY_ARCHES:="amd64" "ppc64le" "s390x" export CGO_ENABLED:=0 .DEFAULT_GOAL:=help @@ -166,6 +168,9 @@ image-push: image-push-ansible image-push-helm image-push-scorecard-proxy ## Pus image-push-ansible: ./hack/image/push-image-tags.sh $(ANSIBLE_BASE_IMAGE):dev $(ANSIBLE_IMAGE) +image-push-ansible-multiarch: + ./hack/image/push-manifest-list.sh $(ANSIBLE_IMAGE) ${ANSIBLE_ARCHES} + image-push-helm: ./hack/image/push-image-tags.sh $(HELM_BASE_IMAGE):dev $(HELM_IMAGE)-$(shell go env GOARCH) @@ -175,6 +180,9 @@ image-push-helm-multiarch: image-push-scorecard-proxy: ./hack/image/push-image-tags.sh $(SCORECARD_PROXY_BASE_IMAGE):dev $(SCORECARD_PROXY_IMAGE) +image-push-scorecard-proxy-multiarch: + ./hack/image/push-manifest-list.sh $(SCORECARD_PROXY_IMAGE) ${SCORECARD_PROXY_ARCHES} + ############################## # Tests # ############################## diff --git a/doc/dev/release.md b/doc/dev/release.md index 481353426c..476c67d3a0 100644 --- a/doc/dev/release.md +++ b/doc/dev/release.md @@ -22,9 +22,9 @@ As the Operator SDK interacts directly with the Kubernetes API, certain API feat ### Operating systems and architectures -Release binaries will be built for the `x86_64` architecture for both GNU Linux and MacOS Darwin platforms and for the `ppc64le` architecture for GNU Linux. +Release binaries will be built for the `x86_64` architecture for MacOS Darwin platform and for the following GNU Linux architectures: `x86_64`, `ppc64le`, `s390x`. -Base images for ansible-operator, helm-operator, and scorecard-proxy will be built for the `x86_64` architecture for GNU Linux. Base images for the `ppc64le` architecture for GNU Linux are a work-in-progress. +Base images for ansible-operator, helm-operator, and scorecard-proxy will be built for the following GNU Linux architectures: `x86_64`, `ppc64le`, `s390x`. Support for the Windows platform is not on the roadmap at this time.