From fe64293c6a8e3bbdb9ac616f1a4b1e13e906b574 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 29 Jun 2016 07:56:48 -0700 Subject: [PATCH] Revert "Merge pull request #28172 from zmerlynn/push-alt-ci" This reverts commit 43437e4528a48fb24d9515706f8a90e242d89e27, reversing changes made to 532491aab66467e1284fddf6e06c830b7f65da76. --- build/common.sh | 26 ++------------------------ build/push-ci-build.sh | 1 - 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/build/common.sh b/build/common.sh index 6984e2d1470..d4301bc23e6 100755 --- a/build/common.sh +++ b/build/common.sh @@ -1229,16 +1229,6 @@ function kube::release::gcs::copy_release_artifacts() { fi gsutil ls -lhr "${gcs_destination}" || return 1 - - if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then - local -r gcs_mirror="gs://${KUBE_GCS_RELEASE_BUCKET_MIRROR}/${KUBE_GCS_RELEASE_PREFIX}" - kube::log::status "Mirroring build to ${gcs_mirror}" - gsutil -q -m "${gcs_options[@]+${gcs_options[@]}}" rsync -d -r "${gcs_destination}" "${gcs_mirror}" || return 1 - if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then - kube::log::status "Marking all uploaded mirror objects public" - gsutil -q -m acl ch -R -g all:R "${gcs_mirror}" >/dev/null 2>&1 || return 1 - fi - fi } # Publish a new ci version, (latest,) but only if the release files actually @@ -1503,19 +1493,7 @@ function kube::release::gcs::verify_ci_ge() { # If new version is greater than the GCS version function kube::release::gcs::publish() { local -r publish_file="${1-}" - - kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET}" "${publish_file}" || return 1 - - if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then - kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET_MIRROR}" "${publish_file}" || return 1 - fi -} - - -function kube::release::gcs::publish_to_bucket() { - local -r publish_bucket="${1}" - local -r publish_file="${2}" - local -r publish_file_dst="gs://${publish_bucket}/${publish_file}" + local -r publish_file_dst="gs://${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" mkdir -p "${RELEASE_STAGE}/upload" || return 1 echo "${KUBE_GCS_PUBLISH_VERSION}" > "${RELEASE_STAGE}/upload/latest" || return 1 @@ -1528,7 +1506,7 @@ function kube::release::gcs::publish_to_bucket() { gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1 gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1 # If public, validate public link - local -r public_link="https://storage.googleapis.com/${publish_bucket}/${publish_file}" + local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" kube::log::status "Validating uploaded version file at ${public_link}" contents="$(curl -s "${public_link}")" else diff --git a/build/push-ci-build.sh b/build/push-ci-build.sh index 4e131ad60e9..6d74878ffad 100755 --- a/build/push-ci-build.sh +++ b/build/push-ci-build.sh @@ -31,7 +31,6 @@ KUBE_GCS_MAKE_PUBLIC='y' KUBE_GCS_UPLOAD_RELEASE='y' KUBE_GCS_DELETE_EXISTING='n' : ${KUBE_GCS_RELEASE_BUCKET:='kubernetes-release'} -: ${KUBE_GCS_RELEASE_BUCKET_MIRROR:='kubernetes-release-dev'} KUBE_GCS_RELEASE_PREFIX="ci/${LATEST}" KUBE_GCS_PUBLISH_VERSION="${LATEST}"