Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Job inheritance in Jenkins jobs

Tags:

How do you handle mapping Jenkins jobs to your build process, and have you been able to build in cascading configurations on inheritance?

For any given build I'll have at least three jobs (standard continuous integration/nightly, security scan, coverage) and then some downstream integration testing jobs. The configuration slicer plugin handles some aspects cross jobs but each jobs is still very much its own individual entity with no relationship to the other jobs in its group.

I recently saw QuickBuild and it has job inheritance where a parent jobs can define a standard group of steps and its children can override and specialize. With Jenkins, I have copies of jobs, which is fine until I need to change something. With QuickBuild the relationship between jobs allows me to spread my changes with little effort.

I've been trying to figure out how to handle this in Jenkins. I could use the parameterized build trigger plugin to allow jobs to call others and override aspects. I'd then harvest the data from the called jobs to its caller. I suspect I'll run into a series of problems where there are aspects which I can't override which will force me to implement Jenkins functionality in my own script thus making Jenkins less useful.

How do you handle complexity in your build jobs in Jenkins? Have you heard of any serious problems with QuickBuild?

like image 920
Peter Kahn Avatar asked Jun 30 '11 21:06

Peter Kahn


People also ask

Can a single Jenkin job run on multiple nodes?

You can now launch all a job on all nodes.

How do I get a list of all jobs in Jenkins?

Go to Script Console under Manage Jenkins, this script will print the name of all jobs including jobs inside of a folder and the folders themselves: Jenkins. instance. getAllItems(AbstractItem.

Can Jenkins run multiple jobs simultaneously?

When creating new Jenkins jobs you will have an option to create MultiJob project. In the build section, this job can define phases that contain one or more jobs. All jobs that belong to one phase will be executed in parallel (if there are enough executors on the node)


1 Answers

I would like to point out to you the release of a plugin that my team has developed and only recently published under open source. It implements full "Inheritance between jobs".

Here for further links that might help you:

  • Presentation: https://www.youtube.com/watch?v=wYi3JgyN7Xg
  • Wiki: https://wiki.jenkins-ci.org/display/JENKINS/inheritance-plugin
  • Releases: http://repo.jenkins-ci.org/releases/hudson/plugins/project-inheritance/
like image 199
Norman Avatar answered Nov 01 '22 12:11

Norman