jenkinsci / amazon-inspector-image-scanner-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of configuration with private ecr repository or how make docker credentials

anicksol opened this issue · comments

Describe your use-case which is not covered by existing documentation.

We are trying to configure this plugin with private ECR. What docker credential can we use ? We can generate authentication token using the GetAuthorizationToken API save it to Jenkins User Password Credential with login "AWS" and use it. But those token are temporary and regenerate it every day not possible, When we use Jenkins Amazon ECR plugin with dynamic credentials we get error "DENIED: Your Authorization Token is invalid." Can you suggest what we can do or give configuration example?

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Are you interested in contributing to the documentation?

No response

We're working on this issue currently, for now, its reccomended to run a shell command prior to plugin execution which is similar to:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 763104351884.dkr.ecr.us-east-1.amazonaws.com

This should allow the plugin to access ECR.