-
Bug
-
Resolution: Unresolved
-
Major
-
None
My pipeline looks like this:
pipeline { agent { docker { image '<id>.dkr.ecr.us-west-2.amazonaws.com/<company>/cicd-debian-worker:v0.0.2' label '<mylabel>' registryUrl 'https://<id>.dkr.ecr.us-west-2.amazonaws.com/' registryCredentialsId 'JENKINS_SLAVE_AWS_ROLE' } } ...
I have also set an AWS credential for which I set the ARN to the role ARN I'm interested in into the global namespace in the credentials store.
When I run my pipeline, it fails with:
ERROR: Could not find credentials matching JENKINS_SLAVE_AWS_ROLE
I'm 100% sure the credential exists with that name.
Just to clarify, does this ID represent the "AWS Credentials" type? If yes, the plugin won't be able to use them. Only "Docker Registry Token" credentials type is supported by the plugin according to the code, all other credentials will be ignored. https://github.com/jenkinsci/docker-commons-plugin/blob/e00c616a847630fccf637e891000813a7b441ceb/src/main/java/org/jenkinsci/plugins/docker/commons/credentials/DockerRegistryEndpoint.java#L184-L186
The error message could be improved for sure. It could indicate the required type/domain at least