mirror of https://github.com/k3s-io/k3s
add documentation and script on how to get recent and "nightly" builds
parent
719870fdcf
commit
c053b9a51b
|
@ -31,4 +31,6 @@ Docs in this directory relate to developing Kubernetes.
|
|||
|
||||
* **Faster PR reviews** ([faster_reviews.md](faster_reviews.md)): How to get faster PR reviews.
|
||||
|
||||
* **Getting Recent Builds** ([getting-builds.md](getting-builds.md)): How to get recent builds including the latest builds to pass CI.
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/README.md?pixel)]()
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# Getting Kubernetes Builds
|
||||
|
||||
You can use [hack/get-build.sh](../../hack/get-build.sh) to or use as a reference on how to get the most recent builds with curl. With `get-build.sh` you can grab the most recent stable build, the most recent release candidate, or the most recent build to pass our ci and gce e2e tests (essentially a nightly build).
|
||||
|
||||
```
|
||||
usage:
|
||||
./hack/get-build.sh [stable|release|latest|latest-green]
|
||||
|
||||
stable: latest stable version
|
||||
release: latest release candidate
|
||||
latest: latest ci build
|
||||
latest-green: latest ci build to pass gce e2e
|
||||
```
|
||||
|
||||
You can also use the gsutil tool to explore the Google Cloud Storage release bucket. Here are some examples:
|
||||
```
|
||||
gsutil cat gs://kubernetes-release/ci/latest.txt # output the latest ci version number
|
||||
gsutil cat gs://kubernetes-release/ci/latest-green.txt # output the latest ci version number that passed gce e2e
|
||||
gsutil ls gs://kubernetes-release/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release
|
||||
gsutil ls gs://kubernetes-release/release # list all official releases and rcs
|
||||
```
|
||||
|
||||
|
||||
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/getting-builds.md?pixel)]()
|
|
@ -0,0 +1,70 @@
|
|||
#!/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.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
declare -r KUBE_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release"
|
||||
declare -r KUBE_TAR_NAME="kubernetes.tar.gz"
|
||||
|
||||
usage() {
|
||||
echo "usage:
|
||||
$0 [stable|release|latest|latest-green]
|
||||
|
||||
stable: latest stable version
|
||||
release: latest release candidate
|
||||
latest: latest ci build
|
||||
latest-green: latest ci build to pass gce e2e"
|
||||
}
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
"latest")
|
||||
# latest ci version is written in the latest.txt in the /ci dir
|
||||
KUBE_TAR_RELATIVE_PATH="ci"
|
||||
KUBE_VERSION_FILE="latest.txt"
|
||||
;;
|
||||
"latest-green")
|
||||
# latest ci version to pass gce e2e is written in the latest-green.txt in the /ci dir
|
||||
KUBE_TAR_RELATIVE_PATH="ci"
|
||||
KUBE_VERSION_FILE="latest-green.txt"
|
||||
;;
|
||||
"stable")
|
||||
# latest stable release version is written in the stable.txt file in the /release dir
|
||||
KUBE_TAR_RELATIVE_PATH="release"
|
||||
KUBE_VERSION_FILE="stable.txt"
|
||||
;;
|
||||
"release")
|
||||
# latest release candidate version is written in latest.txt in the /release dir
|
||||
KUBE_TAR_RELATIVE_PATH="release"
|
||||
KUBE_VERSION_FILE="latest.txt"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
KUBE_BINARY_DIRECTORY="${KUBE_RELEASE_BUCKET_URL}/${KUBE_TAR_RELATIVE_PATH}"
|
||||
KUBE_VERSION=$(curl --silent --fail "${KUBE_BINARY_DIRECTORY}/${KUBE_VERSION_FILE}")
|
||||
KUBE_BINARY_PATH="${KUBE_BINARY_DIRECTORY}/${KUBE_VERSION}/${KUBE_TAR_NAME}"
|
||||
|
||||
curl --fail -o kubernetes-${KUBE_VERSION}.tar.gz "${KUBE_BINARY_PATH}"
|
Loading…
Reference in New Issue