Last active
May 21, 2020 11:40
-
-
Save guilhermef/d7e5e4ac49c38def176f52dd66b2f658 to your computer and use it in GitHub Desktop.
Jenkinsfile using ECR cross account agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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