Simple Jenkins Example Project

51 views
Skip to first unread message

JordanGS

unread,
Apr 11, 2017, 2:03:00 AM4/11/17
to Jenkins Developers
Can someone please point me in the direction of a simple Jenkins Project, either jenkins or groovy UI config files. I'm trying to understand all the little nuances and properly create a plugin. Thanks.

Goran Dev

unread,
Apr 11, 2017, 3:56:28 AM4/11/17
to Jenkins Developers
Jelly or groovy UI I mean, or maybe one simple to understand project for each. Not something too massive.

Cheers, Goran.

On Apr 11, 2017, 2:03 AM -0400, JordanGS <develop...@gmail.com>, wrote:
Can someone please point me in the direction of a simple Jenkins Project, either jenkins or groovy UI config files. I'm trying to understand all the little nuances and properly create a plugin. Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/H8dTH_MWVfw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b6d8eaec-296c-49ff-86c2-e4b864127c3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Apr 11, 2017, 10:58:33 AM4/11/17
to Jenkins Developers
Find one or two plugins you know well from a user perspective, and does not seem too big, then look for it in https://github.com/jenkinsci/ IMO

As for creating a plugin, use the documentation I guess. And we're happy to hear from you on how/where to improve it.

2017-04-11 8:30 GMT+02:00 Goran Dev <develop...@gmail.com>:
Jelly or groovy UI I mean, or maybe one simple to understand project for each. Not something too massive.

Cheers, Goran.

On Apr 11, 2017, 2:03 AM -0400, JordanGS <develop...@gmail.com>, wrote:
Can someone please point me in the direction of a simple Jenkins Project, either jenkins or groovy UI config files. I'm trying to understand all the little nuances and properly create a plugin. Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/H8dTH_MWVfw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.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 jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/bd104fd0-25b9-4639-89b6-9270c8b6ff3c%40Spark.

Daniel Beck

unread,
Apr 11, 2017, 11:07:42 AM4/11/17
to jenkin...@googlegroups.com

> On 11.04.2017, at 08:30, Goran Dev <develop...@gmail.com> wrote:
>
> Jelly or groovy UI I mean, or maybe one simple to understand project for each. Not something too massive.
>

UI Samples Plugin? It's only Jelly, but still should be useful. No hacks around dealing with backwards compatibility etc. you sometimes see in real plugins that give a false impression.

https://github.com/jenkinsci/ui-samples-plugin


JordanGS

unread,
Apr 11, 2017, 11:42:50 AM4/11/17
to Jenkins Developers, m...@batmat.net
@Baptiste Mathus I really don't know, outside of the plugin i am working on, i don't use any Build Plugins. Maybe you can point me in the right direction? I just need some simple that adds a Build Step and that Build step does something but also uses values set in the Admin Configurations.

My plugin is: https://github.com/jenkinsci/zap-plugin

I am trying to trace a serialization error. I'll be more than happy to make a list for how documentation can be improved. I found a few dead links or unfinished tutorials that are being linked as developer guides which makes it rather hard to learn. Thanks for the feedback :)

@Daniel Beck

Those helped me a great deal when i was learning :) The documentation around jelly is somewhat sparse.

Example of my current code.

<f:entry title="${%Title}" field="exportreportTitle">
 
<f:textbox />
</f:entry>

and i want to change this to:

<f:entry>
 
<table width="100%">
   
<tr>
      <td>${%Title}</td>
     
<td><f:textbox field="exportreportTitle"/></td>
   
</tr>
 
</table>
</f:entry>

from my understand of jelly, this should be an acceptable change but it's not. It throws NPE exceptions on unrelated boolean (Not Boolean) values. See this post if interested. So i'm trying to figure out what i'm doing wrong, even if i remove the plugin or rename it, it still breaks. So it doesn't make me believe it's a backwards compatibility issue. I thought maybe it was because i suppressed warnings and errors, so i spent 3 hours fixing all of them and i still can't make this simple change. Thanks for your help, much appreciated.

JordanGS

unread,
Apr 13, 2017, 1:57:01 AM4/13/17
to Jenkins Developers, m...@batmat.net
@Baptiste Mathus

Example: you have basic jelly usage: https://wiki.jenkins-ci.org/display/JENKINS/Basic+guide+to+Jelly+usage+in+Jenkins
and jelly form controls: https://wiki.jenkins-ci.org/display/JENKINS/Jelly+form+controls

and a nice plugin called UI samples. This covers most of the basics but it doesn't really cover what i think most plugins needs.

f:property should be covered somewhere and explained

the simplest and biggest thing that i would LOVE to see. Is how to create an expandable/collapsible checkbox that remembers it's state and it a true/false value can be retrieved for it. I sort of have this working but i had to add inline="true" which makes it so that every time i check the checkbox, the page scrolls to the footer. Personally i don't understand this behavior but i also can't find a simple example. You said to look at plugins I'm familiar with, but most of the well developed plugins are overly complicated for a beginner.

The only other thing is that there are too many half finished tutorials with sections that say todo. I'd write a tutorial but i don't know enough to educate someone else in Jenkins development. What would be great is a dummy plugin that shows off various form controls as part of a build for example, shows you how to use wrappers, reference the variables and such. I'd be more than happy to start one myself if someone more experience could help out with the harder form controls.
Reply all
Reply to author
Forward
0 new messages