The things you "can" get from the returned object (c) from a pipeline statement like: c = build job: "test job1" are here:
https://github.com/jenkinsci/workflow-support-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java you might be able to do something with the non-whitelisted getRawBuild method. Otherwise, to get that job's env variables you must do something "like" this: (untested) Jenkins.instance.getItemByFullName("test job1").getAllJobs()[0].getLastSuccessfulBuild().getEnv("uuid") On Tue, Jun 27, 2017 at 9:21 PM, <[email protected]> wrote: > Hello, all > > I am trying to trigger a freestyle job in pipeline and need to get a > inject environment from that job. > Before with flow job, we can use thing like > > c = build("test job1") > uuid = c.build.properties["environment"]["uuid"] > > But I didn't find a way to do this similar in pipeline script. > > Is there any hint on it? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" 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-users/fa73e7a7-ea85-4eee-8f8e-037689bff630%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/fa73e7a7-ea85-4eee-8f8e-037689bff630%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Dick Ginga Build Engineer [email protected] -- You received this message because you are subscribed to the Google Groups "Jenkins Users" 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-users/CAL3PpaVGzRL2j_rNYAhAsSPxw2F8gpotuLhpZiA3DOjkYXgDUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
