Jenkins build says successful but no output is seen

201 views
Skip to first unread message

Sharan Basappa

unread,
Feb 21, 2017, 1:09:43 PM2/21/17
to Jenkins Users

My Jenkins build job indicates success but none of the scripts I am executing seem to do anything. I put a simple "pwd" command to echo current working directory but nothing happens. All Jenkins reports is "Running shell script" and then nothing is seen.


Snippet of Jenkins log:

First time build. Skipping changelog. [Pipeline] sh [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [Pipeline] sh [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [Pipeline] sh [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [Pipeline] sh [an_example_test3-26UQSYQ445FSBP4QRKEWLPQCJH545MLQVD6B552CIGPOXLZO4G5A] Running shell script [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS


Jenkinsfile that is used to define the builds:

node { stage 'build' sh "echo ${env.BRANCH_NAME}" git url: 'git@hd1:testing', branch: "${env.BRANCH_NAME}" sh "ls -rtl" sh "pwd" sh "csh ${workspace}/simple.csh" sh "csh ${workspace}/source.csh" }



Sharan Basappa

unread,
Feb 22, 2017, 12:36:03 PM2/22/17
to Jenkins Users
folks, need some guidance here ... thanks

David Karr

unread,
Feb 23, 2017, 1:38:36 PM2/23/17
to jenkins...@googlegroups.com
I'm not an expert, but I would change your syntax to "stage ('build')
{ ... }". The parens probably aren't necessary, but the closure syntax
likely is.

Sharan Basappa

unread,
Feb 23, 2017, 9:40:45 PM2/23/17
to jenkins...@googlegroups.com
Hi David,

Is there any other forum where I can get help? I haven't got much inputs on this forum


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/Dj6hRGzzJZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAA5t8VoRVBPFv52GKzNLc7mYGxr_v4ooL20_r_JWeH5ORSALXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Beck

unread,
Feb 24, 2017, 7:09:07 AM2/24/17
to jenkins...@googlegroups.com

> On 21.02.2017, at 19:09, Sharan Basappa <sharan....@gmail.com> wrote:
>
> Snippet of Jenkins log:
>

Is that the minimal Pipeline script exhibiting the problem, i.e. is the git checkout necessary? What happens when you remove everything but the 'sh "pwd"' that doesn't work, does it work then?

Sharan Basappa

unread,
Feb 24, 2017, 10:21:52 PM2/24/17
to Jenkins Users, m...@beckweb.net
David,

I will remove everything and start with just pwd. I will update how it goes.
Maybe it is not related but one thing I changed recently was the native shell. I changed from sh to csh

David Karr

unread,
Feb 25, 2017, 1:00:28 AM2/25/17
to Jenkins Users, m...@beckweb.net

I'll say again, add braces around the body of the entire stage. Stage takes a closure.


--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/76e552ca-3b77-4931-99fc-73651164d6ad%40googlegroups.com.

Daniel Beck

unread,
Feb 25, 2017, 5:30:42 AM2/25/17
to Jenkins Users, Sharan Basappa

> On 25.02.2017, at 04:21, Sharan Basappa <sharan....@gmail.com> wrote:
>
> Maybe it is not related but one thing I changed recently was the native shell. I changed from sh to csh

Should be easy enough to test with a shebang line at the beginning of the `sh` argument.

Daniel Beck

unread,
Feb 25, 2017, 5:30:42 AM2/25/17
to jenkins...@googlegroups.com

> On 25.02.2017, at 06:59, David Karr <davidmic...@gmail.com> wrote:
>
> Stage takes a closure.

Originally they weren't. This was added recently (JENKINS-26107) and while AFAIK deprecated, the old syntax should still work.

Reply all
Reply to author
Forward
0 new messages