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

Add an option to skip the already exists error #90

Open
alexandrevilain opened this issue Dec 1, 2020 · 3 comments · May be fixed by #91
Open

Add an option to skip the already exists error #90

alexandrevilain opened this issue Dec 1, 2020 · 3 comments · May be fixed by #91

Comments

@alexandrevilain
Copy link

Hi!

I'm using helm push on my CI/CD pipeline and I found that an option is missing for a simple use-case.

On a chart monorepo, think about a CI/CD pipeline that tries to push each chart to a chartmuseum to ensure that all charts are uploaded.

For instance, something like:

for d in ./charts/* ; do
    helm push $d chartmuseum
done

You don't want to use the --force flag, to prevent unversioned changes to be pushed on the chartmuseum but you don't want to see your pipeline fail each time it tries to push an already existing chart version.

Using helm-push v0.9.0 you get the following error:

$ helm push mychart/ chartmuseum
Pushing mychart-0.1.0.tgz to chartmuseum...
Error: 409: mychart-0.1.0.tgz already exists
Usage:
  helm push [flags]
[...]

And we get an exit code != 0.

I think we can add a flag to make helm-push ignore this error.

I will create a PR to fix this issue, let's discuss about it :)

@karuppiah7890
Copy link
Contributor

@alexandrevilain Thanks! I was having the same use case but we handled it in the bash script but yeah, I think the tool can help with this :)

@BryanStenson-okta
Copy link
Contributor

I'd love to see this too....or, a richer exit code. (0 - no error, 1 - already exists, 127 - actual error)

@nilampatel-engineer
Copy link

@alexandrevilain Thanks! I was having the same use case but we handled it in the bash script but yeah, I think the tool can help with this :)

could you share the bash script you have used please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants