bsord / helm-push

Push local chart to hosted chart museum repository
MIT License
14 stars 19 forks source link

OCI Registry Support does not work for long URLs/chart names #16

Closed joodlehammond closed 2 years ago

joodlehammond commented 2 years ago

Thanks for your work on this action, it's the first one i've found to allow OCI registries (and therefore... AWS ECR!)

However, you are using this command to extract the full name of the chart reference:

helm chart list | sed '2q;d' | cut -d' ' -f1

Which works for small URLs, but for really long urls/chart names, this won't work. This is because helm cuts off the end of the string you are parsing for when listing the charts

malcom.reynolds@COMPUTER helm-charts % helm chart list
REF                                                                                                           NAME            VERSION DIGEST  SIZE    CREATED   
1234567823910.dkr.ecr.eu-west-1.amazonaws.com/some-cha...    somechart    1.0.0         abcde12 2.5 KiB 4 seconds

This results in the FULLPACKAGEREF value being set to 1234567823910.dkr.ecr.eu-west-1.amazonaws.com/some-cha..., which will fail the following step as the url is not valid:

 helm chart push 1234567823910.dkr.ecr.eu-west-1.amazonaws.com/some-cha...
joodlehammond commented 2 years ago

Example error:

Error: Chart not found: ***.dkr.ecr.eu-west-1.amazonaws.com/some-cha...
bsord commented 2 years ago

Good find and thanks for the PR. Looks good. I would like to test myself today and will get merged.

bsord commented 2 years ago

Merged. New changes are included in release @v4.1.0