diff --git a/Jenkinsfile.aws-test b/Jenkinsfile.aws-test index f2722b2c9..8e6e2f379 100644 --- a/Jenkinsfile.aws-test +++ b/Jenkinsfile.aws-test @@ -42,6 +42,7 @@ node(NODE) { [$class: 'AmazonWebServicesCredentialsBinding', credentialsId: params.AWS_CREDENTIALS], string(credentialsId: params.S3_PRIVATE_BUCKET, variable: 'S3_PRIVATE_BUCKET'), string(credentialsId: params.AWS_CI_ACCOUNT, variable: 'AWS_CI_ACCOUNT'), + string(credentialsId: params.S3_PUBLIC_BUCKET, variable: 'S3_PUBLIC_BUCKET'), ]) { currentBuild.description = "version=${version} ami=${ami_intermediate}" sh """ @@ -62,6 +63,11 @@ node(NODE) { aws ec2 modify-image-attribute \ --image-id ${ami_intermediate} \ --launch-permission '{"Add":[{"Group":"all"}]}' + + # Upload the json file to a public location + aws s3 cp --acl public-read \ + ${images}/aws-${AWS_REGION}-tested.json \ + s3://${S3_PUBLIC_BUCKET}/aws-${AWS_REGION}-tested.json """ } } diff --git a/pipeline-utils.groovy b/pipeline-utils.groovy index 6dc8a2c51..e41296a06 100644 --- a/pipeline-utils.groovy +++ b/pipeline-utils.groovy @@ -61,6 +61,11 @@ def define_properties(timer) { description: "(not secret) Private S3 bucket to use when uploading AMIs.", defaultValue: '5c9571a2-c492-421f-b506-ba469afffc10', required: true), + credentials(name: 'S3_PUBLIC_BUCKET', + credentialType: 'org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl', + description: "(not secret) Public S3 bucket to push public files.", + defaultValue: '17f001fc-6b07-4233-aee2-3e8448459cf5', + required: true), credentials(name: 'OSTREE_INSTALL_URL', credentialType: 'org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl', description: "(not secret) Remote OSTree repo URL to install from when running imagefactory.",