File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,23 @@ node('linux') {
7373 string(credentialsId : ' aws-access-key-id-updatesjenkinsio' , variable : ' AWS_ACCESS_KEY_ID' ),
7474 string(credentialsId : ' aws-secret-access-key-updatesjenkinsio' , variable : ' AWS_SECRET_ACCESS_KEY' )
7575 ]) {
76- sh '''
77- azcopy sync updates/ "${UPDATES_FILE_SHARE_URL}" --exclude-path '.svn' --recursive=true
76+ withEnv([
77+ ' AWS_DEFAULT_REGION=auto' ,
78+ ' UPDATES_R2_BUCKETS=westeurope-updates-jenkins-io' ,
79+ ' UPDATES_R2_ENDPOINT=https://8d1838a43923148c5cee18ccc356a594.r2.cloudflarestorage.com' ,
80+ ]) {
81+ sh '''
82+ azcopy sync updates/ "${UPDATES_FILE_SHARE_URL}" --exclude-path '.svn' --recursive=true --delete-destination=true
7883
79- ## Note: AWS CLI are configured through environment variables (from Jenkins credentials) - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
80- export AWS_DEFAULT_REGION="auto"
81- aws s3 sync updates/ s3://"${UPDATES_R2_BUCKETS}"/ \
82- --no-progress \
83- --no-follow-symlinks \
84- --size-only \
85- --exclude '.svn' \
86- --endpoint-url "${UPDATES_R2_ENDPOINT}"
87- '''
84+ ## Note: AWS CLI are configured through environment variables (from Jenkins credentials) - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
85+ aws s3 sync updates/ s3://"${UPDATES_R2_BUCKETS}"/ \
86+ --no-progress \
87+ --no-follow-symlinks \
88+ --size-only \
89+ --exclude '.svn' \
90+ --endpoint-url "${UPDATES_R2_ENDPOINT}"
91+ '''
92+ }
8893 }
8994 }
9095 }
You can’t perform that action at this time.
0 commit comments