Added gcloud instructions to docs and added a success message to script

Change-Id: Ibd6049c01c4ea74c63c12ab1c07f12e8da48e6a9
diff --git a/docs/workflow.md b/docs/workflow.md
index e806b74..70eed7b 100644
--- a/docs/workflow.md
+++ b/docs/workflow.md
@@ -4,6 +4,26 @@
 building the base images on docker without any output due to
 [bazelbuild/bazel#1289](https://github.com/bazelbuild/bazel/issues/1289).
 
+## Prerequisites
+
+Docker:
+
+* You will need [at least 25GB](https://github.com/bazelbuild/continuous-integration/issues/73)
+  of free disk space.
+* Follow the instructions on [Ask Ubuntu](https://askubuntu.com/a/477554/671928)
+  for adding your user to the "docker" group.
+
+Gcloud:
+
+* You may need to authenticate and set the current project. To do so, run:
+
+```
+gcloud auth login
+gcloud set project bazel-public
+```
+
+## Pushing
+
 The classical worflow when modfiying ci.bazel.io is to first test the
 change on ci-staging.bazel.io, so a complete cycle would looks like:
 
@@ -22,7 +42,8 @@
 8. Send the change to review, reverting the change in 3.
 9. Once LGTM, deploy to production with `bazel run //gcr:deploy`.
 10. Finally, restart the prod jenkins instance by going to
-   [http://ci.bazel.io/safeExit](http://ci.bazel.io/safeExit).
+   [http://ci.bazel.io/safeExit](http://ci.bazel.io/safeExit). If you are not
+   logged in, you may get a stack trace. Log in and try again.
 
 ## Setting up for local testing
 
diff --git a/gcr/docker_push_template.sh.tpl b/gcr/docker_push_template.sh.tpl
index 95d1133..39c289a 100644
--- a/gcr/docker_push_template.sh.tpl
+++ b/gcr/docker_push_template.sh.tpl
@@ -15,6 +15,7 @@
 # limitations under the License.
 
 # This is a generated files that loads all docker layer built by "docker_push".
+set -eu
 
 RUNFILES="${PYTHON_RUNFILES:-${BASH_SOURCE[0]}.runfiles}"
 
@@ -57,3 +58,5 @@
 for tag in %{tags}; do
   "${GCLOUD}" docker -- push "%{repository}/${tag}"
 done
+
+echo "Successfully pushed."