aws / aws/aws-toolkit-azure-devops

ECRPushImage task should allow to set tag-immutability & lifecycle policy for the repository

Open
#485 2 comments 2 reactions 0 assignees View on GitHub
feature-request
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Hello Team,

I am pushing a docker image to the AWS ECR repository using the Azure DevOps pipeline with the help of the below task “ECRPushImage@1”.

- task: ECRPushImage@1
inputs:
awsCredentials: 'AWS_SERVICE_ACC'
regionName: 'us-east-1'
imageSource: 'imagename'
sourceImageName: '${{parameters.image_name}}'
sourceImageTag: '$(project_version)'
repositoryName: '${{parameters.image_name}}'
pushTag: '$(project_version)'
autoCreateRepository: true
forceDockerNamingConventions: false
logRequest: true
logResponse: true
It does create the ECR repository if it does not exist.
I want to enable ‘tag-immutability’ also for this repository so that tags can not be overwritten. &
I want to apply the lifecycle policy for this created repository also.
Is there any way to add these two options in this task ECRPushImage

**Describe the solution you'd like**

I want options in this task for tag-immutability & lifecycle policy text.

**Describe alternatives you've considered**

I can not use this task so I had to go through the rout of the AWS CNF template

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start at the ECRPushImage@1 task and its autoCreateRepository path. Trace how repository creation is configured, then determine how tag immutability and lifecycle policy text should be exposed as task inputs and applied to newly created repositories; done means both options work when creating an ECR repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.