diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2017-11-07 22:40:02 +0100 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-11-08 16:32:29 +0100 |
commit | 74e4d31328b39fe427f223802d85656c1fa15d58 (patch) | |
tree | d32bb0a1403ca6aaa2fdcca0146518fb891d4f54 /scripts | |
parent | b064b3c30c48f6b2431c31ee078af8da5620e2c9 (diff) |
Remove no longer used site publisher
This is now done by a Google Cloud Container Builder job.
Change-Id: I33a9543f9b5bdb083171482e9eaebdb43e77181b
PiperOrigin-RevId: 174905217
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index fa7fa1c8f9..ffcd0ed3b3 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -330,65 +330,3 @@ function deploy_release() { release_to_gcs "${gcs_args[@]}" release_to_apt } - -# 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() { - tmpdir=$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXX) - trap 'rm -fr ${tmpdir}' EXIT - 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}" - tar xf "${site}" --exclude=CNAME -C "${tmpdir}" - if [ "$nobuild" != "nobuild" ]; then - jekyll build -s "${tmpdir}" -d "${tmpdir}/production" - prod_dir="${tmpdir}/production" - fi - - # Rsync: - # -r: recursive - # -c: compute checksum even though the input is from the filesystem - "${gs}" rsync -r -c "${prod_dir}" "gs://${bucket}" - "${gs}" web set -m index.html -e 404.html "gs://${bucket}" - "${gs}" -m acl ch -R -u AllUsers:R "gs://${bucket}" -} - -# Push json file to perf site, also add to file_list -# Input: $1 json file to push -# $2 name of the bucket to deploy the site to -function push_benchmark_output_to_site() { - tmpdir=$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXX) - trap 'rm -fr ${tmpdir}' EXIT - local gs="$(get_gsutil)" - local output_file="$1" - local output_file_basename="$(basename ${output_file})" - local bucket="$2" - - if [ ! -f "${output_file}" ] || [ -z "${bucket}" ]; then - echo "Usage: push_benchmark_output_to_site <json-file-name> <bucket>" >&2 - return 1 - fi - - # Upload json file - "${gs}" cp "${output_file}" "gs://${bucket}/data/${output_file_basename}" - - # Download file_list (it might not exist) - "${gs}" cp "gs://${bucket}/file_list" "${tmpdir}" || true - # Update file_list - local list_file="${tmpdir}/file_list" - echo "${output_file_basename}" >> "${list_file}" - "${gs}" cp "${list_file}" "gs://${bucket}/file_list" - - "${gs}" -m acl ch -R -u AllUsers:R "gs://${bucket}" -} |