-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins version: 2.138.3
We are using a shared library to hold some pipeline logic. Recently, we needed this logic in some other place as well, so we decided to create a Java library with the common code. In the shared library, we are using this library via @Grab (the artifact is hosted on an internal repo).
Now we encountered a weird bug in our pipeline. In our Java library, we are doing some file modification. This works perfectly on master, however does not seem to work when the code is executed on a slave node. We confirmed that the library code is always executed on master (we executed a simple ifconfig command -> always showed IP of the master).
Our pipeline code is structured like this:
...
foo() // Executed on master
node ('node-name') {
bar() // Executed on node
libraryCall() // Executed on master
baz() // Executed on node
}
...
This is obviously very problematic and we did not find a solution for this kind of behaviour.