how to use GraphListener.Synchronous in a Jenkins scripted pipeline

3 zobrazenia
Preskočiť na prvú neprečítanú správu

monger_39

neprečítané,
30. 8. 2019, 8:29:1430. 8. 2019
komu: jenkins...@googlegroups.com
Hi,
I have a Jenkins scripted pipeline having quite a lot of parallel stages and steps.
I am looking for a way to find the link to the exact location of the workspace directory
that is created for every stage, within the pipeline code itself.
I know that there is some (seemingly random) ID as part of the link.


Here the 47 is my buildnr, the 20 is the magic ID. This ID apparently changes when the
script is modified, or when the job is scheduled somewhat differently.

As discussed under JENKINS-26138 (https://issues.jenkins-ci.org/browse/JENKINS-26138), there
no standard way to get this ID within the pipeline stages of the job.

From a response at

I gather that it would be possible to get the ID using the mentioned GraphListener.

But after experimenting a lot with that, it does not seem like my listener is receiving any events.
I have not been able to find any example of actually using the listener within a Jenkinsfile, and
accessing the data of an event.

Does anyone have some code to share ?

thx Monger39



Odpovedať všetkým
Odpovedať autorovi
Poslať ďalej
0 nových správ