summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2022-08-12 14:34:38 +0100
committerDaniil Baturin <daniil@baturin.org>2022-08-12 14:34:38 +0100
commita39c7d5f6e22645baf2b567532ad1b4b3c9fa511 (patch)
tree5af80a22e24804a2fd0f63fdc7289abe6ec6a00c /Jenkinsfile
parent126810e66277718d0f9304527043d5e5c0485ba9 (diff)
downloadvyos-build-a39c7d5f6e22645baf2b567532ad1b4b3c9fa511.tar.gz
vyos-build-a39c7d5f6e22645baf2b567532ad1b4b3c9fa511.zip
Set cache age for files on upload to S3
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 0e8ca036..40d788f0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -159,15 +159,18 @@ pipeline {
// Publish ISO image to snapshot bucket
if (files && params.BUILD_SNAPSHOT) {
withAWS(region: 'us-east-1', credentials: 's3-vyos-downloads-rolling-rw') {
- s3Upload(bucket: 's3-us.vyos.io', path: 'snapshot/' + params.BUILD_VERSION + '/', workingDir: 'build', includePathPattern: 'vyos*.iso')
+ s3Upload(bucket: 's3-us.vyos.io', path: 'snapshot/' + params.BUILD_VERSION + '/', workingDir: 'build', includePathPattern: 'vyos*.iso',
+ cacheControl: "public, max-age=14400")
}
} else {
// Publish build result to AWS S3 rolling bucket
withAWS(region: 'us-east-1', credentials: 's3-vyos-downloads-rolling-rw') {
s3Upload(bucket: 's3-us.vyos.io', path: 'rolling/' + getGitBranchName() + '/',
- workingDir: 'build', includePathPattern: 'vyos*.iso')
+ workingDir: 'build', includePathPattern: 'vyos*.iso',
+ cacheControl: "public, max-age=14400")
s3Copy(fromBucket: 's3-us.vyos.io', fromPath: 'rolling/' + getGitBranchName() + '/' + files[0].name,
- toBucket: 's3-us.vyos.io', toPath: 'rolling/' + getGitBranchName() + '/vyos-rolling-latest.iso')
+ toBucket: 's3-us.vyos.io', toPath: 'rolling/' + getGitBranchName() + '/vyos-rolling-latest.iso',
+ cacheControl: "public, max-age=14400")
}
}