Plugin question: how to access scm info from a GraphListener

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin question: how to access scm info from a GraphListener

jxpearce
We have some shared library code that calls github hooks to provide detailed status about which stages in our pipelines have completed on our PR pages. 

In Groovy, we can get the hook by calling workflow.scm.getUserRemoteConfigs()[0].getUrl())

I'm looking at writing a plugin that does the same thing to simplify our pipeline code, and it seems like GraphListener is the right extension.
I have a plugin that can figure out when stages start and stop, however I can't figure out how to get access to the scm config to get the right URL to call.
Can someone point me in the right direction? I don't know whether I need to implement another extension or whether it's available somehow from the FlowNode.

Thanks
Jeff

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d73f9b56-efba-437a-b9b4-552243deb226%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin question: how to access scm info from a GraphListener

Jesse Glick-4
You can look up `SCMRevisionAction` on the `Run`, if you are
interested in the `scm` of a multibranch project.

Also cf. JENKINS-46170.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2xQqbGagCW%3D%2BmiEyVkG6ujbMT5cMxfhHV43uypvM9N_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Plugin question: how to access scm info from a GraphListener

jxpearce
Thanks Jesse.

That’s exactly what I was looking for.

Jeff

On 9/29/17, 1:56 PM, "[hidden email] on behalf of Jesse Glick" <[hidden email] on behalf of [hidden email]> wrote:

    You can look up `SCMRevisionAction` on the `Run`, if you are
    interested in the `scm` of a multibranch project.
   
    Also cf. JENKINS-46170.
   
    --
    You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/qsyoPXSLD5k/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to [hidden email].
    To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2xQqbGagCW%3D%2BmiEyVkG6ujbMT5cMxfhHV43uypvM9N_g%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
   

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/B70CB3BE-2208-4378-A21C-C6F94AF204F5%40godaddy.com.
For more options, visit https://groups.google.com/d/optout.