Adding Javascript to config.groovy

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

Adding Javascript to config.groovy

Parichay Barpanda
Hi,

I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with <script> tags. Is it possible to write JS in groovy?

Thanks and Regards,
Parichay

--
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/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Adding Javascript to config.groovy

Gavin Mogan
Whats a config.groovy compared to config.jelly? Are you writing a plugin using groovy?

On Thu, May 21, 2020 at 12:54 PM Parichay Barpanda <[hidden email]> wrote:
Hi,

I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with <script> tags. Is it possible to write JS in groovy?

Thanks and Regards,
Parichay

--
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/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com.

--
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/CAG%3D_DuvEw-Lm1BqTsep-f%3DezAVWnJuyA1oVs62OksgozHM0R_w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Adding Javascript to config.groovy

Parichay Barpanda
Yes. See https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/master/src/main/resources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServer/config.groovy

On Friday, May 22, 2020 at 1:26:09 AM UTC+5:30, Gavin Mogan wrote:
Whats a config.groovy compared to config.jelly? Are you writing a plugin using groovy?

On Thu, May 21, 2020 at 12:54 PM Parichay Barpanda <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="f7Mz6Qa-AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">parichay...@...> wrote:
Hi,

I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with <script> tags. Is it possible to write JS in groovy?

Thanks and Regards,
Parichay

--
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="f7Mz6Qa-AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/11d2e5ed-89ce-4727-96f8-e0e62ef35576%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/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com.

--
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/e4d2b0b7-dc5d-4ee3-b449-7bb90b5f73dd%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Adding Javascript to config.groovy

Gavin Mogan
Oh wow, I didn't know that was a thing.

Apparently you can use raw()


My grepping didn't turn up any other options. I'd be concerned that raw() isn't doing any xss escaping though, so someone else will have to speak to that.

On Thu, May 21, 2020 at 1:07 PM Parichay Barpanda <[hidden email]> wrote:
Yes. See https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/master/src/main/resources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServer/config.groovy

On Friday, May 22, 2020 at 1:26:09 AM UTC+5:30, Gavin Mogan wrote:
Whats a config.groovy compared to config.jelly? Are you writing a plugin using groovy?

On Thu, May 21, 2020 at 12:54 PM Parichay Barpanda <[hidden email]> wrote:
Hi,

I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with <script> tags. Is it possible to write JS in groovy?

Thanks and Regards,
Parichay

--
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/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com.

--
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/e4d2b0b7-dc5d-4ee3-b449-7bb90b5f73dd%40googlegroups.com.

--
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/CAG%3D_DuumyANSTw7gfmV5K9GHifOTdGMEMabyhxk7mOPDX6CS6A%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Adding Javascript to config.groovy

Parichay Barpanda
Thanks. I first saw groovy style config in GitHub Plugin and feel it more convenient over jelly because lack of IDE support make tags unreadable.

On Fri, May 22, 2020 at 1:54 AM 'Gavin Mogan' via Jenkins Developers <[hidden email]> wrote:
Oh wow, I didn't know that was a thing.

Apparently you can use raw()


My grepping didn't turn up any other options. I'd be concerned that raw() isn't doing any xss escaping though, so someone else will have to speak to that.

On Thu, May 21, 2020 at 1:07 PM Parichay Barpanda <[hidden email]> wrote:
Yes. See https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/master/src/main/resources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServer/config.groovy

On Friday, May 22, 2020 at 1:26:09 AM UTC+5:30, Gavin Mogan wrote:
Whats a config.groovy compared to config.jelly? Are you writing a plugin using groovy?

On Thu, May 21, 2020 at 12:54 PM Parichay Barpanda <[hidden email]> wrote:
Hi,

I am looking for a way to add Javascript to config.groovy files in my resources. It is possible to do so in jelly with <script> tags. Is it possible to write JS in groovy?

Thanks and Regards,
Parichay

--
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/11d2e5ed-89ce-4727-96f8-e0e62ef35576%40googlegroups.com.

--
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/e4d2b0b7-dc5d-4ee3-b449-7bb90b5f73dd%40googlegroups.com.

--
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/CAG%3D_DuumyANSTw7gfmV5K9GHifOTdGMEMabyhxk7mOPDX6CS6A%40mail.gmail.com.

--
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/CAD0DWANFnS91D6O%2Bw8evDSuhUDOCnPKxD7iFWqP2Ktre-wi96A%40mail.gmail.com.