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

Support diff --detailed-exitcode #31

Closed
jkroepke opened this issue May 21, 2023 · 9 comments · Fixed by #33
Closed

Support diff --detailed-exitcode #31

jkroepke opened this issue May 21, 2023 · 9 comments · Fixed by #33
Assignees

Comments

@jkroepke
Copy link
Contributor

The running helmfile diff --detailed-exitcode expect exit code 2 on a success run.

From github actions point of view, it's not possible to allow specific exit code. If helm diff detect changes, it would exit with exit code 2 and helmfile, too. This would result into an action failure.

Proposed solution:

Catch the exit code 2 from helmfile and return exit code 0 to GitHub actions. The exit code should be stored into an output variable.

Use-Case: Run the deploy step only if there is a diff.

@yxxhero
Copy link
Member

yxxhero commented May 21, 2023

@jkroepke PR is welcome.
@bonddim did you have free time for the issue? thanks so much.

@bonddim
Copy link
Contributor

bonddim commented May 22, 2023

You're very fast with this :)
I thought to add additional input to ignore exit code and not ignore it by default as was added by current PR...

@yxxhero
Copy link
Member

yxxhero commented May 22, 2023

@bonddim PR is welcome.

@yxxhero
Copy link
Member

yxxhero commented May 24, 2023

@bonddim would you have time to take a look at this isuee? thanks so much.

@bonddim
Copy link
Contributor

bonddim commented May 24, 2023

@yxxhero,
Yes, I'll do, but I have no time for this now.

@yxxhero
Copy link
Member

yxxhero commented May 24, 2023

@jkroepke @bonddim ok. thanks for your feedback. it will release a new one when this issue is fixed.

@jkroepke
Copy link
Contributor Author

jkroepke commented May 24, 2023

From my point of view, the issue this fixed and

I thought to add additional input to ignore exit code and not ignore it by default as was added by current PR...

can be handled as separate issue.

The PR only ignore exit code 2, exit code 1 and 3 or higher are still raised as error. Look at hashicorp/setup-terraform#125, they implement the same behavior. I people assume that exit code 2 would not overlap which real errors, otherwise using exit code 2 for detect changes can not be considered as safe.

@bonddim
Copy link
Contributor

bonddim commented May 28, 2023

@yxxhero, @jkroepke is right.
You may close this issue as resolved

@yxxhero
Copy link
Member

yxxhero commented May 28, 2023

@bonddim got it. closed.

@yxxhero yxxhero closed this as completed May 28, 2023
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 a pull request may close this issue.

3 participants