Commit cac3390d authored by Robert Bailey's avatar Robert Bailey

Merge pull request #15316 from ihmccreery/no-cache

Make latest.txt files non-cacheable
parents 074da2e0 ec43cb0e
......@@ -1177,7 +1177,9 @@ function kube::release::gcs::publish() {
local contents
if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then
kube::log::status "Making uploaded version file public and non-cacheable."
gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1
gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1
# If public, validate public link
local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}"
kube::log::status "Validating uploaded version file at ${public_link}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment