The shared library files in jenkins are loaded at the beginning of the job, where does it get stored? I am trying to access the dockerfile stored in the shared library, I need the path to give in the docker build command. Is there a way I can find out the place where the shared library files are loaded in jenkins?
If the shared library is loaded from SCM and your workspace path is jenkins/workspaces/jobName
, then a copy is checked out to jenkins/workspaces/jobName@libs
or similar (might be suffixed with a number if that path is occupied by another concurrent build).
However, there is another way, if I understand you correctly you wan't to retrieve a resource in this library? In that case you should use the libraryResource
and writeFile
steps. Like this:
writeFile file:'myFile.txt', text:libraryResource("path/to/myFile.txt")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With