Skip to content

Commit

Permalink
feat(ci): support storing artifacts for PRs in separate dirs (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya authored Jul 29, 2020
1 parent bff963a commit 8a2b8a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .ci/packaging.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ def withMacOSEnv(Closure body){
}

def publishPackages(baseDir){
googleStorageUpload(bucket: "gs://${JOB_GCS_BUCKET}/snapshots",
def bucketUri = "gs://${JOB_GCS_BUCKET}/snapshots"
if (env.CHANGE_ID?.trim()) {
bucketUri = "gs://${JOB_GCS_BUCKET}/pull-requests/pr-${env.CHANGE_ID}"
}

googleStorageUpload(bucket: "${bucketUri}",
credentialsId: "${JOB_GCS_CREDENTIALS}",
pathPrefix: "${baseDir}/build/distributions/",
pattern: "${baseDir}/build/distributions/**/*",
Expand Down

0 comments on commit 8a2b8a0

Please sign in to comment.