Skip to content

Commit

Permalink
update ecr private repo url regex
Browse files Browse the repository at this point in the history
  • Loading branch information
natekruse-aws committed Sep 10, 2024
1 parent e0bdfaf commit 8b64562
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def helm_handler(event, context):

def get_oci_cmd(repository, version):
# Generates OCI command based on pattern. Public ECR vs Private ECR are treated differently.
private_ecr_pattern = 'oci://(?P<registry>\d+\.dkr\.ecr\.(?P<region>[a-z0-9\-]+)\.(?:[a-z0-9\-\.]+))'
private_ecr_pattern = 'oci://(?P<registry>\d+\.dkr\.ecr\.(?P<region>[a-z0-9\-]+)\.(?P<domain>[a-z0-9\.-]+))*'
public_ecr_pattern = 'oci://(?P<registry>public\.ecr\.aws)*'

private_registry = re.match(private_ecr_pattern, repository).groupdict()
Expand Down

0 comments on commit 8b64562

Please sign in to comment.