If I understand correctly, this code https://github.com/jenkinsci/github-autostatus-plugin/blob/daf4bf1a0553f91bb0b4deaee32905f077f050ec/src/main/java/org/jenkinsci/plugins/githubautostatus/BuildStatusJobListener.java#L83-L94 Is what you want – it puts all the parameters passed to a job into a map. It’s a different than what I wrote earlier, I was referencing broken code.
Best Jeff From: 'Jordan Vogel' via Jenkins Developers <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Thursday, June 6, 2019 at 7:53 AM To: Jenkins Developers <[email protected]> Subject: Re: Accessing parameter values form a different plugin Notice: This email is from an external sender. I'll try and give you some more specifics. Basically I am trying to access a parameter the jobs are passed when they are triggered by scripts. So the url for the POST request is my-dns.net/MyJobName/buildWithParameter ?parameterName=Value. I want to be able to access that value from a plugin. For example I would like to access that value within in the Perforce plugin so I can have some custom sync behaviors for changelists. The thing I am struggling with is I don't know where/how to access that parameter from a different plugin. Thanks On Thursday, 6 June 2019 06:22:51 UTC-6, Jesse Glick wrote: On Wed, Jun 5, 2019 at 1:12 PM Jeff Pearce <[email protected]<javascript:>> wrote: > Assuming you have the current build project, It might be included in > build.getParent().getProperties() > https://javadoc.jenkins.io/hudson/model/Job.html#getProperties-- No, `Job.properties` is unrelated. From: 'Jordan Vogel' via Jenkins Developers <[email protected]<javascript:>> > I have tried System.getEnv(EnvVar), and System.getProperty(EnvVar) both to no > avail No, these are things set on the Jenkins JVM, nothing to do with build variables. You want to get access to an `EnvVars` object. Depending on what exactly you are doing, this might be passed in as a parameter to a method you implement, etc. Your original description > have some settings changes is too vague to help with, I am afraid. -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4255741c-9afc-493c-ae71-8e26c362ac2a%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-dev/4255741c-9afc-493c-ae71-8e26c362ac2a%40googlegroups.com?utm_medium=email&utm_source=footer>. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2E55F84B-EE2A-4CF5-9CE9-7E151F85626F%40godaddy.com. For more options, visit https://groups.google.com/d/optout.
