Skip to content

Commit

Permalink
Add s390x arch support
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsakala committed Jun 21, 2022
1 parent ff97e25 commit c3e0815
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +43,7 @@ steps:
- "bin/*"
- _dist/linux-amd64/*
- _dist/linux-arm64/*
- dist/linux-s390x/*
- _dist/darwin-amd64/*
prerelease: true
when:
Expand All @@ -60,6 +65,7 @@ steps:
- "bin/*"
- _dist/linux-amd64/*
- _dist/linux-arm64/*
- _dist/linux-s390x/*
- _dist/darwin-amd64/*
api_key:
from_secret: github_token
Expand Down
2 changes: 1 addition & 1 deletion cmd/helm/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions cmd/helm/installer/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion scripts/get
Original file line number Diff line number Diff line change
Expand Up @@ -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";;
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit c3e0815

Please sign in to comment.