Triggering a branch in a MultiBranchProject with custom environment

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

Triggering a branch in a MultiBranchProject with custom environment

Rahul Somasunderam-2
Hi!

My coworker and I are writing a custom BranchSource plugin and there is some extra context I want to pass on to the build. 
We started by looking at the Bitbucket Branch Source plugin and started implementing my own.
When an SCM event occurs, we're able to trigger the build, but I want to attach an EnvironmentContributingAction to it.

What would be the easiest way for a plugin to do that?

Thanks! 
Rahul

--
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/4db5ed08-dd36-409b-8be4-ed8462d63cb3n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Triggering a branch in a MultiBranchProject with custom environment

Jesse Glick-4
Look at `jenkins.branch.BranchNameContributor` as an example. That adds variables for stock metadata `Action`s defined in `scm-api`, but you could do something similar for more specialized metadata.

--
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/CANfRfr0dfdzNN4itWpRnf%2Brxt-H2iBrn58ZJA4jm52_CnK%3DreA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Triggering a branch in a MultiBranchProject with custom environment

Rahul Somasunderam-2
Is there a way to access SCMHeadEvent.getPayload() from EnvironmentContributor ? 
Most of my metadata comes from the payload of the SCMHeadEvent.

On Thu, Jan 14, 2021 at 6:57 PM Jesse Glick <[hidden email]> wrote:
Look at `jenkins.branch.BranchNameContributor` as an example. That adds variables for stock metadata `Action`s defined in `scm-api`, but you could do something similar for more specialized metadata.

--
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/j1pb5tY9KDs/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/CANfRfr0dfdzNN4itWpRnf%2Brxt-H2iBrn58ZJA4jm52_CnK%3DreA%40mail.gmail.com.

--
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/CAE4RbR6qXJHWM1SpJ%3DqtFR0ZAXD%2BnEtUKqtsknpLBdjEqR%3DNhQ%40mail.gmail.com.