Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #32013 #32235 #34359 #35233 #35671

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 8 additions & 22 deletions hack/jenkins/build.sh
Expand Up @@ -39,15 +39,7 @@ export CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK=true
# FEDERATION?
: ${FEDERATION:="false"}
: ${KUBE_RELEASE_RUN_TESTS:="n"}

# New kubernetes/release/push-ci-build.sh values
# RELEASE_INFRA_PUSH=true when we're using kubernetes/release/push-ci-build.sh
: ${RELEASE_INFRA_PUSH:="false"}
# SET_NOMOCK_FLAG=true means we're doing full pushes and we pass --nomock to
# push-ci-build.sh. This is set to false in the
# testing jobs and only used in the RELEASE_INFRA_PUSH=true scope below.
: ${SET_NOMOCK_FLAG:="true"}
export KUBE_RELEASE_RUN_TESTS RELEASE_INFRA_PUSH FEDERATION SET_NOMOCK_FLAG
export KUBE_RELEASE_RUN_TESTS

# Clean stuff out. Assume the last build left the tree in an odd
# state.
Expand All @@ -68,26 +60,20 @@ make release
# Push to GCS?
if [[ ${KUBE_SKIP_PUSH_GCS:-} =~ ^[yY]$ ]]; then
echo "Not pushed to GCS..."
elif ${RELEASE_INFRA_PUSH-}; then
else
readonly release_infra_clone="${WORKSPACE}/_tmp/release.git"
mkdir -p ${WORKSPACE}/_tmp
git clone https://github.com/kubernetes/release ${release_infra_clone}

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
push_build=${release_infra_clone}/push-build.sh

[[ -n "${KUBE_GCS_RELEASE_BUCKET-}" ]] \
&& bucket_flag="--bucket=${KUBE_GCS_RELEASE_BUCKET-}"
&& bucket_flag="--bucket=${KUBE_GCS_RELEASE_BUCKET-}"
${FEDERATION} && federation_flag="--federation"
${SET_NOMOCK_FLAG} && mock_flag="--nomock"
${release_infra_clone}/push-ci-build.sh ${bucket_flag-} ${federation_flag-} \
${mock_flag-}
else
./build/push-ci-build.sh
[[ -n "${KUBE_GCS_RELEASE_SUFFIX-}" ]] \
&& gcs_suffix_flag="--gcs-suffix=${KUBE_GCS_RELEASE_SUFFIX-}"
${push_build} ${bucket_flag-} ${federation_flag-} ${gcs_suffix_flag-} \
--nomock --verbose --ci
fi

sha256sum _output/release-tars/kubernetes*.tar.gz