diff --git a/Jenkinsfile b/Jenkinsfile index 749ff95..3f48b47 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,27 +1,24 @@ pipeline { agent any - environment { - // Non‑secret config injected from Jenkins Credentials (Secret Text) + // Non-secret config injected from Jenkins Credentials (Secret Text) AWS_REGION = credentials('AWS_REGION') AWS_ACCOUNT_ID = credentials('AWS_ACCOUNT_ID') CODEART_DOMAIN = credentials('CODEART_DOMAIN') CODEART_REPO = credentials('CODEART_REPO') } - stages { stage('Checkout') { steps { checkout scm } } - stage('Authenticate & Configure') { steps { // Use AWS Credentials Plugin to pick up your IAM user keys withAWS(credentials: 'jenkins-codeartifact', region: "${AWS_REGION}") { script { - // Fetch a short‑lived CodeArtifact token + // Fetch a short-lived CodeArtifact token env.CODEART_TOKEN = sh( script: """ aws codeartifact get-authorization-token \\ @@ -36,37 +33,41 @@ pipeline { pip config set global.index-url \ "https://aws:${CODEART_TOKEN}@${CODEART_DOMAIN}-${AWS_ACCOUNT_ID}.d.codeartifact.${AWS_REGION}.amazonaws.com/pypi/${CODEART_REPO}/simple/" cat > ~/.pypirc <