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

sh with returnStdout does not work in external library

XMLWordPrintable

      Hello,

      I need to get sh return from an external library inside my pipeline.

      The code I execute in my shared library is the following : 

      def pomLocations = steps.sh(script: "find . -name pom.xml", returnStdout: true)
      

      Problem

      **After that I do 

      steps.sh 'echo "${TMPPackageLocation}"'
      

      But result is empty

      Note: `steps.sh(script: "find . -name pom.xml")` does work and result is not empty

      Thanks a lot in advance,

      JF 

       

            gbois Gregory Boissinot
            jojofreeeeeee JO JO
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: