Template plugin for Jenkins
Asked Answered
H

5

23

Is there any plugin available in Jenkins which allows you to reuse shared configuration across the jobs.. e.g I can define a template for Continuous Integration and other template for Running Tests and create multiple jobs from these template for different branches.

I know template plugin is available in Enterprise Jenkins but is there something similar available for jenkins open source?

I am looking for something similar to here

Hailstone answered 10/8, 2012 at 11:42 Comment(1)
good for a first question +1 upComminute
G
6

I have found ez-templates plugin to behave well for Jobs templating. It is very young project and you will have to build it by yourself (which is very simple, see below), but still it is much more powerful than Template Project Plugin as it supports any types of jobs.

How to build:

  1. Install Maven 3
  2. Clone/download the ez-templates git repo
  3. Run 'mvn install' from the ez-templates checkout folder
  4. Once build is ready go to the 'target' folder and find the ez-templates.hpi which is self contained plugin binary.
Gnat answered 13/11, 2013 at 22:40 Comment(3)
Do you mind explaining why it's more powerful then the Template Project Plugin?Barsac
For posterity, [wiki.jenkins-ci.org/display/JENKINS/… was released to the normal plugin registry shortly after this post.Anaplasty
It does not support pipelines and Jenkins Blue Ocean.Diaphysis
A
2

How about the Template Project Plugin?

Asshur answered 10/8, 2012 at 13:40 Comment(0)
C
1

The Job Generator Plugin was released after this question was asked, which may fulfil some people's needs.

Unfortunately the Template Project Plugin still has some issues, particularly in that it lacks support for job parameters.

Custer answered 12/12, 2014 at 16:26 Comment(0)
L
1

We use the Jenkins job builder to automate creation and management of our jenkins jobs. It was basically built to allowing share configurations across jobs so you can easily create the same jobs with multiple configurations. Check it out: http://docs.openstack.org/infra/jenkins-job-builder

Lobachevsky answered 4/9, 2015 at 22:28 Comment(0)
P
-1

You can use the Copy Project Link plugin. https://wiki.jenkins-ci.org/display/JENKINS/Copy+project+link+plugin What I have done is to create a disabled (dummy) pre-configured job and when I want to create another one with the same configuration I just copied by using this plugin.

Pungent answered 10/8, 2012 at 12:43 Comment(1)
what if you want later to tune the 'template'?Overgrow

© 2022 - 2024 — McMap. All rights reserved.