Remove no longer used site publisher
This is now done by a Google Cloud Container Builder job.
@@ -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}"
-}
