cowboyd/jenkins.rb — Issue #31: Load job steps template from file or URI
Author: textgoeshere
Created: 2012-01-25 11:27:49+00:00
State: open

It would be handy to be able to supply a file or URI to use as the job steps config template.

Existing builtin templates would be untouched: if the parameter to `--template` option is one of `VALID_JOB_TEMPLATES` then the config is built as per usual.

However if the parameter is not one of `VALID_JOB_TEMPLATES`, then new behaviour occurs. If the parameter looks like a URI, the content of the response is used. Otherwise, it's assumed to be the file, and the file contents are used.

Scenario: Create job with steps from file (jenkins create --template mytemplate.xml)
Scenario: Create job with steps from URI (jenkins create --template http://example.com/template)

Happy to contribute code if there's an appetite for this.