Skip to content

Commit

Permalink
Fix the regex to match image in koparse
Browse files Browse the repository at this point in the history
The regex to parse images does not include '/' after the base
registry. We should not require passing the registry with a
trailing '/', so adding it in the regex instead.

Signed-off-by: Andrea Frittoli <[email protected]>
  • Loading branch information
afrittoli committed Oct 22, 2020
1 parent 7e376a0 commit b050bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tekton/koparse/koparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def parse_release(base: str, path: str) -> List[str]:
list of the images parsed from the file
"""
images = []
pattern = re.compile(base + r"[0-9a-z\-]+" + DIGEST_MARKER + r":[0-9a-f]*")
pattern = re.compile(base + r"/[0-9a-z\-]+" + DIGEST_MARKER + r":[0-9a-f]+")
with open(path) as f:
for line in f:
found = re.findall(pattern, line)
Expand Down

0 comments on commit b050bd8

Please sign in to comment.