Skip to content

Commit

Permalink
Merge pull request #172 from cgwalters/images-s3
Browse files Browse the repository at this point in the history
jenkins/cloud,rdgo: Sync cloud images and rdgo into rhcos bucket
  • Loading branch information
openshift-merge-robot committed Jul 13, 2018
2 parents 1d4dbf6 + 8a3d000 commit 9c71da8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions Jenkinsfile.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,24 @@ node(NODE) {
}
}

stage("Sync Out") {
par_stages["rsync-out"] = { -> stage("rsync out") {
withCredentials([
string(credentialsId: params.ARTIFACT_SERVER, variable: 'ARTIFACT_SERVER'),
sshUserPrivateKey(credentialsId: params.ARTIFACT_SSH_CREDS_ID, keyFileVariable: 'KEY_FILE'),
]) {
utils.rsync_dir_out(ARTIFACT_SERVER, KEY_FILE, images)
}
}
} }
par_stages("s3-upload") = -> { stage("S3 upload") {
docker.image(DOCKER_IMG).inside(DOCKER_ARGS) {
withCredentials([
[$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'),
]) { sh """
aws s3 sync --delete ${images}/ s3://rhcos/images/
""" }
}
} }
parallel par_stages; par_stages = [:]
}
2 changes: 1 addition & 1 deletion Jenkinsfile.rdgo
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ node(NODE) {
withCredentials([
[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: params.AWS_CREDENTIALS],
]) {
sh "aws s3 sync --delete ${rdgo}/build/ s3://aos-ci/rhcos/rdgo"
sh "aws s3 sync --delete ${rdgo}/build/ s3://rhcos/rdgo"
}
currentBuild.description = 'rdgo build+sync done'
}
Expand Down

0 comments on commit 9c71da8

Please sign in to comment.