Skip to content

feat: Dedicated exit code (2) on there's diff #78

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

Merged

Conversation

mumoshu
Copy link
Collaborator

@mumoshu mumoshu commented Jul 25, 2018

This feature is enabled only when the --detailed-exitcode flag (#65) is provided.
Supports upgrade, revision and rollback sub-commands.

Resolves #54, but only after helm/helm#4367 is released with helm v2.11.0, probably.

@mumoshu mumoshu force-pushed the dedicated-exitcode-when-theres-diff branch from 78fbf73 to 516360d Compare July 25, 2018 06:37
This feature is enabled only when the `--detailed-exitcode` flag (databus23#65) is provided.
Supports `upgrade`, `revision` and `rollback` sub-commands.

Resolves databus23#54, but only after helm/helm#4367 is released with helm v2.11.0, probably.
@mumoshu mumoshu force-pushed the dedicated-exitcode-when-theres-diff branch from 516360d to 49155f3 Compare July 25, 2018 06:38
@mumoshu
Copy link
Collaborator Author

mumoshu commented Jul 25, 2018

Merging this to start gathering more feedbacks on #54

@mumoshu mumoshu merged commit 05029fe into databus23:master Jul 25, 2018
@mumoshu mumoshu deleted the dedicated-exitcode-when-theres-diff branch July 25, 2018 06:40
@mumoshu mumoshu mentioned this pull request Jul 25, 2018
mumoshu added a commit to mumoshu/helmfile that referenced this pull request Jul 25, 2018
Adds the `--detailed-exitcode` to the `helmfile diff` command to return `1` on failure, and `2` when no error but diff is seen.

This feature requires the latest `helm-diff` containing databus23/helm-diff#78, and `helm` containing helm/helm#4367.

This is verified to work by manually running commands like the followings:

```bash
./helmfile --helm-binary helm211dev -f ./examples/helmfile.d diff --detailed-exitcode; echo $?
./helmfile --helm-binary helm211dev -f ./examples/helmfile.d diff; echo $?
```

Note that, in above example commands, `helm211dev` is a custom `helm` binary that is built from helm's master branch containing [the necessary enhancement to allow propagate non-zero plugin exit code](helm/helm#4367).
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.

1 participant