From 145208875d23f50b0ee4b44af812b01ebf4f8304 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Wed, 18 Sep 2019 06:34:36 -0700 Subject: [PATCH 1/3] Copy ISO to github, improve release note parsing --- hack/jenkins/release_github_page.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hack/jenkins/release_github_page.sh b/hack/jenkins/release_github_page.sh index 050af6c80d80..6d5fd4779087 100755 --- a/hack/jenkins/release_github_page.sh +++ b/hack/jenkins/release_github_page.sh @@ -28,7 +28,7 @@ set -eux -o pipefail readonly VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}" readonly DEB_VERSION="${VERSION/-/\~}" readonly RPM_VERSION="${DEB_VERSION}" - +readonly ISO_BUCKET="minikube/iso" readonly TAGNAME="v${VERSION}" readonly GITHUB_ORGANIZATION="kubernetes" @@ -40,7 +40,7 @@ if ! [[ ${VERSION_BUILD} =~ ^[0-9]+$ ]]; then RELEASE_FLAGS="-p" fi -RELEASE_NOTES=$(perl -e "\$p=0; while(<>) { if(/^## Version ${VERSION}/) { \$p=1 } elsif (/^##/) { \$p=0 }; if (\$p) { print }}" < CHANGELOG.md) +RELEASE_NOTES=$(perl -e "\$p=0; while(<>) { if(/^## Version ${VERSION} -/) { \$p=1 } elsif (/^##/) { \$p=0 }; if (\$p) { print }}" < CHANGELOG.md) if [[ "${RELEASE_NOTES}" = "" ]]; then RELEASE_NOTES="(missing for ${VERSION})" fi @@ -90,6 +90,15 @@ FILES_TO_UPLOAD=( 'docker-machine-driver-hyperkit.sha256' ) +# ISO files are special, as they are generated pre-release tagging +ISO_FILES=("minikube-v${VERSION}.iso" "minikube-v${VERSION}.iso.sha256") +for DOWNLOAD in "${ISO_FILES[@]}" +do + gsutil cp "gs://${ISO_BUCKET}/${DOWNLOAD}" out/ \ + && FILES_TO_UPLOAD+=($DOWNLOAD) \ + || echo "${DOWNLOAD} was not generated for this release" +done + for UPLOAD in "${FILES_TO_UPLOAD[@]}" do n=0 @@ -105,3 +114,4 @@ do sleep 15 done done + From 8b83c64d4a3a84b9bec632b94f228422dbbf7421 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Wed, 18 Sep 2019 06:37:03 -0700 Subject: [PATCH 2/3] Remove trailing space --- hack/jenkins/release_github_page.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/hack/jenkins/release_github_page.sh b/hack/jenkins/release_github_page.sh index 6d5fd4779087..ef2598f2c0d5 100755 --- a/hack/jenkins/release_github_page.sh +++ b/hack/jenkins/release_github_page.sh @@ -114,4 +114,3 @@ do sleep 15 done done - From 0651116ed1a08b9e5abf9ac1b72b3decedc8a3f1 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Wed, 18 Sep 2019 06:38:50 -0700 Subject: [PATCH 3/3] Address lint issues --- hack/jenkins/release_github_page.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/jenkins/release_github_page.sh b/hack/jenkins/release_github_page.sh index ef2598f2c0d5..b5f5f5bdbf2a 100755 --- a/hack/jenkins/release_github_page.sh +++ b/hack/jenkins/release_github_page.sh @@ -95,7 +95,7 @@ ISO_FILES=("minikube-v${VERSION}.iso" "minikube-v${VERSION}.iso.sha256") for DOWNLOAD in "${ISO_FILES[@]}" do gsutil cp "gs://${ISO_BUCKET}/${DOWNLOAD}" out/ \ - && FILES_TO_UPLOAD+=($DOWNLOAD) \ + && FILES_TO_UPLOAD+=("${DOWNLOAD}") \ || echo "${DOWNLOAD} was not generated for this release" done @@ -110,7 +110,7 @@ do --tag "${TAGNAME}" \ --name "$UPLOAD" \ --file "out/$UPLOAD" && break - n=$[$n+1] + n=$((n+1)) sleep 15 done done