atlantis
atlantis copied to clipboard
docs: Add --no-fail to custom policy execution in policy-checking.md
As mentioned in https://github.com/runatlantis/atlantis/issues/4092 When executing something like
workflows:
custom:
policy_check:
steps:
- show
- run: conftest test $SHOWFILE *.tf
The following , not helpful, output are shown:
Policy Check Error unable to unmarshal conftest output
To work properly I needed to add the fields shown below
custom_policy_check: true
workflows:
custom:
policy_check:
steps:
- show
- run: conftest test $SHOWFILE *.tf --no-fail
what
Add --no-fail to custom policy execution.
why
As mentioned in https://github.com/runatlantis/atlantis/issues/4092, this expected the --no-fail flag.
tests
Documentation changes
references
https://github.com/runatlantis/atlantis/issues/4092
@ltmleo in the docs I do not see a --no-fail option, maybe you are using an old version of contest?
@ltmleo in the docs I do not see a
--no-failoption, maybe you are using an old version of contest?
Actually, i'm using the latest version:
conftest --version
Conftest: 0.51.0
OPA: 0.63.0
v0.51.0 Latest @github-actions github-actions released this 3 days ago
I also didn't find it in the documentation, I found it in the help, so I think the documentation is out-to-date.
conftest test -h
...
--no-fail Return an exit code of zero even if a policy fails
...
@ltmleo in the docs I do not see a
--no-failoption, maybe you are using an old version of contest?Actually, i'm using the latest version:
conftest --version Conftest: 0.51.0 OPA: 0.63.0v0.51.0 Latest @github-actions github-actions released this 3 days ago
I also didn't find it in the documentation, I found it in the help, so I think the documentation is out-to-date.
conftest test -h ... --no-fail Return an exit code of zero even if a policy fails ...
I'm a bit apprehensive about adding a suggestion in the docs that only works with the latest version and is not even in the doc site, it could mislead users to use it and might fail for them
relates to
- https://github.com/open-policy-agent/conftest/issues/544