-
Notifications
You must be signed in to change notification settings - Fork 54
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
Nomad-pack plan has an exit code of 1 #224
Comments
This is consistent with Nomad Job Plan in that the plan command returns a 1 error code in cases where an allocation will be created. A zero is only returned in cases where the plan doesn't result in any changes. A workaround would be to wrap the call to nomad-pack plan in a shell script to consume exit code 1 and make it a 0, since you consider that a successful case. However, I can certainly see how this is not desirable in a CI pathway where you would be expecting allocations to be created. If the plan command provided flags or env vars to let you set the exit codes for the three states that Plan uses exit code to signal, would that resolve your issue? There is a long term plan for a pack configuration file, which would reduce the number of flags and variables, but that feature is not near-term. |
I don't see an issue if plan uses an other exit code then 0 if something changes, this is quite useful to detect changes. But we should think about using a code other then 1. Probably worth thinking is to make it configurable e.g. |
Successful nomad-pack plan returns an exit code of 1. This issue was discovered when using a CI/CD pipeline within GitHub actions, although a
continue-on-error: true
prevents the pipeline from failing it is not a viable long term solution.The text was updated successfully, but these errors were encountered: