Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54646

External jars in shared libraries are always executed on master


    • Similar Issues:


      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.



          sis Simon Schiller created issue -
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Defect [ 7 ]


            • Assignee:
              sis Simon Schiller
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: