Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECR: Add ability to set tag mutability on repo creation #464

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dvan-sqsp
Copy link

Hi!

We have a use-case where we want to force our ECR repos to have tag mutability set to IMMUTABLE. Since we have repo's with create_repository set to true, we only want to modify ones that are managed by the drone plugin.

AWS ECR tag mutability is a string of MUTABLE or IMMUTABLE. To simplify usage, I decided to go with a boolean to avoid typos on the plugin usage side. By default, tag_immutable is false, thus keeping existing behavior. Depending on the boolean, the code will use the provided SDK constants for MUTABLE and IMMUTABLE

usage example:

steps:
  - name: push-image
    image: plugins/ecr
    settings:
      ...
      create_repository: true
      tag_immutable: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant