-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
The pattern I'd always intended to use with this (but never got round to implementing) was to add an optional checks publisher to `warnError`. For e.g. running tests you can do:
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 warnError to be checks aware:
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 to be fully responsible for doing the checks itself, so
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?
Originally posted by @mrginglymus in #199 (comment)
Metadata
Metadata
Assignees
Labels
No labels