Skip to content

Commit

Permalink
Rename push-ci-build.sh to push-build.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-mcmahon committed Sep 8, 2016
1 parent 79eebd1 commit ac20425
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
38 changes: 25 additions & 13 deletions push-ci-build.sh → push-build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,43 @@ 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=<alt GS bucket>] [--bucket-mirror=<mirror GS bucket>]
#+ $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
#+ [--help | -man] - display man page for this script
#+ [--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
#+
Expand Down Expand Up @@ -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!!"
Expand Down Expand Up @@ -135,22 +144,25 @@ common::stepheader COPY RELEASE ARTIFACTS
##############################################################################
attempt=0
while ((attempt<max_attempts)); do
release::gcs::copy_release_artifacts ci $LATEST $KUBE_ROOT/_output \
release::gcs::copy_release_artifacts $GCS_DEST $LATEST $KUBE_ROOT/_output \
$RELEASE_BUCKET \
$RELEASE_BUCKET_MIRROR && break
((attempt++))
done
((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)); do
release::gcs::publish_version ci $LATEST $KUBE_ROOT/_output \
$RELEASE_BUCKET \
$RELEASE_BUCKET_MIRROR && break
release::gcs::publish_version $GCS_DEST $LATEST $KUBE_ROOT/_output \
$RELEASE_BUCKET \
$RELEASE_BUCKET_MIRROR && break
((attempt++))
done
((attempt>=max_attempts)) && common::exit 1 "Exiting..."
Expand Down

0 comments on commit ac20425

Please sign in to comment.