From b45c8339ab370c3c68d532ebbe475781d982251c Mon Sep 17 00:00:00 2001 From: oilbeater Date: Wed, 21 Feb 2024 05:58:04 +0000 Subject: [PATCH] release v1.12.5 --- charts/kube-ovn/values.yaml | 2 +- dist/images/install.sh | 2 +- hack/release.sh | 52 +++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 hack/release.sh diff --git a/charts/kube-ovn/values.yaml b/charts/kube-ovn/values.yaml index 3eaa613c4bf..45b20cd7ea7 100644 --- a/charts/kube-ovn/values.yaml +++ b/charts/kube-ovn/values.yaml @@ -10,7 +10,7 @@ global: repository: kube-ovn dpdkRepository: kube-ovn-dpdk vpcRepository: vpc-nat-gateway - tag: v1.12.4 + tag: v1.12.5 support_arm: true thirdparty: true diff --git a/dist/images/install.sh b/dist/images/install.sh index d613fa4fb6a..a3f7e2103fb 100755 --- a/dist/images/install.sh +++ b/dist/images/install.sh @@ -49,7 +49,7 @@ CNI_BIN_DIR="/opt/cni/bin" REGISTRY="docker.io/kubeovn" VPC_NAT_IMAGE="vpc-nat-gateway" -VERSION="v1.12.4" +VERSION="v1.12.5" IMAGE_PULL_POLICY="IfNotPresent" POD_CIDR="10.16.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR POD_GATEWAY="10.16.0.1" diff --git a/hack/release.sh b/hack/release.sh new file mode 100644 index 00000000000..7558f39a3b6 --- /dev/null +++ b/hack/release.sh @@ -0,0 +1,52 @@ +#!/bin/bash +set -euo pipefail + +echo "check status of last commit build" +commit=$(git rev-parse HEAD) +check_status=$(curl https://api.github.com/repos/kubeovn/kube-ovn/commits/$commit/check-runs) +if ! echo $check_status | grep -q '"conclusion": "failure"'; then + echo "last commit build successed" +else + echo "last commit build failed" +fi + + +echo "tag and push image" +VERSION=$(cat VERSION) +docker manifest rm kubeovn/kube-ovn:${VERSION} +docker manifest rm kubeovn/vpc-nat-gateway:${VERSION} + +docker pull kubeovn/kube-ovn:${VERSION}-x86 +docker pull kubeovn/kube-ovn:${VERSION}-arm +docker pull kubeovn/vpc-nat-gateway:${VERSION}-x86 +docker pull kubeovn/vpc-nat-gateway:${VERSION}-arm + +docker manifest create kubeovn/kube-ovn:${VERSION} kubeovn/kube-ovn:${VERSION}-x86 kubeovn/kube-ovn:${VERSION}-arm +docker manifest create kubeovn/vpc-nat-gateway:${VERSION} kubeovn/vpc-nat-gateway:${VERSION}-x86 kubeovn/vpc-nat-gateway:${VERSION}-arm + +docker manifest push kubeovn/kube-ovn:${VERSION} +docker manifest push kubeovn/vpc-nat-gateway:${VERSION} + +echo "modify tag in install.sh and values.yaml" +sed -i '/^VERSION=/c\VERSION="'"${VERSION}"'"' dist/images/install.sh +sed -i 's/tag:\ .*/tag:\ '"${VERSION}"'/' charts/kube-ovn/values.yaml + +echo "commit, tag and push" +git add dist/images/install.sh +git add charts/kube-ovn/values.yaml +git commit -m "release ${VERSION}" +git tag ${VERSION} +git push +git push origin --tags + +echo "modify version to next patch number" +NEXT_VERSION=$(cat VERSION | awk -F '.' '{print $1"."$2"."$3+1}') +echo ${NEXT_VERSION} > VERSION +git add VERSION +git commit -m "prepare for next release" +git push + +echo "draft a release" +gh release create $VERSION --draft + +echo "Need to modify the doc version number manually" \ No newline at end of file