diff options
author | Dmitry Lomov <dslomov@google.com> | 2017-02-14 16:25:34 +0000 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2017-02-14 16:27:15 +0000 |
commit | 1893c21f9f04acff4a3cc5cd20ddbf9fe89ae59a (patch) | |
tree | 339a7115987f95f3f41be023748b69d2f60419ef /scripts | |
parent | a751f92b9fc21930547ea67347604fca0d0ed1e6 (diff) |
Rollback of commit 01aa7d6f177f3284b5fecc0397bf29a605b37df0.
*** Reason for rollback ***
Breaks the CI: http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/1270/console
*** Original change description ***
Adds support for pushing sites that don't need build, and build benchmark site.
This should not affect CI for now.
--
PiperOrigin-RevId: 147474775
MOS_MIGRATED_REVID=147474775
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index bb863baa00..f7e26bdbaa 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -150,7 +150,6 @@ function bazel_build() { cp bazel-genfiles/bazel-distfile.zip $1/bazel-${release_label}-dist.zip fi cp bazel-genfiles/site/jekyll-tree.tar $1/www.bazel.build.tar - cp bazel-bin/src/tools/benchmark/webapp/site.tar $1/perf.bazel.build.tar.nobuild cp bazel-genfiles/scripts/packages/README.md $1/README.md fi } @@ -487,7 +486,6 @@ function bazel_release() { # Use jekyll build to build the site and then gsutil to copy it to GCS # Input: $1 tarball to the jekyll site # $2 name of the bucket to deploy the site to -# $3 "nobuild" if only publish without build # It requires to have gsutil installed. You can force the path to gsutil # by setting the GSUTIL environment variable function build_and_publish_site() { @@ -496,23 +494,17 @@ function build_and_publish_site() { local gs="$(get_gsutil)" local site="$1" local bucket="$2" - local nobuild="$3" if [ ! -f "${site}" ] || [ -z "${bucket}" ]; then echo "Usage: build_and_publish_site <site-tarball> <bucket>" >&2 return 1 fi - local prod_dir="${tmpdir}" - if [ "$nobuild" != "nobuild" ]; then - tar xf "${site}" --exclude=CNAME -C "${tmpdir}" - jekyll build -s "${tmpdir}" -d "${tmpdir}/production" - prod_dir="${tmpdir}/production" - fi - + tar xf "${site}" --exclude=CNAME -C "${tmpdir}" + jekyll build -s "${tmpdir}" -d "${tmpdir}/production" # Rsync: # -r: recursive # -c: compute checksum even though the input is from the filesystem - "${gs}" rsync -r -c "${prod_dir}" "gs://${bucket}" + "${gs}" rsync -r -c "${tmpdir}/production" "gs://${bucket}" "${gs}" web set -m index.html -e 404.html "gs://${bucket}" "${gs}" -m acl ch -R -u AllUsers:R "gs://${bucket}" } |