Coder Social home page Coder Social logo

Comments (6)

justinmchase avatar justinmchase commented on June 19, 2024 1

I follow your logic, if you think its fine to make it configurable I will try to follow up with a PR. It seems like this should be able to default to the current behavior and would be backwards compatible and would be a pretty reasonable thing to have configurable.

from checks-api-plugin.

XiongKezhi avatar XiongKezhi commented on June 19, 2024 1

Solved by #78 and jenkinsci/github-checks-plugin#124

from checks-api-plugin.

XiongKezhi avatar XiongKezhi commented on June 19, 2024

We marked the UNSTABLE as a failure because some users found that NEUTRAL may shadow the test failures: #11.

In Jenkins, plugins usually treat UNSTABLE as a failure, for example, the JUnit plugin will report UNSTABLE if one of the tests fails, and the Warnings-NG plugin uses UNSTABLE or FAILURE to conclude a build if it fails the quality gate.

It makes sense to make it configurable, you can implement it although it's a little complicated since it involves changes both on this API and the GitHub implementation:

  1. StatusChecksProperties is the extension point for SCM platform implementations to provide the status checks properties, it would retrieve properties from implementations according to the job, current we only provide name and skip-bility.
  2. GitHubStatusChecksProperties implements the above extension point for GitHub. Since we have both Git and GitHub project or SCM which target at GitHub, this class will get the user configurations from the proper GitHubStatusChecksConfigurations according to the SCM.
  3. And finally, GitHubSCMSourceStatusChecksTrait and GitSCMStatusChecksExtension implement GitHubStatusChecksConfigurations and provided configurations for the end users.

So, for this status, maybe define a getStatusMap?

from checks-api-plugin.

agaudreault-jive avatar agaudreault-jive commented on June 19, 2024

Not sure if that can help for your usecase, but we sometime use the UNSTABLE stageResult instead of the buildResult to display unstable behaviour that should not fail the build.

With that, the stage will show in yellow in the UI while the pipeline will still be successful.

catchError(message: "WARNING: The operation failed", buildResult: 'SUCCESS', stageResult: 'UNSTABLE', catchInterruptions: false) {
   // steps that will throw an error, but not fail the build if they do
}

from checks-api-plugin.

tperka-catalogicsoftware avatar tperka-catalogicsoftware commented on June 19, 2024

@XiongKezhi does it still work? I've checked the Publish unstable builds as neutral status checks checkbox but still getting failures in Github. Does even Github have neutral check result? I only see passing, pending and failing in their docs.

from checks-api-plugin.

uhafner avatar uhafner commented on June 19, 2024

See https://docs.github.com/en/rest/checks/runs#create-a-check-run:

conclusion
Required if you provide completed_at or a status of completed. The final conclusion of the check. Note: Providing conclusion will automatically set the status parameter to completed. You cannot change a check run conclusion to stale, only GitHub can set this.
Can be one of: action_required, cancelled, failure, neutral, success, skipped, stale, timed_out

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.