forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation and script on how to get recent and "nightly" builds
- Loading branch information
1 parent
719870f
commit c053b9a
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}" |