From c3e081547d3fde423a008a9f30ff3b483b73d784 Mon Sep 17 00:00:00 2001 From: Venkata Krishna Rohit Sakala Date: Mon, 10 Jan 2022 18:00:18 +0530 Subject: [PATCH] Add s390x arch support --- .drone.yml | 8 +++++++- cmd/helm/init.go | 2 +- cmd/helm/installer/init_test.go | 4 ++-- scripts/get | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8cfd0d8c8f8..3b4c1ff5968 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,16 +15,20 @@ steps: pull: default image: golang:1.12.9 commands: + # Fix the certificate errors https://stackoverflow.com/questions/69420529/app-engine-deploy-failing-with-fatal-unable-to-access-https-gopkg-in-yaml-v + - apt update && apt install ca-certificates libgnutls30 -y - ./.circleci/bootstrap.sh - make test-unit - make build-cross - mv ./_dist/linux-arm64/rancher-helm ./_dist/linux-arm64/rancher-helm-arm64 - mv ./_dist/linux-arm64/rancher-tiller ./_dist/linux-arm64/rancher-tiller-arm64 + - mv ./_dist/linux-s390x/rancher-helm ./_dist/linux-s390x/rancher-helm-s390x + - mv ./_dist/linux-s390x/rancher-tiller ./_dist/linux-s390x/rancher-tiller-s390x - mv ./_dist/darwin-amd64/rancher-helm ./_dist/darwin-amd64/rancher-helm-darwin-amd64 - mv ./_dist/darwin-amd64/rancher-tiller ./_dist/darwin-amd64/rancher-tiller-darwin-amd64 environment: PROJECT_NAME: '"kubernetes-helm"' - TARGETS: linux/amd64 linux/arm64 darwin/amd64 + TARGETS: linux/amd64 linux/arm64 linux/s390x darwin/amd64 VERSION: ${DRONE_TAG} - name: publish-github-rc @@ -39,6 +43,7 @@ steps: - "bin/*" - _dist/linux-amd64/* - _dist/linux-arm64/* + - dist/linux-s390x/* - _dist/darwin-amd64/* prerelease: true when: @@ -60,6 +65,7 @@ steps: - "bin/*" - _dist/linux-amd64/* - _dist/linux-arm64/* + - _dist/linux-s390x/* - _dist/darwin-amd64/* api_key: from_secret: github_token diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 3425130ea04..4d0f70d4f08 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -59,7 +59,7 @@ To dump a manifest containing the Tiller deployment YAML, combine the ` var ( - stableRepositoryURL = "https://kubernetes-charts.storage.googleapis.com" + stableRepositoryURL = "https://charts.helm.sh/stable" // This is the IPv4 loopback, not localhost, because we have to force IPv4 // for Dockerized Helm: https://github.com/kubernetes/helm/issues/1410 localRepositoryURL = "http://127.0.0.1:8879/charts" diff --git a/cmd/helm/installer/init_test.go b/cmd/helm/installer/init_test.go index 1d53687e64d..c7853adab48 100644 --- a/cmd/helm/installer/init_test.go +++ b/cmd/helm/installer/init_test.go @@ -39,7 +39,7 @@ func TestInitialize(t *testing.T) { settings := helm_env.EnvSettings{ Home: hh, } - stableRepositoryURL := "https://kubernetes-charts.storage.googleapis.com" + stableRepositoryURL := "https://charts.helm.sh/stable" localRepositoryURL := "http://127.0.0.1:8879/charts" if err := Initialize(hh, b, false, settings, stableRepositoryURL, localRepositoryURL); err != nil { @@ -81,7 +81,7 @@ func TestEnsureHome(t *testing.T) { settings := helm_env.EnvSettings{ Home: hh, } - stableRepositoryURL := "https://kubernetes-charts.storage.googleapis.com" + stableRepositoryURL := "https://charts.helm.sh/stable" localRepositoryURL := "http://127.0.0.1:8879/charts" if err := ensureDirectories(hh, b); err != nil { diff --git a/scripts/get b/scripts/get index 3f645f80723..b6261a94e4e 100755 --- a/scripts/get +++ b/scripts/get @@ -31,6 +31,7 @@ initArch() { armv6*) ARCH="armv6";; armv7*) ARCH="arm";; aarch64) ARCH="arm64";; + s390x) ARCH="s390x";; x86) ARCH="386";; x86_64) ARCH="amd64";; i686) ARCH="386";; @@ -62,7 +63,7 @@ runAsRoot() { # verifySupported checks that the os/arch combination is supported for # binary builds. verifySupported() { - local supported="darwin-386\ndarwin-amd64\nlinux-386\nlinux-amd64\nlinux-arm\nlinux-arm64\nlinux-ppc64le\nwindows-386\nwindows-amd64" + local supported="darwin-386\ndarwin-amd64\nlinux-386\nlinux-amd64\nlinux-arm\nlinux-arm64\nlinux-ppc64le\nlinux-s390x\nwindows-386\nwindows-amd64" if ! echo "${supported}" | grep -q "${OS}-${ARCH}"; then echo "No prebuilt binary for ${OS}-${ARCH}." echo "To build from source, go to https://github.com/helm/helm"