From 74e4d31328b39fe427f223802d85656c1fa15d58 Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Tue, 7 Nov 2017 22:40:02 +0100 Subject: Remove no longer used site publisher This is now done by a Google Cloud Container Builder job. Change-Id: I33a9543f9b5bdb083171482e9eaebdb43e77181b PiperOrigin-RevId: 174905217 --- scripts/ci/build.sh | 62 ----------------------------------------------------- 1 file changed, 62 deletions(-) (limited to 'scripts') 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 " >&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 " >&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}" -} -- cgit v1.2.3