Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Load job steps template from file or URI #31

textgoeshere opened this Issue Jan 25, 2012 · 4 comments


None yet
2 participants

textgoeshere commented Jan 25, 2012

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.


cowboyd commented Jan 25, 2012

It would be nice to connect this full circle and try to detect templates from a project working tree or source repository too. That way you could not only manually select a template, but it would do its best to auto-detect one.


textgoeshere commented Jan 25, 2012

What would be the convention? config.xml in the root of the project?


cowboyd commented Jan 30, 2012

I think it would vary from project to project. By default, it shouldn't require any configuration, and will choose a reasonable set up for you. I guess what I'm driving at is some sort of 'plugin' system for the project templating system.


textgoeshere commented Feb 1, 2012

Closing, pull request at #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment