-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Question] Hanging checks with "withChecks()" #199
Comments
That was discussed in #49 (comment). |
Thanks @KalleOlaviNiemitalo ! That explains it. Though this should be documented properly I think. |
The pattern I'd always intended to use with this (but never got round to implementing) was to add an optional checks publisher to withChecks('My Tests') {
sh 'run_tests > results.xml'
junit 'results.xml'
} and that works fine; sometimes you have a one-shot command where you just want to report success or failure. It would be nice to extend withChecks('One Shot') {
warnError('One Shot') {
sh 'one_shot'
}
} ie, have warnError report the appropriate success/failure message to the active checks context. Alternatively get warnError(message: 'One Shot', publishChecks: true) {
sh 'one_shot'
} Not sure why I never got round to doing it, but happy to take another look if people think it might be a useful pattern? |
created #200 to track enhancement |
Semi related pull request which helps in some cases: #254 |
Hi,
I'm using Checks API plugin along with Github Checks API. According to the document, I wrote this code in my pipeline script:
The check is successfully published, but, as described above, I'll have to manually complete a check in my steps.
It seems the code didn't publish any checks in
onSuccess
on purpose.I googled a lot for the usage of
withChecks
, no mention of this behavior. And examples on Github simply wrap normal steps without the manual complete.I'm new to this, my usage could be wrong. Could someone help me with the correct usage of
witchChecks
? Appreciated!The text was updated successfully, but these errors were encountered: