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

docs: Add --no-fail to custom policy execution in policy-checking.md #4377

Merged
merged 2 commits into from
May 22, 2024

Conversation

ltmleo
Copy link
Contributor

@ltmleo ltmleo commented Mar 21, 2024

As mentioned in #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 #4092, this expected the --no-fail flag.

tests

Documentation changes

references

#4092

@ltmleo ltmleo requested review from a team as code owners March 21, 2024 17:26
@ltmleo ltmleo requested review from chenrui333, lukemassa and nitrocode and removed request for a team March 21, 2024 17:26
@github-actions github-actions bot added the docs Documentation label Mar 21, 2024
@ltmleo ltmleo changed the title Add --no-fail to custom policy execution in policy-checking.md doc doc: Add --no-fail to custom policy execution in policy-checking.md doc Mar 21, 2024
@ltmleo ltmleo changed the title doc: Add --no-fail to custom policy execution in policy-checking.md doc doc: Add --no-fail to custom policy execution in policy-checking.md Mar 21, 2024
@ltmleo ltmleo changed the title doc: Add --no-fail to custom policy execution in policy-checking.md docs: Add --no-fail to custom policy execution in policy-checking.md Mar 21, 2024
@jamengual
Copy link
Contributor

@ltmleo in the docs I do not see a --no-fail option, maybe you are using an old version of contest?

@jamengual jamengual added the waiting-on-review Waiting for a review from a maintainer label Apr 2, 2024
@ltmleo
Copy link
Contributor Author

ltmleo commented Apr 3, 2024

@ltmleo in the docs I do not see a --no-fail option, 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
...

@jamengual
Copy link
Contributor

@ltmleo in the docs I do not see a --no-fail option, 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
...

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

@chenrui333
Copy link
Member

@chenrui333 chenrui333 merged commit 513b57a into runatlantis:main May 22, 2024
23 checks passed
ragne pushed a commit to ragne/atlantis that referenced this pull request May 23, 2024
…unatlantis#4377)

Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants