Skip to content

Commit

Permalink
feat(ci): use new gcloudSaveTmpFile as alternative to Jenkins stash
Browse files Browse the repository at this point in the history
Related to INFRA-3024
  • Loading branch information
cmur2 committed Mar 9, 2022
1 parent 6b052ed commit f13f3ab
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ pipeline {
// to simplify building the Docker image, we copy the distribution to a fixed
// filename that doesn't include the version
runMavenContainerCommand('cp dist/target/camunda-cloud-zeebe-*.tar.gz camunda-cloud-zeebe.tar.gz')
stash name: "zeebe-build", includes: "m2-repository/io/camunda/*/${VERSION}/*"
stash name: "zeebe-distro", includes: "camunda-cloud-zeebe.tar.gz"

container('maven') {
gcloudSaveTmpFile('zeebe-distro', ['camunda-cloud-zeebe.tar.gz'])

sh "tar -cf zeebe-build.tar ./m2-repository/io/camunda/*/${VERSION}/*"
gcloudSaveTmpFile('zeebe-build', ['zeebe-build.tar'])
}
}
}
}
Expand Down Expand Up @@ -250,7 +255,10 @@ pipeline {
timeout(time: shortTimeoutMinutes, unit: 'MINUTES') {
prepareMavenContainer()

unstash name: "zeebe-build"
container('maven') {
gcloudRestoreTmpFile('zeebe-build', ['zeebe-build.tar'])
sh "tar -xf zeebe-build.tar"
}
runMavenContainerCommand('.ci/scripts/distribution/it-prepare.sh')
}
}
Expand All @@ -265,7 +273,9 @@ pipeline {

steps {
timeout(time: shortTimeoutMinutes, unit: 'MINUTES') {
unstash name: "zeebe-distro"
container('maven') {
gcloudRestoreTmpFile('zeebe-distro', ['camunda-cloud-zeebe.tar.gz'])
}
container('docker') {
sh '.ci/scripts/docker/build.sh'
}
Expand Down

0 comments on commit f13f3ab

Please sign in to comment.