Commit da4f0ca6 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #24629 from david-mcmahon/release-deprecation

Automatic merge from submit-queue Deprecate release infrastructure and doc - moved to kubernetes/release Part 2 of https://github.com/kubernetes/release/pull/1 This PR finalizes the split between the main kubernetes repo and the release tooling now under kubernetes/release. ref #16529
parents 09efe045 4e07b43d
#!/bin/bash
# Copyright 2014 The Kubernetes Authors.
#
# 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.
# Clean out the output directory on the docker host.
set -o errexit
set -o nounset
set -o pipefail
function pop_dir {
popd > /dev/null
}
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
if [[ -z "${1:-}" ]]; then
echo "Usage: ${0} <last-release-pr-number> <current-release-pr-number> --api-token=$TOKEN [opts]"
echo "To create a GitHub API token, see https://github.com/settings/tokens"
exit 1
fi
pushd . > /dev/null
trap 'pop_dir' INT TERM EXIT
kube::golang::build_binaries contrib/release-notes
kube::golang::place_bins
echo "Fetching release notes"
releasenotes=$(kube::util::find-binary "release-notes")
"${releasenotes}" --last-release-pr=${1} --current-release-pr=${2} ${@}
#!/bin/bash
# Copyright 2015 The Kubernetes Authors.
#
# 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.
# Pushes a development build to a directory in your current project,
# pushing to something like:
# gs://kubernetes-releases-3fda2/devel/v0.8.0-437-g7f147ed/
set -o errexit
set -o nounset
set -o pipefail
LATEST=$(git describe)
KUBE_GCS_NO_CACHING=n
KUBE_GCS_MAKE_PUBLIC=y
KUBE_GCS_UPLOAD_RELEASE=y
KUBE_GCS_RELEASE_PREFIX="devel/${LATEST}"
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/build/common.sh"
kube::release::gcs::release
#!/bin/bash
# Copyright 2014 The Kubernetes Authors.
#
# 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.
# Pushes an official release to our official release location
set -o errexit
set -o nounset
set -o pipefail
if [[ "$#" -lt 1 ]]; then
echo "Usage: ${0} <version> [<type>]"
echo "(<type> 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'
KUBE_GCS_UPLOAD_RELEASE='y'
KUBE_GCS_RELEASE_BUCKET='kubernetes-release'
KUBE_GCS_RELEASE_PREFIX="release/${KUBE_RELEASE_VERSION}"
KUBE_GCS_PUBLISH_VERSION="${KUBE_RELEASE_VERSION}"
KUBE_DOCKER_REGISTRY="gcr.io/google_containers"
KUBE_DOCKER_IMAGE_TAG="${KUBE_RELEASE_VERSION}"
KUBE_GCLOUD_PRODUCTION_ACCOUNT="k8s.production.user@gmail.com"
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
if ! kube::release::gcloud_account_is_active "${KUBE_GCLOUD_PRODUCTION_ACCOUNT}"; then
kube::log::error "Pushing images to gcr.io/google_containers requires being logged in as ${KUBE_GCLOUD_PRODUCTION_ACCOUNT}"
return 1
fi
kube::release::parse_and_validate_release_version "${KUBE_RELEASE_VERSION}"
kube::release::gcs::release
kube::release::docker::release
kube::release::gcs::publish_official $KUBE_RELEASE_TYPE
......@@ -110,11 +110,7 @@ Guide](../admin/README.md).
## Building releases
* **Making release notes** ([making-release-notes.md](making-release-notes.md)): Generating release notes for a new release.
* **Releasing Kubernetes** ([releasing.md](releasing.md)): How to create a Kubernetes release (as in version)
and how the version information gets embedded into the built binaries.
See the [kubernetes/release](https://github.com/kubernetes/release) repository for details on creating releases and related tools and helper scripts.
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/README.md?pixel)]()
......
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
width="25" height="25">
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
<!-- TAG RELEASE_LINK, added by the munger automatically -->
<strong>
The latest release of this document can be found
[here](http://releases.k8s.io/release-1.4/docs/devel/making-release-notes.md).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
## Making release notes
This documents the process for making release notes for a release.
### 1) Note the PR number of the previous release
Find the most-recent PR that was merged with the previous .0 release. Remember
this as $LASTPR.
- _TODO_: Figure out a way to record this somewhere to save the next
release engineer time.
Find the most-recent PR that was merged with the current .0 release. Remember
this as $CURRENTPR.
### 2) Run the release-notes tool
```bash
${KUBERNETES_ROOT}/build/make-release-notes.sh $LASTPR $CURRENTPR
```
### 3) Trim the release notes
This generates a list of the entire set of PRs merged since the last minor
release. It is likely long and many PRs aren't worth mentioning. If any of the
PRs were cherrypicked into patches on the last minor release, you should exclude
them from the current release's notes.
Open up `candidate-notes.md` in your favorite editor.
Remove, regroup, organize to your hearts content.
### 4) Update CHANGELOG.md
With the final markdown all set, cut and paste it to the top of `CHANGELOG.md`
### 5) Update the Release page
* Switch to the [releases](https://github.com/kubernetes/kubernetes/releases)
page.
* Open up the release you are working on.
* Cut and paste the final markdown from above into the release notes
* Press Save.
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/making-release-notes.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
assignees:
- ihmccreery
#!/bin/bash
# Copyright 2015 The Kubernetes Authors.
#
# 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.
# Builds an official release based on a git tag, with instructions for
# how to proceed after the bits are built.
set -o errexit
set -o nounset
set -o pipefail
# Get the md5 (duplicated from common.sh, but don't want to pull in
# all of common.sh here)
function md5() {
if which md5 >/dev/null 2>&1; then
md5 -q "$1"
else
md5sum "$1" | awk '{ print $1 }'
fi
}
# Get the sha1 (duplicated from common.sh, but don't want to pull in
# all of common.sh here)
function sha1() {
if which shasum >/dev/null 2>&1; then
shasum -a1 "$1" | awk '{ print $1 }'
else
sha1sum "$1" | awk '{ print $1 }'
fi
}
declare -r KUBE_GITHUB="https://github.com/kubernetes/kubernetes.git"
declare -r KUBE_RELEASE_VERSION=${1-}
declare -r TMPDIR=${TMPDIR:-"/tmp"}
declare -r KUBE_RELEASE_UMASK=${KUBE_RELEASE_UMASK:-022}
VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha)\\.(0|[1-9][0-9]*))?$"
[[ ${KUBE_RELEASE_VERSION} =~ ${VERSION_REGEX} ]] || {
echo "!!! You must specify the version you are releasing in the form of '${VERSION_REGEX}'" >&2
exit 1
}
VERSION_MAJOR="${BASH_REMATCH[1]}"
VERSION_MINOR="${BASH_REMATCH[2]}"
if [[ "$KUBE_RELEASE_VERSION" =~ "alpha" ]]; then
# We don't want to version docs for alpha releases, so we are just pointing to head.
RELEASE_BRANCH="master"
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 "${TMPDIR}/kubernetes-build-release-${KUBE_RELEASE_VERSION}-XXXXXXX")
# Set the default umask for the release. This ensures consistency
# across our release builds.
umask "${KUBE_RELEASE_UMASK}"
echo "Cloning ${KUBE_GITHUB} at ${KUBE_RELEASE_VERSION}."
echo
echo "NOTE: Ignore the deatched HEAD warning you're about to get. We want that."
echo
git clone ${KUBE_GITHUB} -b "${KUBE_RELEASE_VERSION}" "${KUBE_BUILD_DIR}"
# !!! REMINDER !!!
#
# Past this point, you are dealing with a different release. Don't
# assume you're executing code from the same repo as this script is
# running in. This needs to be a version agnostic build.
echo
echo "Cloned, building release."
echo
cd "${KUBE_BUILD_DIR}"
export KUBE_RELEASE_RUN_TESTS=n
export KUBE_SKIP_CONFIRMATIONS=y
# In order to build docker images for a release and tag them appropriately we need
# to set these two variables.
export KUBE_DOCKER_REGISTRY="gcr.io/google_containers"
export KUBE_DOCKER_IMAGE_TAG="${KUBE_RELEASE_VERSION}"
make release
if ${KUBE_BUILD_DIR}/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
ln -s ${KUBE_BUILD_DIR}/_output/release-tars/kubernetes.tar.gz ${KUBE_BUILD_DIR}
MD5=$(md5 "${KUBE_BUILD_DIR}/kubernetes.tar.gz")
SHA1=$(sha1 "${KUBE_BUILD_DIR}/kubernetes.tar.gz")
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} ${KUBE_RELEASE_TYPE}
2) Release notes draft, to be published when the release is announced:
a) Title:
Release ${KUBE_RELEASE_VERSION}
b) Template for the description:
## [Documentation](http://releases.k8s.io/${RELEASE_BRANCH}/docs/README.md)
## [Examples](http://releases.k8s.io/${RELEASE_BRANCH}/examples)
## Changes since <last release> (last PR <last PR>)
<release notes>
binary | hash alg | hash
------ | -------- | ----
\`kubernetes.tar.gz\` | md5 | \`${MD5}\`
\`kubernetes.tar.gz\` | sha1 | \`${SHA1}\`
3) Ensure all the binaries are in place on GCS before cleaning, (you might
want to wait until the release is announced and published on GitHub, too).
4) make clean; popd; rm -rf ${KUBE_BUILD_DIR}
EOM
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment