Skip to content

Instantly share code, notes, and snippets.

@guilhermef
Last active May 21, 2020 11:40
Show Gist options
  • Save guilhermef/d7e5e4ac49c38def176f52dd66b2f658 to your computer and use it in GitHub Desktop.
Save guilhermef/d7e5e4ac49c38def176f52dd66b2f658 to your computer and use it in GitHub Desktop.
Jenkinsfile using ECR cross account agent
pipeline {
agent {
docker {
image '<other-account-id>.dkr.ecr.eu-west-1.amazonaws.com/image/my-image:v1'
args '--entrypoint= '
registryCredentialsId "ecr:eu-west-1:aws-instance-role"
registryUrl "https://<other-account-id>.dkr.ecr.eu-west-1.amazonaws.com"
}
}
stages {
stage('Test') {
steps {
sh "I'm on an ECR agent"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment