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 9, 2024
1 parent 4b9643f commit e0bdfaf
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\-]+)\.amazonaws\.com(\.cn)?)*'
private_ecr_pattern = 'oci://(?P<registry>\d+\.dkr\.ecr\.(?P<region>[a-z0-9\-]+)\.(?:[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 e0bdfaf

Please sign in to comment.