I am current making use of the template workflow plugin which quite nicely allows you to define a workflow out a set of template jobs and then have specific instances of these workflows and new jobs created based on the template.
The plugin allows you to mark a job as a "template job". Within this template job, in order to provide for template based variable substitution, it expects you to specify variables in the form of @@VAR_NAME@@, which when the plugin runs, will substitute these values for specific values defined for each workflow instance.
The issue is that this works fine for most areas where @@VAR_NAME@@ type variables are defined, for example in the "description" and even in the "Repository URL" field for subversion. Although a red UI error message is displayed, you are still able to save the template. Unfortunately when trying to use the @@VAR_NAME@@ format in the Polling SCM field, an exception is thrown upon saving and the template cannot be saved.
The exception is as follows
Obviously @@J_SCM_POLLING_CRON@@ is not valid cron syntax, hence the error, however this is just a template job. The real job would have a valid definition in it.
I was hoping that a solution to this could be that upon saving a job with such a definition, in the same way that an invalid value in the "Repository URL" yields a UI error and warning, but still allows the value to be saved, this could do a similar thing? As this template job is never going to run anyway, it doesn't matter that it has invalid definitions. Or if anybody else has any other ideas/suggestions I would be open to them too
|