File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ def gcs_cmd = { String cmd ->
2828 }
2929}
3030
31- def upload_artifacts = {
31+ def upload_artifacts = { boolean cache ->
3232 withCredentials([[$class : ' FileBinding' , credentialsId : ' e80fd033-dd76-4d96-be79-6c272726fb82' , variable : ' GCSKEY' ]]) {
3333 sh " mkdir -p ${ getBasePath(gcs_key)} "
3434 sh " cat \"\$ {GCSKEY}\" > ${ gcs_key} "
3535 gcs_cmd ' gcloud auth activate-service-account -q --key-file /.config/key.json'
36- gcs_cmd " gsutil -mq cp -a public-read -r /upload/* ${ gcs_bucket} "
36+ headers = " "
37+ if (! cache) {
38+ headers + = ' -h "Cache-Control:no-cache"'
39+ }
40+ gcs_cmd " gsutil -mq ${ headers} cp -a public-read -r /upload/* ${ gcs_bucket} "
3741 gcs_cmd gcs_cleanup_cmd
3842 }
3943}
@@ -147,7 +151,7 @@ parallel(
147151 env. REVISION = git_commit. take(7 )
148152 make ' build-revision'
149153
150- upload_artifacts()
154+ upload_artifacts(true )
151155 }
152156 }
153157 },
@@ -163,7 +167,7 @@ parallel(
163167 make ' bootstrap'
164168 make ' build-latest'
165169
166- upload_artifacts()
170+ upload_artifacts(false )
167171 } else {
168172 echo " Skipping build of latest artifacts because this build is not on the master branch (branch: ${ git_branch} )"
169173 }
You can’t perform that action at this time.
0 commit comments