Coder Social home page Coder Social logo

Comments (5)

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on September 20, 2024 1

That was discussed in #49 (comment).

from checks-api-plugin.

mrginglymus avatar mrginglymus commented on September 20, 2024 1

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?

from checks-api-plugin.

noru avatar noru commented on September 20, 2024

Thanks @KalleOlaviNiemitalo ! That explains it.

Though this should be documented properly I think.

from checks-api-plugin.

timja avatar timja commented on September 20, 2024

created #200 to track enhancement

from checks-api-plugin.

timja avatar timja commented on September 20, 2024

Semi related pull request which helps in some cases: #254

from checks-api-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.