joelj / ez-templates Goto Github PK
View Code? Open in Web Editor NEWA easy and seamless way to create and use templates in Jenkins.
License: Apache License 2.0
A easy and seamless way to create and use templates in Jenkins.
License: Apache License 2.0
I am using jenkins 1.563.
I create a simple dummy job with a simple shell script build step. When selecting the 'allow this job to be used a template' checkbox, I get the following error upon save
javax.servlet.ServletException: java.lang.NullPointerException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:34)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:180)
at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:89)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:89)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:117)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:46)
at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:103)
at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:42)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.lang.NullPointerException
at com.joelj.jenkins.eztemplates.TemplateProperty.getImplementations(TemplateProperty.java:39)
at com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleTemplateSaved(TemplateUtils.java:38)
at com.joelj.jenkins.eztemplates.TemplateProjectListener.onUpdated(TemplateProjectListener.java:26)
at hudson.model.listeners.ItemListener.fireOnUpdated(ItemListener.java:166)
at hudson.model.Job.doConfigSubmit(Job.java:1155)
at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:772)
at sun.reflect.GeneratedMethodAccessor1574.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
... 89 more
Since the job configs can be (completely) different shapes, an impl should be the same type as its template. This is not an absolute requirement but should definitely be flagged as a warning
Currently, if you update a parameter's description on the template, any jobs that implement the template's descriptions do not get updated.
I think it would be very useful to update the descriptions (but still not the default values of course), as this provides an easy way to update documentation for required parameters.
Would be sweet to also have support for promoted builds plugin ...
In my current setup, it's actually part of the section, as "<hudson.plugins.promoted__builds.JobPropertyImpl plugin="[email protected]">" , it contains a string reference to the promotion job, which then has a folder + config.xml setup of it's own (since it's similar to another job, just nested) ...
So probably more complex than originally hoped :(
Hi,
I want to configure my jobs in such a way that I can add some additional(extra build steps which is not there in template job) build or post build step in my implementation job but when I save the job, all additional step got overridden by template job. And there are only steps which are present in template job
I want to configure my job as follows :
In Template Project there are:
And In Implementation Job I want
Can you please suggest. How can I do this.
For larger build jobs, folders are indispensable. Right now ez-templates wants a unique job name (so folderA->jobA and folderB ->jobA) cannot be specified as /folderA/jobA and /folderB/jobA
This forces naming jobs uniquely inside folders which is less than ideal
(I have a lot of projects that have similar jobs and hence the need for templates )
If you clone a template job, it keeps the knowledge of all jobs implementing the original template leading to odd behaviour (both templates will re-save the job although it will only inherit from the one defined in it).
Recommendation Wipe list of implementator-jobs when cloning a template.
As a user, it feels natural to "Copy from job" and select a template. EZT should supply a "an "implement from template" option in the new Job screen.
Currently you have to manually change the properties for that job so that "Allow this job to be used as a template" is not checked and "Use another job as a template" is checked
This should be done automatically and a fully prepared impl presented to the user
For those of us who aren't capable of building Jenkins plugins it would be nice to have a compiled version of this plugin so that we can use it in our own installation of Jenkins.
Would be nice if the template name field contained a drop-down of valid choices.
Similar to SCM and Security Permissions checkboxes, looking to do same for Ownership plugin.
Brings up side issue of configuring for various other plugins could get into many other options.
Implementations should never be forced to use the display name of the template
I get the following stack trace when updating a template, but all of the jobs implementing it get updated properly.
javax.servlet.ServletException: java.lang.NullPointerException
...
Caused by: java.lang.NullPointerException
at com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleTemplateSaved(TemplateUtils.java:54)
at com.joelj.jenkins.eztemplates.TemplateProjectListener.onUpdated(TemplateProjectListener.java:21)
at hudson.model.listeners.ItemListener.fireOnUpdated(ItemListener.java:166)
at hudson.model.Job.doConfigSubmit(Job.java:1172)
at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:774)
...
Looking at TemplateUtils.java:54, it seems that this is caused by the jobs implementing the template (or the list of implementations itself). How should I go about debugging this further?
If you delete a template it leaves all the jobs referencing a template name that doesn't exist
Recommendation Remove implementor-job config when deleting a template
Currently the only way to see which jobs implement a template is when configuring the it (and useful list, at that) ... the thing is, user has to have Configure permissions to see that, which might not want end-users to use.
Wondering about throwing link somewhere to provide same list of what jobs implement the template??
Along with other checkboxes, new "sync" to ignore SCM.
Obviously this would carry a caveat that build steps would have to be carefully crafted since some SCMs provide different functionality than others; however, that would be upto the user not the plugin.
Option to not sync permissions part of "Enable project-based security"
Reason: Have setup where I control the base, but various clients need permissions to only change their parameters
When implementing a template, there are 4 options to en/disable specific syncing:
I wanted to use build trigger syncing only. However when I saved that configuration, the plugin started to confuse those options randomly: Saving once had at once the build trigger syncing disabled but matrix axis configuration synced instead. When I fixed the setup again and saved again I had at once the "Enabled/Disabled" syncing checked instead.
I'm not shure how this happens but it seems the plugin is not able to separate the 4 options properly, or more precise: consistently, since I could not reproduce the error in a deterministic way.
I peeked into the code but could not spot a bug at once, maybe you knowing the code better might find one.
I'm running on Jenkins 1.531 (Windows 7 64 bit native installation) with your plugin built from commit a993065.
I have a divergence between 2 types of builds running from the same template:
The only difference is the section of the config (Post-build Actions).
Please add a Sync Option that permits this divergence.
When you make a new job that's going to implement a template and save it, none of the config carries over. A workaround is to "Copy an existing job" and use the template, then uncheck "Use this job as a template" and check "Use another job as a template".
In the master template, I am using the sidebar link plugin. https://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin
However, for every job implementing this template I need to have a unique url. There is no way to parameterise this url as this is a sidebar link for the project as this is a persistent link for every project. I also have the same issue using the github pull request builder plugin https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin
I need to be able to have a unique url for every implemented project. But the template overrides these values...
Hello,
Read your blog post and decided to give this a go.
I built with maven under Jenkins 1.527 When following steps I noticed two things:
I built from this repo, adjusted the pom for 1.527 Jenkins. I can't find any error in the system logs.
I am using:
2.26 of the promoted builds plugin
Jenkins ver. 1.656
1.1.2 EZ Templates
For some reason when I add a promotion to the template job, The jobs inheriting this template does not have the promotion. How to you sync the promotions with the template job?
When changing the template of a job from X to Y, Y is updated with the new child but X is not updated with the removal.
Recommendation TemplateImplementationProperty handles assigning a new template and removing all tmeplate support but doesn't deal nicely with amending the template - this is treated as adding a new template. Separate the nweInstance impl into simpler methods which can be composed based on the existence of old/new property values.
This is a really nice little plugin that does a crucial job in a neat fashion. #1 highlighted the fact that it has zero tests and risks being unreliable (that's probably why it has not been released yet!)
https://wiki.jenkins-ci.org/display/JENKINS/Unit+Test
I have just tried out ez-templates, which seems a very interesting solution to reduce the maintainance nightmare in big Jenkins installs (with lots of similar jobs doing the same thing, but needing a private workspace).
As far as I know, the only way to parameterize each job (template instance) based on a template, is by creating a full-blown Job Parameter ("This build is parameterized"). However, this will not always be desirable. For example, we may want to define a sample "build" job, which compiles and tests our project, and send an email notification to the development team if it fails.
Ok, so we can define a "template_build" job, and define two parameters: "REPO_URL" and "NOTIFY_TO".
Now we can make several instances of it and, for each job (development project), specify the SCM Url (e.g. "http://example.com/svn/project/trunk") and notification addresses (e.g. "[email protected], [email protected]")
However, now it will be a bit awkward to execute this Build, because now it is a "Build with Parameters". Some plugins or scripts may not work with it the same way (the REST interface is different now), and more importantly, we have a form now to modify these data each time we execute the build. So, a user with the rights to execute the build, can essentially also configure it (because he can change the REPO_URL and NOTIFY_TO values, which should be hidden in the configuration).
Moreover, we may have also first-level Job Parameters, which are not intertwined with these template parameters.
So, the question is: is there some way to defined template parameters I am missing here? If not, I would propose to add support for template parameters. I think that in a previous effort of JoelJ, there was such a feature ("Templating" repo).
Thank you in advance for considering this!
Regards,
Aritz
When saving a job after setting as a template or creating a new job that uses a template, I see the error below. I see this error when using master or v1.0-20140914 tag
javax.servlet.ServletException: java.lang.NoSuchMethodError: com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleImplementation(Lhudson/model/AbstractProject;Lcom/joelj/jenkins/eztemplates/TemplateImplementationProperty;)V at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at org.kohsuke.stapler.Stapler.service(Stapler.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:46) at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:103) at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:42) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.NoSuchMethodError: com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleImplementation(Lhudson/model/AbstractProject;Lcom/joelj/jenkins/eztemplates/TemplateImplementationProperty;)V at com.joelj.jenkins.eztemplates.ProjectSavedListener.onUpdated(ProjectSavedListener.java:34) at hudson.model.listeners.ItemListener.fireOnUpdated(ItemListener.java:166) at hudson.model.Job.doConfigSubmit(Job.java:1157) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:773) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) ... 58 more
Or at least mention that this needs to be ticked on the front page. I just wasted at least an hour trying to figure out why this build step wasn't synchronizing. It wasn't exactly helped by the fact that the 'advanced' button was off screen.
Thanks for your work on this amazing plug-in!
Might be nice to allow various pieces of a config to not be in the template.
For example, SCM : although I could just put all options in parameters, seems extraneous to put them all in there, just to use them once, rather than ignore SCM setup in the template.
I have generally come to expect (mostly from TeamCity) that if you do not specify an override to a parameter then it should track any changes in the template.
I found it and installed it today - I think it's great, but not being available in the main plugin repository is a barrier to discoverability.
Saving any job with a template name that doesn't exist throws the following NPE.
Recommendation Throw a better exception. Add UI validation that the template field contains a template name that actually does exist
Implementation projA was saved. Syncing with templateA
Nov 28, 2013 12:39:30 PM WARNING org.eclipse.jetty.util.log.JavaUtilLog warn
Error while serving http://server:8080/job/templateA/configSubmit
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NullPointerException
at com.joelj.jenkins.eztemplates.utils.TemplateUtils.synchronizeConfigFiles(TemplateUtils.java:183)
at com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleImplementation(TemplateUtils.java:79)
at com.joelj.jenkins.eztemplates.utils.TemplateUtils.handleTemplate(TemplateUtils.java:52)
at com.joelj.jenkins.eztemplates.ProjectSavedListener.onUpdated(ProjectSavedListener.java:26)
at hudson.model.listeners.ItemListener.fireOnUpdated(ItemListener.java:142)
at hudson.model.Job.doConfigSubmit(Job.java:1139)
at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:790)
... 75 more
There is no need to have a list of implementations persisted in the template config given each implementation refers to its template. This is the cause of much complexity in what is otherwise a very simple plugin and, consequently, the cause of most of the bugs raised!
This is significant internal change.
It would be nice to have option to disable synchronization of "Restrict where this project can be run" and "Label Expression" project properties.
Is there a reason that you are not hosting this plugin in the community plugin repository? https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins
When applying a change to a template, I get a white screen. the change is then a hit and miss. Sometimes the inheriting jobs update with the change, sometimes they don't. I always have to double check a child job. I've noticed this with a large number of jobs using the same template... We have 30+ using the same template.
When a git hook is defined in the parent project, in the jenkins log you can see the webhook register and jenkins recieve the POST, but the project is not poked, and no build is triggered.
os : windows server 2012
jenkins : 1.607
@JoelJ, Can you do the setup steps for ez-templates CI on either Travis or BuildHive
It seems a little churlish to build a Jenkins plugin using Travis :) but intriguingly there is a new jenkins-travis-plugin that execute travis.yml files in jenkins.
I do like the fact that Travis projects carry their own build script (what would that mean for "templating" ?) and BH seems only to have built six things globally so far this morning so I'm kinda favouring Travis here (if nothing else to keep checking out new platforms!)
http://docs.travis-ci.com/user/getting-started/
https://buildhive.cloudbees.com/
These are required to be done by the repo owner.
I can then follow up with whatever else is required.
Doesn't seem to get anything using it with Multi-Job https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin ... no params, no build-steps, nothing.
So no sure if this would be a bug or enhancement, or just clarification in the README that it only applies to free-style jobs.
This is another "not sure how hard it is, hope it's easy" type enhancement ...
When configuring an implemented job, have all the "non-editable" fiels actually be readonly (in HTML). Would be good way to enforce/remind user that fields can't actually be changed since will be overwritten by template.
I have a sense this is harder than I hoped in straight HTML, so possibly post-page load in Javascript by traversing the JS DOM ?
Jobs remain with the old template name which no longer exists
Recommendation Detect job rename and update children
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.