From ac204251fb23cd3cd905254c4536ec577f88eaf6 Mon Sep 17 00:00:00 2001 From: David McMahon Date: Wed, 7 Sep 2016 14:54:18 -0700 Subject: [PATCH] Rename push-ci-build.sh to push-build.sh. --- README.md | 1 + push-ci-build.sh => push-build.sh | 38 ++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 13 deletions(-) rename push-ci-build.sh => push-build.sh (81%) mode change 100755 => 100644 diff --git a/README.md b/README.md index 94fd656b792..83221c750f4 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ your favorite editor. * [relnotes](https://github.com/kubernetes/release/blob/master/relnotes) : Scrape github for release notes \(See below for more info\) * [branchff](https://github.com/kubernetes/release/blob/master/branchff) : Fast-forward branching helper * [changelog-update](https://github.com/kubernetes/release/blob/master/changelog-update) : Update CHANGELOG.md version entries by rescanning github for text and label changes +* [push-build.sh](https://github.com/kubernetes/release/blob/master/push-build.sh) : Push a developer (or CI) build up to GCS ### Release Notes Gathering diff --git a/push-ci-build.sh b/push-build.sh old mode 100755 new mode 100644 similarity index 81% rename from push-ci-build.sh rename to push-build.sh index c83d9c2f612..c02f6a07cca --- a/push-ci-build.sh +++ b/push-build.sh @@ -19,26 +19,30 @@ PROG=${0##*/} ######################################################################## #+ #+ NAME -#+ $PROG - Push Continuous Integration Build +#+ $PROG - Push Kubernetes Release Artifacts up to GCS #+ #+ SYNOPSIS -#+ $PROG [--nomock] [--federation] [--noupdatelatest] +#+ $PROG [--nomock] [--federation] [--noupdatelatest] [--ci] #+ [--bucket=] [--bucket-mirror=] #+ $PROG [--helpshort|--usage|-?] #+ $PROG [--help|-man] #+ #+ DESCRIPTION -#+ Replaces kubernetes/build/push-ci-build.sh. -#+ Used for pushing CI builds during Jenkins' runs. -#+ Runs in mock mode by default. Use --nomock to do a real push. +#+ Replaces kubernetes/build/push-*-build.sh. +#+ Used for pushing developer builds and Jenkins' continuous builds. +#+ +#+ Developer pushes simply run as they do pushing to devel/ on GCS. +#+ In --ci mode, $PROG runs in mock mode by default. Use --nomock to do +#+ a real push. #+ #+ Federation values are just passed through as exported global vars still #+ due to the fact that we're still leveraging the existing federation #+ interface in kubernetes proper. #+ #+ OPTIONS -#+ [--nomock] - Enables a real push +#+ [--nomock] - Enables a real push (--ci only) #+ [--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 #+ [--noupdatelatest] - Do not update the latest file @@ -46,10 +50,12 @@ PROG=${0##*/} #+ [--usage | -?] - display in-line usage #+ #+ EXAMPLES -#+ $PROG - Do a CI push -#+ $PROG --federation - Do a CI push with federation +#+ $PROG - Do a developer push +#+ $PROG --nomock --federation --ci +#+ - Do a (non-mocked) CI push with federation #+ $PROG --bucket=kubernetes-release-$USER -#+ - Do a CI push to kubernetes-release-$USER +#+ - Do a developer push to +#+ kubernetes-release-$USER #+ #+ FILES #+ @@ -96,6 +102,9 @@ else common::exit 1 "Unable to get latest version from build tree. Exiting..." fi +GCS_DEST="devel" +((FLAGS_ci)) && GCS_DEST="ci" + if ((FLAGS_nomock)); then logecho logecho "$PROG is running a *REAL* push!!" @@ -135,22 +144,25 @@ common::stepheader COPY RELEASE ARTIFACTS ############################################################################## attempt=0 while ((attempt=max_attempts)) && common::exit 1 "Exiting..." +# If not --ci, then we're done here. +((FLAGS_ci)) || common::exit 0 "Exiting..." + if ! ((FLAGS_noupdatelatest)); then ############################################################################## common::stepheader UPLOAD to $RELEASE_BUCKET ############################################################################## attempt=0 while ((attempt=max_attempts)) && common::exit 1 "Exiting..."