-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Exit Code Control, and Output Format Options #482
Comments
Hi @AErmie, well One solution could be setting the exit code to the score if the score if not 0 or 1. There's no way at the moment to specify any particular format, but the |
Thanks @konstruktoid, I didn't see a way to reference the score result output though (I may have missed it). Any suggestions/guidance? |
|
Thanks, @konstruktoid, but according to this issue, the logging feature is broken. So, I can't actually obtain the log file(s) to parse it (and react to the score). |
Yes, the public image is broken in all sorts of ways, including the logging feature (#405). I recommend you build your own image. |
Thanks, @konstruktoid , but maybe I'm not following. How would building my own image (following the instructions listed here), make any difference? Wouldn't the logging output functionality still be broken? |
Because the code in the official Docker image is deprecated, so building your own image ensures that the script is up-to-date. |
Thanks, @konstruktoid, I got the local clone/build of DockerBench working! However, one thing appears to be different... If I am using the Run with Docker steps, where it pulls the (broken) Docker Hub image, etc., I am able to include the
But, when I follow the self-build option (to produce a working image), it does not allow the use of the
Am I missing something? Is the |
The |
LOL thanks @konstruktoid, not sure how I missed that! |
Closing due to inactivity. |
I'd like to revisit the discussion on exiting with a non-zero code when warnings are present, especially in CI environments. Considering the importance of immediately identifying issues for prompt action, an exit code reflective of the presence of warnings could significantly enhance the utility of Docker-Bench in CI pipelines. Could we consider reopening this issue to further explore potential implementations or alternatives that could support this functionality? |
@PeterDaveHello reopened :) |
Hey all, this is part question and part suggestion.
When running Docker-Bench as part of a CI (in particular, running it from the Docker container method), shouldn't the execution exit with a non-zero code if there are any 'notes' or at least 'warnings'?
Additionally, I would like to be able to control the exit (ie. only exit 1 if there are warnings, for example). Either this, or being able to control a "pass" or "fail" as part of CI if the returned score is +/- a certain value.
Further, is there a way to include output options in specific formats (ie. JUnit, XML, SARIF, etc.), so that it is more easily consumed by CI/CD tools?
The text was updated successfully, but these errors were encountered: