prevent job dsl templates from running as regular jobs

30 views
Skip to first unread message

GCA

unread,
Jul 1, 2016, 3:17:33 PM7/1/16
to job-dsl-plugin
Hello All, 

We are maintaining set of templates which are actually jobs and we seed the new jobs using the templates which are actually meant for running builds.
Now, we see some of templates being run by users as normal jobs as they would look like one job can be run - but its really the abstracted out information
disguised as a normal job and it really doesn't make any sense to run templates for our use case. 

Is there a way currently to mark them as templates or tell jenkins to restrict running as Build now or Build with parameters ?

Thanks.

Daniel Spilker

unread,
Jul 5, 2016, 3:05:51 PM7/5/16
to job-dsl...@googlegroups.com
You can disable the template jobs, but then you have to add disabled(false) to each DSL job definition.

Or you can use security to disallow job execution (e.g. https://wiki.jenkins-ci.org/display/JENKINS/Matrix+Authorization+Strategy+Plugin), but then you need to allow it in Job DSL for each job generated from a template.

Daniel

--
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.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/010d0918-4c8a-4a79-bec5-dcaeff965805%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

GCA

unread,
Jul 7, 2016, 6:08:16 PM7/7/16
to job-dsl-plugin
Thanks Daniel,

We explored these two options but we are kind of in search for some construct like "this is a template" so it won't be runnable and child jobs will not inherit those values like disabled()

-gca
Reply all
Reply to author
Forward
0 new messages