Skip to content

Commit 9437c5c

Browse files
committed
feat(ci): support storing artifacts for PRs in separate dirs (elastic#20282)
1 parent c9fd33f commit 9437c5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.ci/packaging.groovy

+6-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ def withMacOSEnv(Closure body){
222222
}
223223

224224
def publishPackages(baseDir){
225-
googleStorageUpload(bucket: "gs://${JOB_GCS_BUCKET}/snapshots",
225+
def bucketUri = "gs://${JOB_GCS_BUCKET}/snapshots"
226+
if (env.CHANGE_ID?.trim()) {
227+
bucketUri = "gs://${JOB_GCS_BUCKET}/pull-requests/pr-${env.CHANGE_ID}"
228+
}
229+
230+
googleStorageUpload(bucket: "${bucketUri}",
226231
credentialsId: "${JOB_GCS_CREDENTIALS}",
227232
pathPrefix: "${baseDir}/build/distributions/",
228233
pattern: "${baseDir}/build/distributions/**/*",

0 commit comments

Comments
 (0)