-
Bug
-
Resolution: Unresolved
-
Minor
-
None
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
[JENKINS-58572] sh with returnStdout does not work in external library
Description |
Original:
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", returnStdout: true)` does work and result is not empty Thanks a lot in advance, JF |
New:
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 : {code:java} def pomLocations = steps.sh(script: "find . -name pom.xml", returnStdout: true) {code} +*Problem*+ **After that I do {code:java} steps.sh 'echo "${TMPPackageLocation}"' {code} But result is empty *Note:* `steps.sh(script: "find . -name pom.xml", returnStdout: true)` does work and result is not empty Thanks a lot in advance, JF |
Description |
Original:
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 : {code:java} def pomLocations = steps.sh(script: "find . -name pom.xml", returnStdout: true) {code} +*Problem*+ **After that I do {code:java} steps.sh 'echo "${TMPPackageLocation}"' {code} But result is empty *Note:* `steps.sh(script: "find . -name pom.xml", returnStdout: true)` does work and result is not empty Thanks a lot in advance, JF |
New:
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 : {code:java} def pomLocations = steps.sh(script: "find . -name pom.xml", returnStdout: true) {code} +*Problem*+ **After that I do {code:java} steps.sh 'echo "${TMPPackageLocation}"' {code} 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 |
May be linked to https://issues.jenkins-ci.org/browse/JENKINS-56384?page=com.atlassian.streams.streams-jira-plugin%3Aactivity-stream-issue-tab