diff --git a/lib/releaselib.sh b/lib/releaselib.sh index db219ce561a2..19ef1622231a 100644 --- a/lib/releaselib.sh +++ b/lib/releaselib.sh @@ -412,14 +412,12 @@ release::gcs::stage_and_hash() { # @param version - The version # @param build_output - build output directory # @param bucket - GS bucket -# @optparam bucket_mirror - (optional) mirror GS bucket # @return 1 on failure release::gcs::copy_release_artifacts() { local build_type=$1 local version=$2 local build_output=$3 local bucket=$4 - local bucket_mirror=$5 local platform local platforms local release_stage=$build_output/release-stage @@ -428,7 +426,6 @@ release::gcs::copy_release_artifacts() { local src local dst local gcs_destination=gs://$bucket/$build_type/$version - local gcs_mirror=gs://$bucket_mirror/$build_type/$version local gce_path=$release_stage/full/kubernetes/cluster/gce local gci_path @@ -490,13 +487,6 @@ release::gcs::copy_release_artifacts() { logecho -n "- Listing final contents to log file: " logrun -s $GSUTIL ls -lhr "$gcs_destination" || return 1 - - # Push to mirror if set - if [[ -n "$bucket_mirror" && "$bucket" != "$bucket_mirror" ]]; then - logecho -n "- Mirroring build to $gcs_mirror: " - logrun -s $GSUTIL -q -m rsync -a public_read -d -r "$gcs_destination" "$gcs_mirror" \ - || return 1 - fi } @@ -508,25 +498,19 @@ release::gcs::copy_release_artifacts() { # @param version - The version # @param build_output - build output directory # @param bucket - GS bucket -# @optparam bucket_mirror - GS mirror bucket # @return 1 on failure release::gcs::publish_version () { local build_type=$1 local version=$2 local build_output=$3 local bucket=$4 - local bucket_mirror=$5 local release_dir="gs://$bucket/$build_type/$version" local version_major local version_minor local publish_file local -a publish_files - local -a publish_buckets=($bucket) local type="latest" - # Ensure no duplicate - [[ "$bucket" != "$bucket_mirror" ]] && publish_buckets+=($bucket_mirror) - # For release/ targets, type could be 'stable' if [[ "$build_type" == release ]]; then [[ "$version" =~ alpha|beta ]] || type="stable" @@ -547,18 +531,16 @@ release::gcs::publish_version () { $type-$version_major.$version_minor ) - for b in ${publish_buckets[*]}; do - logecho - logecho "Publish official pointer text files to $b..." - - for publish_file in ${publish_files[@]}; do - # If there's a version that's above the one we're trying to release, don't - # do anything, and just try the next one. - release::gcs::verify_latest_update $build_type/$publish_file.txt \ - $b $version || continue - release::gcs::publish $build_type/$publish_file.txt $build_output \ - $b $version || return 1 - done + logecho + logecho "Publish official pointer text files to $bucker..." + + for publish_file in ${publish_files[@]}; do + # If there's a version that's above the one we're trying to release, don't + # do anything, and just try the next one. + release::gcs::verify_latest_update $build_type/$publish_file.txt \ + $bucket $version || continue + release::gcs::publish $build_type/$publish_file.txt $build_output \ + $bucket $version || return 1 done } diff --git a/push-build.sh b/push-build.sh index 553e652328a3..465bf288f799 100755 --- a/push-build.sh +++ b/push-build.sh @@ -23,7 +23,7 @@ PROG=${0##*/} #+ #+ SYNOPSIS #+ $PROG [--nomock] [--federation] [--noupdatelatest] [--ci] -#+ [--bucket=] [--bucket-mirror=] +#+ [--bucket=] #+ $PROG [--helpshort|--usage|-?] #+ $PROG [--help|-man] #+ @@ -44,7 +44,6 @@ PROG=${0##*/} #+ [--federation] - Enable FEDERATION push #+ [--ci] - Used when called from Jekins (for ci runs) #+ [--bucket=] - Specify an alternate bucket for pushes -#+ [--bucket-mirror=] - Specify a mirror bucket for pushes #+ [--gcs-suffix=] - Specify a suffix to append to the upload #+ destination on GCS. #+ [--noupdatelatest] - Do not update the latest file @@ -93,7 +92,6 @@ common::timestamp begin # MAIN ############################################################################### RELEASE_BUCKET=${FLAGS_bucket:-"kubernetes-release-dev"} -RELEASE_BUCKET_MIRROR=$FLAGS_bucket_mirror # Compatibility with incoming global args [[ $KUBE_GCS_UPDATE_LATEST == "n" ]] && FLAGS_noupdatelatest=1 @@ -119,10 +117,6 @@ if ((FLAGS_nomock)); then else # Point to a $USER playground RELEASE_BUCKET+=-$USER - if [[ -n $RELEASE_BUCKET_MIRROR ]]; then - logecho "--bucket-mirror disabled for mock runs..." - unset RELEASE_BUCKET_MIRROR - fi fi # This will canonicalize the path @@ -139,7 +133,7 @@ if ! common::set_cloud_binaries; then common::exit 1 fi -for bucket in $RELEASE_BUCKET $RELEASE_BUCKET_MIRROR; do +for bucket in $RELEASE_BUCKET; do logecho -n "Check/make release bucket $bucket: " logrun -s release::gcs::ensure_release_bucket $bucket || common::exit 1 done @@ -152,8 +146,7 @@ common::stepheader COPY RELEASE ARTIFACTS attempt=0 while ((attempt=max_attempts)) && common::exit 1 "Exiting..." @@ -168,8 +161,7 @@ if ! ((FLAGS_noupdatelatest)); then attempt=0 while ((attempt=max_attempts)) && common::exit 1 "Exiting..."