automated terminal push
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -15,13 +15,19 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Authenticate & Configure') {
|
stage('Authenticate & Configure') {
|
||||||
steps {
|
steps {
|
||||||
// Use AWS Credentials Plugin to pick up your IAM user keys
|
// Use AWS credentials directly with withCredentials
|
||||||
withAWS(credentials: 'jenkins-codeartifact', region: "${AWS_REGION}") {
|
withCredentials([
|
||||||
|
[$class: 'AmazonWebServicesCredentialsBinding',
|
||||||
|
credentialsId: 'jenkins-codeartifact',
|
||||||
|
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
|
||||||
|
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']
|
||||||
|
]) {
|
||||||
script {
|
script {
|
||||||
// Fetch a short-lived CodeArtifact token
|
// Fetch a short-lived CodeArtifact token
|
||||||
env.CODEART_TOKEN = sh(
|
env.CODEART_TOKEN = sh(
|
||||||
script: """
|
script: """
|
||||||
aws codeartifact get-authorization-token \\
|
aws codeartifact get-authorization-token \\
|
||||||
|
--region ${AWS_REGION} \\
|
||||||
--domain ${CODEART_DOMAIN} \\
|
--domain ${CODEART_DOMAIN} \\
|
||||||
--domain-owner ${AWS_ACCOUNT_ID} \\
|
--domain-owner ${AWS_ACCOUNT_ID} \\
|
||||||
--query authorizationToken --output text
|
--query authorizationToken --output text
|
||||||
|
Reference in New Issue
Block a user