diff --git a/Jenkinsfile b/Jenkinsfile index eb6a9ca..6de2506 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 @@ -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