Display the result of an Execute Shell

27 views
Skip to first unread message

Peter Marcoen

unread,
May 5, 2015, 11:41:18 AM5/5/15
to jenkins...@googlegroups.com
I have a Jenkins Parameterized job.
This job does 2 things:
  1. Compiles a java program to a jar
  2. Runs this jar through "Execute Shell" with the given parameters
The output of this java program is a single string.
What I would like to accomplish is that if a user runs this job, this return string is displayed to him on screen.

Are there any plugins or default options that can help me achieve this?

Another option would be to pipe the output of this java program to an email command and get the result to the user in this way but I would prefer to just stay in the Jenkins environment.

I hope I make myself clear.

Richard Bywater

unread,
May 5, 2015, 10:25:50 PM5/5/15
to jenkins...@googlegroups.com
I would presume that if you are executing a Java program that outputs a string it should show on the Console for the particular build of the job?

Richard.

--
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/0239169f-5ae6-48c1-b7b4-9f7a8f6cf007%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Marcoen

unread,
May 6, 2015, 2:51:23 AM5/6/15
to jenkins...@googlegroups.com
That is correct Richard, I could go to the console output and there, along with a whole lot of other output, I would see my result.
For me, as a semi-experienced Jenkins user, this is doable, but for my colleagues who have never seen a console output in their life, this is trickier.
Not to mention all the other rubbish that is printed there. So I was looking if there was some other way.

Op woensdag 6 mei 2015 04:25:50 UTC+2 schreef Richard Bywater:

Daniel Beck

unread,
May 6, 2015, 3:22:41 AM5/6/15
to jenkins...@googlegroups.com
These plugins should allow you to search the build log for your tool output, and use it to set the build description, or (in the case of Groovy Postbuild) add a separate section to the main build page:

https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Plugin (System Groovy build step)
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9fc5e732-986a-46c9-99ad-96df769b8f09%40googlegroups.com.

Peter Marcoen

unread,
May 6, 2015, 4:35:05 AM5/6/15
to jenkins...@googlegroups.com, m...@beckweb.net
Thank you Daniel, this was exactly what I was looking for!


Op woensdag 6 mei 2015 09:22:41 UTC+2 schreef Daniel Beck:
Reply all
Reply to author
Forward
0 new messages