jenkinsci / amazon-inspector-image-scanner-plugin

Apache License 2.0
0 stars 1 forks source link

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

Closed anicksol closed 5 months ago

anicksol commented 5 months ago

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

waltwilo commented 5 months ago

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.