Skip to content

Commit

Permalink
Add more resilent AWS credentials for jenkins pipline creds setup, us…
Browse files Browse the repository at this point in the history
…ing our levvel creds.
  • Loading branch information
Mason Packard committed Sep 2, 2016
1 parent aa21c19 commit 51de5fb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ if (BRANCH_TEST=="shibboleth-production"){
sh 'rm -rf builds'
sh 'mkdir -p builds'

withCredentials([[$class: 'FileBinding', credentialsId: 'our-aws-config', variable: 'FILE']]) {
ws {
sh 'mkdir -p ~/.aws'
sh 'cp $FILE ~/.aws/config'
}
}

withCredentials([[$class: 'FileBinding', credentialsId: 'our-aws-credentials', variable: 'FILE']]) {
ws {
sh 'mkdir -p ~/.aws'
sh 'cp $FILE ~/.aws/credentials'
}
}

stage 'Checkout'

checkout scm
Expand Down Expand Up @@ -63,6 +77,20 @@ if (BRANCH_TEST=="shibboleth-production"){
sh 'rm -rf builds'
sh 'mkdir -p builds'

withCredentials([[$class: 'FileBinding', credentialsId: 'our-aws-config', variable: 'FILE']]) {
ws {
sh 'mkdir -p ~/.aws'
sh 'cp $FILE ~/.aws/config'
}
}

withCredentials([[$class: 'FileBinding', credentialsId: 'our-aws-credentials', variable: 'FILE']]) {
ws {
sh 'mkdir -p ~/.aws'
sh 'cp $FILE ~/.aws/credentials'
}
}

stage 'Checkout'

checkout scm
Expand Down

0 comments on commit 51de5fb

Please sign in to comment.