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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Jean-Karlo Accetta
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

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

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

Ulli Hafner
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.
 

Am 09.01.2018 um 23:32 schrieb Jean-Karlo Accetta <[hidden email]>:

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

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/55838ECC-F441-463D-ADA9-CBBE54D33DF0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Jean-Karlo Accetta
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 :)

On Tuesday, January 9, 2018 at 5:47:18 PM UTC-5, Ullrich Hafner wrote:
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.
 

Am 09.01.2018 um 23:32 schrieb Jean-Karlo Accetta <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="aW_dBkosAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jeankarl...@...>:

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 <a href="https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial#Plugintutorial-CreatingaNewPlugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FPlugin%2Btutorial%23Plugintutorial-CreatingaNewPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGziXD2MDxm_tJMmDyb_k8fTskS_A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FPlugin%2Btutorial%23Plugintutorial-CreatingaNewPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGziXD2MDxm_tJMmDyb_k8fTskS_A&#39;;return true;">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.


<a href="https://lh3.googleusercontent.com/-JmFs0xe3d0k/WlVCw2KlVVI/AAAAAAAADts/6GtsbI9fILIDn0YLbP9obzK7gl1YQRAyACLcBGAs/s1600/image.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-JmFs0xe3d0k/WlVCw2KlVVI/AAAAAAAADts/6GtsbI9fILIDn0YLbP9obzK7gl1YQRAyACLcBGAs/s1600/image.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-JmFs0xe3d0k/WlVCw2KlVVI/AAAAAAAADts/6GtsbI9fILIDn0YLbP9obzK7gl1YQRAyACLcBGAs/s1600/image.png&#39;;return true;">


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

Thanks in advance,
   - JK

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="aW_dBkosAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/7ecef2ac-7a7d-4c0b-9c80-291d092e55b2%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/7ecef2ac-7a7d-4c0b-9c80-291d092e55b2%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/7ecef2ac-7a7d-4c0b-9c80-291d092e55b2%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/7ecef2ac-7a7d-4c0b-9c80-291d092e55b2%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/16dd1496-0ba6-4921-ab7a-9be8c2968659%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.