Re: Jenkins Pipeline plugin seemingly skipping commands

2016-11-25 Thread jerome
They probably are all executed, just the output is not redirect (yeah IO 
pipe into pipeline are not so funny so far). You can use the redirect stdout

*The good*
println(shell(['returnStdout': true, 'script': "git --version" ]));

*The bad*
This doesn't split std::out and std::cerr either, so you are on your own to 
split and parse the whole thing.

*The ugly*
You cannot return both the return value ('returnStatus': true) and the 
stdout at the same time! So you are totaly out of luck if you need both.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/24433db3-4d0f-445d-bcce-77d50d73aba0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Pipeline plugin seemingly skipping commands

2016-11-25 Thread lionel . pectol
 I have a Jenkins Pipeline plugin  
script that looks like this:

stage("check out project") {
shell "pwd"
echo "test 1"
git credentialsId: "user", url: "http://url/project;
echo "test 2"
shell "git --version"
echo "test 3"
}

The output of the build is then this:

[Pipeline] stage
[Pipeline] { (check out project)
[Pipeline] echo
test 1
[Pipeline] echo
test 2
[Pipeline] echo
test 3
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
Finished: SUCCESS

Judging from the output and from the build time only the echo commands are 
executed. All other commands are ignored. No error seems to occur. 

How can I get all commands to be executed? 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/020959d7-904c-46b0-b47b-9fb4ede652d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.