mirror of
				https://github.com/vyos/vyos-build.git
				synced 2025-10-01 20:28:40 +02:00 
			
		
		
		
	Set cache age for files on upload to S3
This commit is contained in:
		
							parent
							
								
									126810e662
								
							
						
					
					
						commit
						a39c7d5f6e
					
				
							
								
								
									
										9
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@ -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")
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user