I think I figured it out, buildEnvVars is deprecated and no longer being called evidently. buildEnvironment worked. Thanks!
On Mon, Mar 9, 2015 at 1:12 PM, Joel Collins <[email protected]> wrote: > Thanks Oleg. I can create an issue on the github repo for this, but I'm > 99% sure i'm the only one in the world using this plugin. (This was > created by a contractor for our company) > > I can post a sample config (I think?) but since it depends on external > scripts its hard to encapsulate just in a job config xml. > > The logic of the plugin is thus: > > Config: > Parameter 1 Name (Available to Param 2 external script as an environment > variable) > Parameter 1 External Script (script to execute to generate values for > parameter) > Parameter 2 Name > Parameter 2 External Script (updates using AJAX, script executes with the > value of parameter 1 as a env variable) > > So say script1.sh returns "foo" and "bar", that will be in the drop down > for parameter 1. When you select a value, it executes script2.sh with > Value1="foo". So say this script2.sh returns "bar" and "baz", this is what > shows up in the dropdown for Value2. This all works perfectly still. The > problem, is once you select "baz" in script 2, Value2=baz does not show up > in the environment anymore for the build. However, Value1=bar still works. > > > This is my job config file if it helps. not really much to see though. > > <?xml version='1.0' encoding='UTF-8'?> > <project> > <actions/> > <description></description> > <keepDependencies>false</keepDependencies> > <properties> > <hudson.model.ParametersDefinitionProperty> > <parameterDefinitions> > > <com.phase2technology.jenkins.RestrictedStringDynamicParameterDefinition > plugin="[email protected]"> > <name>VALUE1</name> > <description>TEST</description> > <command>/var/lib/jenkins/test/printfoobar.sh</command> > <dynamicName>VALUE2</dynamicName> > > <dynamicCommand>/var/lib/jenkins/test/printbarbaz.sh</dynamicCommand> > > </com.phase2technology.jenkins.RestrictedStringDynamicParameterDefinition> > </parameterDefinitions> > </hudson.model.ParametersDefinitionProperty> > </properties> > <scm class="hudson.scm.NullSCM"/> > <canRoam>true</canRoam> > <disabled>false</disabled> > > <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> > <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> > <triggers/> > <concurrentBuild>false</concurrentBuild> > <builders> > <hudson.tasks.Shell> > <command>env</command> > </hudson.tasks.Shell> > </builders> > <publishers/> > <buildWrappers/> > > > On Mon, Mar 9, 2015 at 12:15 PM, Oleg Nenashev <[email protected]> > wrote: > >> Hello Joel, >> >> I would start from creating an issue in the bugtracker. >> Since you report an issue for the build parameter, it really makes sense >> to provide a configuration of your job. >> Variables injection may behave differently depending on job types and >> build steps. >> >> Best regards, >> Oleg Nenashev >> >> суббота, 7 марта 2015 г., 1:41:14 UTC+3 пользователь Joel Collins написал: >> >>> Let me start off by saying i'm way way over my head here, and apologies >>> if this is the wrong audience for this. >>> >>> >>> We're using jenkins with a custom built plugin, and that plugin recently >>> broke after an upgrade to 1.591 / 1.601 (could have been before that, I >>> hadn't upgraded beforehand in a few months) >>> >>> THe plugin runs a script to get 1 value for a parameter, and based on >>> the result of that script, a second drop down is populated. The plugin in >>> on github, and everything seems to work perfectly, the drop downs work fine >>> and the first environment variable (read by the second script) is set >>> correctly. HOWEVER, when the build is run, only the first environment >>> variable is visible to the build scripts, not the second. >>> >>> I narrowed it down to this method not being executed >>> https://github.com/tekante/restricted-parameter-list/ >>> blob/master/src/main/java/com/phase2technology/jenkins/ >>> RestrictedStringDynamicParameterValue.java#L34 >>> >>> Keeping in mind that I can barely spell java, if anyone has >>> recommendations on where to go from here i'd really appreciate it. >>> >> -- >> 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/K2FPULoM5EQ/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/084e4645-1b05-462a-bdd7-72ed5e343225%40googlegroups.com >> <https://groups.google.com/d/msgid/jenkinsci-dev/084e4645-1b05-462a-bdd7-72ed5e343225%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/CAMCVXrniH1i4m-j980Zt_SWUg312xMu7ok%3Dtm5d03zSkuM7cbg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
