From dc591a47f98cda7734bfceeccd8c8b70fb1805c8 Mon Sep 17 00:00:00 2001 From: lenape Date: Sun, 29 Jun 2025 15:54:20 +0000 Subject: [PATCH] automated terminal push --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3f48b47..fbea7de 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,13 +15,19 @@ pipeline { } stage('Authenticate & Configure') { steps { - // Use AWS Credentials Plugin to pick up your IAM user keys - withAWS(credentials: 'jenkins-codeartifact', region: "${AWS_REGION}") { + // Use AWS credentials directly with withCredentials + withCredentials([ + [$class: 'AmazonWebServicesCredentialsBinding', + credentialsId: 'jenkins-codeartifact', + accessKeyVariable: 'AWS_ACCESS_KEY_ID', + secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'] + ]) { script { // Fetch a short-lived CodeArtifact token env.CODEART_TOKEN = sh( script: """ aws codeartifact get-authorization-token \\ + --region ${AWS_REGION} \\ --domain ${CODEART_DOMAIN} \\ --domain-owner ${AWS_ACCOUNT_ID} \\ --query authorizationToken --output text