Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation of repo url for longer urls #18

Merged
merged 10 commits into from
Jul 10, 2022
Merged

Fix generation of repo url for longer urls #18

merged 10 commits into from
Jul 10, 2022

Conversation

joodlehammond
Copy link
Contributor

This PR fixes the issue reported in #16

It will instead grab the version it needs for helm chart publish from the output of helm chart save, and build the required URL for the OCI registry from that.

We've tested this with our own workflow and it now works. Feel free to use our fix, or do it in a cleaner way.

Thanks :)

Copy link

@nwithers-ecr nwithers-ecr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't know if it's rude to review other people's PRs when you're not a maintainer, but this seems to have been ignored and I am also interested in this bug fix.

@@ -11,7 +10,7 @@ Using Token Auth with OCI Registry:
```yaml
steps:
- name: Push Helm chart to OCI compatible registry (Github)
uses: bsord/helm-push@v4
uses: oodlefinance/helm-push@5.0.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you forgot to clean this up after testing.

@@ -5,11 +5,8 @@ ENV XDG_CACHE_HOME=/opt/xdg

RUN apk add curl tar bash --no-cache
RUN set -ex \
&& curl -sSL https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz | tar xz \
&& curl -sSL https://get.helm.sh/helm-v3.8.2-linux-amd64.tar.gz | tar xz \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In helm 3.8, OCI is no longer experimental so the line in entrypoint.sh exporting that envvar can be removed.

&& mv linux-amd64/helm /usr/local/bin/helm \
&& rm -rf linux-amd64
RUN apk add --virtual .helm-build-deps git make \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chart museum plugin is still needed if the user does not want to use OCI and instead wants to push a tar.gz file. version 0.9.0 conflicts with the new helm push command, but 0.10.0 renames it to helm cm-push so there should be no conflict. A simple if statement should suffice in entrypoint.sh

Actually I also think it's worthwhile to add the helm s3 plugin, so that this action would support s3: urls https://github.com/hypnoglow/helm-s3 but that's probably a different issue and PR.

![Build](https://github.com/bsord/helm-push/workflows/Build/badge.svg)
![GitHub last commit](https://img.shields.io/github/last-commit/bsord/helm-push.svg)
![License](https://img.shields.io/github/license/bsord/helm-push.svg?style=flat)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this need to be removed? I imagine PRs are still welcome

![GitHub last commit](https://img.shields.io/github/last-commit/bsord/helm-push.svg)
![License](https://img.shields.io/github/license/bsord/helm-push.svg?style=flat)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)
![Build](https://github.com/oodlefinance/helm-push/workflows/Build/badge.svg)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there's some cleanup needed for usernames

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, I think as I worked on making it work in my org it's carried these over to this PR.

I'll rebase this PR onto a separate branch specific to this repo

@bsord
Copy link
Owner

bsord commented Jun 29, 2022

Thanks folks. Much appreciated. Will test this here shortly and get merged ASAP.

@bsord bsord merged commit f14b6f0 into bsord:master Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants