You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Activity
yxxhero commentedon May 21, 2023
@jkroepke PR is welcome.
@bonddim did you have free time for the issue? thanks so much.
bonddim commentedon 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 commentedon May 22, 2023
@bonddim PR is welcome.
yxxhero commentedon May 24, 2023
@bonddim would you have time to take a look at this isuee? thanks so much.
bonddim commentedon May 24, 2023
@yxxhero,
Yes, I'll do, but I have no time for this now.
yxxhero commentedon May 24, 2023
@jkroepke @bonddim ok. thanks for your feedback. it will release a new one when this issue is fixed.
jkroepke commentedon May 24, 2023
From my point of view, the issue this fixed and
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 commentedon May 28, 2023
@yxxhero, @jkroepke is right.
You may close this issue as resolved
yxxhero commentedon May 28, 2023
@bonddim got it. closed.