Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ISO files as part of a GitHub release #5388

Merged
merged 3 commits into from
Sep 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions hack/jenkins/release_github_page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -101,7 +110,7 @@ do
--tag "${TAGNAME}" \
--name "$UPLOAD" \
--file "out/$UPLOAD" && break
n=$[$n+1]
n=$((n+1))
sleep 15
done
done