From 5debecb9be1e5310096d1fea60290d8a54a0f7f1 Mon Sep 17 00:00:00 2001 From: adrienjt Date: Mon, 16 Nov 2020 11:35:35 -0800 Subject: [PATCH 1/3] delete old chart packages for proper indexing Signed-off-by: adrienjt --- release/chart.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release/chart.sh b/release/chart.sh index 3f4a844e..ec917c04 100755 --- a/release/chart.sh +++ b/release/chart.sh @@ -17,12 +17,14 @@ set -euo pipefail +# delete any leftover packaged charts +# (otherwise dates in index for their versions would be modified) +rm -f _out/multicluster-scheduler-*.tgz + helm package charts/multicluster-scheduler -d _out curl -s https://charts.admiralty.io/index.yaml >_out/index_old.yaml helm repo index _out --merge _out/index_old.yaml --url https://charts.admiralty.io -# TODO: revert datetime created override for old versions (submit GitHub issue) - # release CRDs separately, esp. for `helm upgrade` cat charts/multicluster-scheduler/crds/* >_out/admiralty.crds.yaml From 4b6f8325a0b1bea3c4728b8a4e49c36a0d6a1e11 Mon Sep 17 00:00:00 2001 From: adrienjt Date: Mon, 16 Nov 2020 11:36:08 -0800 Subject: [PATCH 2/3] move supported archs to single image release script Signed-off-by: adrienjt --- release/image.sh | 3 ++- release/images.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/release/image.sh b/release/image.sh index 26aa7123..55d223d2 100755 --- a/release/image.sh +++ b/release/image.sh @@ -19,6 +19,7 @@ set -euo pipefail # constants default_registry="quay.io/admiralty" +default_archs="amd64 arm64 ppc64le s390x" # environment variables # required @@ -26,7 +27,7 @@ IMG="${IMG}" VERSION="${VERSION}" # optional REGISTRY="${REGISTRY:-$default_registry}" -ARCHS="${ARCHS:-amd64}" +ARCHS="${ARCHS:-$default_archs}" read -ra archs <<<"$ARCHS" diff --git a/release/images.sh b/release/images.sh index 1da556c2..b8d01bf3 100755 --- a/release/images.sh +++ b/release/images.sh @@ -25,5 +25,5 @@ imgs=( ) for img in "${imgs[@]}"; do - IMG="$img" ARCHS="amd64 arm64 ppc64le s390x" ./release/image.sh + IMG="$img" ./release/image.sh done From 8ddc194ff25deacf06f45a62c0b1e72949ebdcec Mon Sep 17 00:00:00 2001 From: adrienjt Date: Mon, 16 Nov 2020 11:36:56 -0800 Subject: [PATCH 3/3] use UPX for amd64 only UPX broke arm64 and we don't e2e test for all archs yet Signed-off-by: adrienjt --- build/build_one.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build_one.sh b/build/build_one.sh index 0904a92c..f6870794 100755 --- a/build/build_one.sh +++ b/build/build_one.sh @@ -50,7 +50,7 @@ fi mkdir -p "$context_dir" CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -trimpath -o "$context_dir/$BIN" "${extra_args[@]}" "$PKG" -if [ "$VERSION" != dev ] && [ "$ARCH" != s390x ]; then +if [ "$VERSION" != dev ] && [ "$ARCH" = amd64 ]; then upx-ucl "$context_dir/$BIN" fi