Okay, is there anything that I could use as a reference to the code directory instead?
On Wed, Jan 18, 2023 at 3:17 PM 'Xavier Raynaud' via Jenkins Users < [email protected]> wrote: > Hi, > > AFAIK, WORKSPACE is defined per agent, not for a global pipeline. > For instance, if you run a pipeline on two distincts agents, each of them > will have its own WORKSPACE > > > > *Xavier Raynaud* > *Integration & Release Manager • Kalray* > Phone: +33 6 32 19 22 56 > *[email protected] <[email protected]>* • *www.kalrayinc.com* > <https://www.kalrayinc.com> > > [image: Kalray logo] <https://www.kalrayinc.com> > > * Please consider the environment before printing this e-mail.* > This message contains information that may be privileged or confidential > and is the property of Kalray S.A. It is intended only for the person to > whom it is addressed. If you are not the intended recipient, you are not > authorized to print, retain, copy, disseminate, distribute, or use this > message or any part thereof. If you receive this message in error, please > notify the sender immediately and delete all copies of this message. > > > ------------------------------ > *From: *"Jochen Wiedmann" <[email protected]> > *To: *"Jenkins Users" <[email protected]> > *Sent: *Wednesday, January 18, 2023 3:00:00 PM > *Subject: *Shared Library: Converting a complete pipeline to a single > step. > > Hi, > > I have a build job with the following pipeline, which works just fine: > > @Library('isccr-addons')_ > pipeline { > agent any > stages { > stage ('init') { > steps { > isccrExec "${ISCCR_ADDONS_CONFIG}", "${WORKSPACE} > } > } > } > > The "isccrExec" is a step, that's specified in my shared library. > I expect to have quite a lot of these build jobs. So, I am thinking > about moving as much code as possible to the shared library. > I have tried to create a new step "isccrPipeline" with the following > definition: > > pipeline { > agent any > stages { > stage ('init') { > steps { > isccrExec "${ISCCR_ADDONS_CONFIG}", "${WORKSPACE} > } > } > } > > Basically, that's just the same. Now I am trying to use that step with this > new build pipeline: > > @Library('isccr-addons')_ > isccrPipeline "${ISCCR_ADDONS_CONFIG}", "${WORKSPACE} > > Unfortunately, that fails with this error message: > > groovy.lang.MissingPropertyException: No such property: WORKSPACE for > class: groovy.lang.Binding > > Any ideas, what's wrong? > > Thanks, > > Jochen > > -- > 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/09e51da7-e421-44f7-b1c9-d169f9c19fc2n%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/09e51da7-e421-44f7-b1c9-d169f9c19fc2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > 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/655303093.2695969.1674051462757.JavaMail.zimbra%40kalray.eu > <https://groups.google.com/d/msgid/jenkinsci-users/655303093.2695969.1674051462757.JavaMail.zimbra%40kalray.eu?utm_medium=email&utm_source=footer> > . > -- Philosophy is useless, theology is worse. (Industrial Disease, Dire Straits) -- 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/CAF8HOZ%2BAq0Fi67FWjyX141t6k%2BPtfPtLg0Wru%3Dm5%3DAiyqFVMeA%40mail.gmail.com.
