From efa588dcf981bcdae17246f847d9d0a614de532c Mon Sep 17 00:00:00 2001 From: David McMahon Date: Tue, 1 Mar 2016 17:49:00 -0800 Subject: [PATCH] Pass latest or stable to build/push-official-release.sh. --- build/mark-stable-release.sh | 43 ------------------------------- build/push-official-release.sh | 8 +++--- docs/devel/releasing.md | 4 --- release/build-official-release.sh | 8 +++++- 4 files changed, 12 insertions(+), 51 deletions(-) delete mode 100755 build/mark-stable-release.sh diff --git a/build/mark-stable-release.sh b/build/mark-stable-release.sh deleted file mode 100755 index dfb960313be53..0000000000000 --- a/build/mark-stable-release.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# Copyright 2015 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Marks the current stable version - -set -o errexit -set -o nounset -set -o pipefail - -if [ "$#" -ne 1 ]; then - echo "Usage: ${0} " - exit 1 -fi - -KUBE_RELEASE_VERSION="${1-}" - -KUBE_GCS_MAKE_PUBLIC='y' -KUBE_GCS_RELEASE_BUCKET='kubernetes-release' -KUBE_GCS_RELEASE_PREFIX="release/${KUBE_RELEASE_VERSION}" -KUBE_GCS_PUBLISH_VERSION="${KUBE_RELEASE_VERSION}" - -KUBE_ROOT="$(dirname "${BASH_SOURCE}")/.." -source "${KUBE_ROOT}/build/common.sh" - -if "${KUBE_ROOT}/cluster/kubectl.sh" 'version' | grep 'Client' | grep 'dirty'; then - echo "!!! Tag at invalid point, or something else is bad. Build is dirty. Don't push this build." >&2 - exit 1 -fi - -kube::release::gcs::publish_official 'stable' diff --git a/build/push-official-release.sh b/build/push-official-release.sh index 14699b26db6dc..5ef4ace526209 100755 --- a/build/push-official-release.sh +++ b/build/push-official-release.sh @@ -20,12 +20,14 @@ set -o errexit set -o nounset set -o pipefail -if [ "$#" -ne 1 ]; then - echo "Usage: ${0} " +if [[ "$#" -lt 1 ]]; then + echo "Usage: ${0} []" + echo "( defaults to 'latest')" exit 1 fi KUBE_RELEASE_VERSION="${1-}" +KUBE_RELEASE_TYPE="${2:-"latest"}" KUBE_GCS_NO_CACHING='n' KUBE_GCS_MAKE_PUBLIC='y' @@ -53,4 +55,4 @@ fi kube::release::parse_and_validate_release_version "${KUBE_RELEASE_VERSION}" kube::release::gcs::release kube::release::docker::release -kube::release::gcs::publish_official 'latest' +kube::release::gcs::publish_official $KUBE_RELEASE_TYPE diff --git a/docs/devel/releasing.md b/docs/devel/releasing.md index 27b0e906f93dc..475c97856a4fd 100644 --- a/docs/devel/releasing.md +++ b/docs/devel/releasing.md @@ -213,10 +213,6 @@ release](https://github.com/kubernetes/kubernetes/releases/new): notes draft), and attach it to the release; and 1. publish! -Finally, from a clone of upstream/master, *make sure* you still have -`RELEASE_VERSION` set correctly, and run `./build/mark-stable-release.sh -${RELEASE_VERSION}`. - ### Manual tasks for new release series *TODO(#20946) Burn this list down.* diff --git a/release/build-official-release.sh b/release/build-official-release.sh index 245481a115aca..672121551a04d 100755 --- a/release/build-official-release.sh +++ b/release/build-official-release.sh @@ -59,6 +59,12 @@ else RELEASE_BRANCH="release-${VERSION_MAJOR}.${VERSION_MINOR}" fi +if [[ "$KUBE_RELEASE_VERSION" =~ alpha|beta ]]; then + KUBE_RELEASE_TYPE="latest" +else + KUBE_RELEASE_TYPE="stable" +fi + declare -r KUBE_BUILD_DIR=$(mktemp -d "/tmp/kubernetes-build-release-${KUBE_RELEASE_VERSION}-XXXXXXX") # Set the default umask for the release. This ensures consistency @@ -107,7 +113,7 @@ cat <<- EOM Success! You must now do the following (you may want to cut and paste these instructions elsewhere): - 1) pushd ${KUBE_BUILD_DIR}; build/push-official-release.sh ${KUBE_RELEASE_VERSION} + 1) pushd ${KUBE_BUILD_DIR}; build/push-official-release.sh ${KUBE_RELEASE_VERSION} ${KUBE_RELEASE_TYPE} 2) Release notes draft, to be published when the release is announced: