Merge pull request #28922 from david-mcmahon/release-push

Automatic merge from submit-queue

Add RELEASE_INFRA_PUSH related code to support pushes from kubernetes/release.

ref #16529
This commit is contained in:
k8s-merge-robot 2016-07-14 19:55:56 -07:00 committed by GitHub
commit 4030afdfb1

View File

@ -36,8 +36,11 @@ export KUBE_SKIP_CONFIRMATIONS=y
# Skip gcloud update checking
export CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK=true
# FEDERATION?
: ${FEDERATION:="false"}
: ${RELEASE_INFRA_PUSH:="false"}
: ${KUBE_RELEASE_RUN_TESTS:="n"}
export KUBE_RELEASE_RUN_TESTS
export KUBE_RELEASE_RUN_TESTS RELEASE_INFRA_PUSH FEDERATION
# Clean stuff out. Assume the last build left the tree in an odd
# state.
@ -54,9 +57,25 @@ git clean -fdx
# Build
go run ./hack/e2e.go -v --build
[[ ${KUBE_SKIP_PUSH_GCS:-} =~ ^[yY]$ ]] || {
# Push to GCS
./build/push-ci-build.sh
}
# Push to GCS?
if [[ ${KUBE_SKIP_PUSH_GCS:-} =~ ^[yY]$ ]]; then
echo "Not pushed to GCS..."
elif $RELEASE_INFRA_PUSH; then
git clone https://github.com/kubernetes/release $WORKSPACE/release
readonly release_infra_clone=$WORKSPACE/release
if [[ ! -x $release_infra_clone/push-ci-build.sh ]]; then
echo "FATAL: Something went wrong." \
"$release_infra_clone/push-ci-build.sh isn't available. Exiting..." >&2
exit 1
fi
$FEDERATION && federation_flag="--federation"
# Use --nomock to do the real thing
#$release_infra_clone/push-ci-build.sh --nomock ${federation_flag-}
$release_infra_clone/push-ci-build.sh ${federation_flag-}
else
./build/push-ci-build.sh
fi
sha256sum _output/release-tars/kubernetes*.tar.gz