[JIRA] (JENKINS-58572) sh with returnStdout does not work in external library

0 views
Skip to first unread message

jordan.fredj@bioserenity.com (JIRA)

unread,
Jul 19, 2019, 9:29:02 AM7/19/19
to jenkinsc...@googlegroups.com
JO JO created an issue
 
Jenkins / Bug JENKINS-58572
sh with returnStdout does not work in external library
Issue Type: Bug Bug
Assignee: Gregory Boissinot
Components: shared-objects-plugin
Created: 2019-07-19 13:28
Priority: Minor Minor
Reporter: JO JO

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 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jordan.fredj@bioserenity.com (JIRA)

unread,
Jul 19, 2019, 9:30:03 AM7/19/19
to jenkinsc...@googlegroups.com
JO JO updated an issue
Change By: JO JO
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 

 

jordan.fredj@bioserenity.com (JIRA)

unread,
Jul 19, 2019, 9:49:03 AM7/19/19
to jenkinsc...@googlegroups.com
JO JO updated an issue
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 

 

jordan.fredj@bioserenity.com (JIRA)

unread,
Jul 19, 2019, 9:50:02 AM7/19/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages