creating github-organization-folder jobs from job-dsl

649 views
Skip to first unread message

Joshua Hoblitt

unread,
Feb 1, 2017, 5:46:59 PM2/1/17
to job-dsl-plugin
I have migrated completed away from managing jobs as config.xml dumps (other than an initial seed job) to job-dsl.  This has worked well within my org but I'm now trying to figure out how to deal with github-organization-folder.  I'm fairly sure that there is no explicit support for this job type in core job-dsl.  Is it possible to do something like this https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block#configure-matrix-job in order to create an organization folder or is that a bridge too far for a configure block?  If not, does anyone know of a successful example of this?  There was a hint of this on the user list but no code was posted.

Thanks,

-Josh

--

Ian Duffy

unread,
Feb 1, 2017, 5:50:40 PM2/1/17
to job-dsl...@googlegroups.com
Hey Joshua,


I use a slightly modified version for github: https://gist.github.com/imduffy15/4f073f6829c563f102bc774eb18d3ed3

Hope this helps.

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/d5492975-6c35-4cc1-81b2-0ebbc76602cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Hoblitt

unread,
Feb 1, 2017, 6:32:13 PM2/1/17
to job-dsl...@googlegroups.com
Hi Ian,

That is pretty slick. I never would have imagined you could create a
groovy shell inside the sandbox -- my head blew up.

A draw back I see is that there is no "rescan" button for users to hit
after creating a new repo. It would be nice to be able to use an org
hook and trigger on repo creation but perhaps that would be easier
external to jenkins?

-Josh

--
On 02/01/2017 03:50 PM, Ian Duffy wrote:
> Hey Joshua,
>
> Checkout https://gist.github.com/stuartstevenson/6a73fb70639486c01341
>
> I use a slightly modified version for
> github: https://gist.github.com/imduffy15/4f073f6829c563f102bc774eb18d3ed3
>
> Hope this helps.
>
> On 1 February 2017 at 22:46, Joshua Hoblitt <jo...@hoblitt.com
> <mailto:jo...@hoblitt.com>> wrote:
>
> I have migrated completed away from managing jobs as config.xml
> dumps (other than an initial seed job) to job-dsl. This has
> worked well within my org but I'm now trying to figure out how to
> deal with github-organization-folder. I'm fairly sure that there
> is no explicit support for this job type in core job-dsl. Is it
> possible to do something like this
> https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block#configure-matrix-job
> <https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block#configure-matrix-job>
> in order to create an organization folder or is that a bridge too
> far for a configure block? If not, does anyone know of a
> successful example of this? There was a hint of this on the user
> list but no code was posted.
>
> Thanks,
>
> -Josh
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "job-dsl-plugin" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to job-dsl-plugi...@googlegroups.com
> <mailto:job-dsl-plugi...@googlegroups.com>.
> To post to this group, send email to
> job-dsl...@googlegroups.com
> <mailto:job-dsl...@googlegroups.com>.
> <https://groups.google.com/d/msgid/job-dsl-plugin/d5492975-6c35-4cc1-81b2-0ebbc76602cf%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "job-dsl-plugin" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/job-dsl-plugin/rCJJgl_G5ko/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> job-dsl-plugi...@googlegroups.com
> <mailto:job-dsl-plugi...@googlegroups.com>.
> To post to this group, send email to job-dsl...@googlegroups.com
> <mailto:job-dsl...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/job-dsl-plugin/CAEJ3w4UsBiYKivD2%2BjL9TCdTUvBHK1zA2rGZMY7anAS-F3J%3D9A%40mail.gmail.com
> <https://groups.google.com/d/msgid/job-dsl-plugin/CAEJ3w4UsBiYKivD2%2BjL9TCdTUvBHK1zA2rGZMY7anAS-F3J%3D9A%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Ian Duffy

unread,
Feb 1, 2017, 6:46:18 PM2/1/17
to job-dsl...@googlegroups.com
A draw back I see is that there is no "rescan" button for users to hit after creating a new repo

The above code becomes your seed job. Just use the rebuild button and also have the job execute on a interval :)

>     To post to this group, send email to

>     To view this discussion on the web visit
>     https://groups.google.com/d/msgid/job-dsl-plugin/d5492975-6c35-4cc1-81b2-0ebbc76602cf%40googlegroups.com
>     <https://groups.google.com/d/msgid/job-dsl-plugin/d5492975-6c35-4cc1-81b2-0ebbc76602cf%40googlegroups.com?utm_medium=email&utm_source=footer>.
>     For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "job-dsl-plugin" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/job-dsl-plugin/rCJJgl_G5ko/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/24de32a6-2e98-ee45-07bb-fd0127dd56a0%40hoblitt.com.
Reply all
Reply to author
Forward
0 new messages