How to add a jelly/groovy file to a job's page?

18 views
Skip to first unread message

Jean-Karlo Accetta

unread,
Jan 9, 2018, 5:32:24 PM1/9/18
to Jenkins Developers
Hi,

I'm pretty new to developing plugins for Jenkins and can't figure out how to add a script to a job's page (or its builds' summary pages).

I tried creating a script and implementing hudson.tasks.Action and creating a src/main/resources/[package]/Foo/summary.jelly file, but doing that doesn't show anything anywhere.  I tried following the tutorial on https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial#Plugintutorial-CreatingaNewPlugin (and a lot of the related links), but that didn't really help much.  If anyone has a link to more documentation, I'd appreciate that as well.



Any help is much appreciated, or links to tutorials/videos.

Thanks in advance,
   - JK

Ullrich Hafner

unread,
Jan 9, 2018, 5:47:18 PM1/9/18
to Jenkins Developers
In order to show a link on the Job page you need to create a *ProjectAction. 

Do you already show something in a build? This class should implement SimpleBuildstep.LastBuildAction and return the ProjectAction.
 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7ecef2ac-7a7d-4c0b-9c80-291d092e55b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Jean-Karlo Accetta

unread,
Jan 10, 2018, 10:20:53 AM1/10/18
to Jenkins Developers
Thanks Ullrich, this helped a lot!

No, I don't show anything yet but now I have a better idea of how to set it up.  Much appreciated :)
Reply all
Reply to author
Forward
0 new messages