Coder Social home page Coder Social logo

Comments (4)

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 5, 2024

There is also BuildStatusChecksPublisher.JobScheduledListener.onEnterWaiting, which calls getChecksName with a Job rather than a Run: https://github.com/jenkinsci/checks-api-plugin/blob/4996cf43478acbd1a3043225af2b9d7849c6c174/src/main/java/io/jenkins/plugins/checks/status/BuildStatusChecksPublisher.java#L127-L129

I don't think that will ever be able to get the checks name defined in a pipeline script… but then again, it does not know the SCM settings defined in the pipeline either, so it won't be posting checks with an incorrect name to that SCM.

from github-checks-plugin.

agaudreault avatar agaudreault commented on June 5, 2024

You are right. onEnterWaiting does not matter much in this scenario because the SCM is not present on the job so it won't publish anything. However, after the first checkout step, it will start to publish in onCheckout and onCompleted because checkout will add BuildData. But from there, we have access to the run object, so we could, if present, use information in the Run when scm is not defined.

from github-checks-plugin.

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 5, 2024

What should happen if the pipeline runs multiple checkout steps, with a GitSCMStatusChecksExtension in each? Should it publish IN_PROGRESS to each repository after the corresponding checkout, and then COMPLETED to every repository when the run completes?

from github-checks-plugin.

agaudreault avatar agaudreault commented on June 5, 2024

I think these can be 2 different problems. If the GitSCMChecksContext uses the first build data only, then it should respect the associated GitSCMStatusChecksExtension configuration of this build data. If it has a mechanism to loop through all buildData (from different checkout steps), then it should respect their own configuration and publish the completed check for all of them.

I think the first step would be to be able to get the GitSCMStatusChecksExtension for a specific build data first.

When that is working, sending a check for multiple checkout step could be added. I can easily imagine a use case where there are 2 checkouts, but only the second one is in the right repo and should have the check. The user would need to specify in the first checkout to skip the check.

from github-checks-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.