Project cascading

Project cascading

The concept of cascading project is the ability to inherit project properties from parent in a cascading fashion down the inheritance tree as  discussed in HUDSON-3157 Feature request: cascading project settings.  

Initially  the implementation will be kept simple, with only few UI changes

  • Drop down Box at the top of the project config page to select one the saved project to inherit from (filtered by the same type)
  • Any project of same type can be used as a parent project for inheritance
  • Cycle inheritance is prohibited. The dropdown will not have those projects which can make potential cyclic dependency.
  • All Job properties will be shown on the Configure Page, by default they will be taken from Parent
  • User can override configuration properties by changing them on Child Configuration Page. When overiiden, property will be highlighted to show it is overriden
  • User will be allowed to revert the overriding property to that of the parent using a simple revert button at the left hand side
  • User will not be allowed to delete the project, if the it has cascading children
  • If Parent contains Builders, Publishers or Triggers they will be merged with Child.

Project properties which support cascading in 2.2.0-BETA2 (Released on Nov 15, 2011)

Project type
Property name
UI changes
Status
Comment
Freestyle Project
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
  Quiet period   Complete  
  Retry Count   Complete  
  Block build when upstream project is building   Complete  
  Block build when downstream project is building   Complete  
  Use custom workspace   Complete  
  Clean workspace before build   Complete  
  Builders (ant, maven 2 (legacy), maven 3, shell, batch)   Complete supported overriding of all section
  Publishers (default)
  Complete  
  SCM (None, CVS, Subversion, Git)   Complete  
  Disable Build   Not Yet Implemented  
  Execute concurrent builds   Complete  
  Build Triggers   Complete except pseudo trigger "Build after other projects are built"
  Parameters
  Complete supported overriding of all parameters
  Restrict where this project can be run   Complete
Multi-configuration Project
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
  Quiet period   Complete  
  Retry Count   Complete  
  Block build when upstream project is building   Complete  
  Block build when downstream project is building   Complete  
  Use custom workspace   Complete  
  Configuration Matrix   Complete  
  Run each configuration sequentially 
  Complete  
  Combination Filter
  Complete  
  Execute touchstone builds first   Complete  
  Builders   Complete  
  Publishers   Complete  
  SCM (None, CVS, Subversion, Git)   Complete  
  Build Triggers   Complete except pseudo trigger "Build after other projects are built"
  Parameters   Complete supported overriding of all parameters
  Restrict where this project can be run   Complete  
Maven 2/3 project (legacy)
       
Monitor an external job
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
         

Project properties which support cascading in 2.2.0-BETA (Released Oct 26, 2011)

Project type
Property name
UI changes
Status
Comment
Freestyle Project
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
  Quiet period   Complete  
  Retry Count   Complete  
  Block build when upstream project is building   Complete  
  Block build when downstream project is building   Complete  
  Use custom workspace   Complete  
  Clean workspace before build   Complete  
  Builders (ant, maven 2 (legacy), maven 3, shell, batch)   Complete supported overriding of all section
  Publishers (default)
  Complete  
  SCM (None, CVS, Subversion, Git)   Complete  
  Execute concurrent builds   Complete  
  Build Triggers   Not Implemented  
  Parameters
  Not Implemented  
  Restrict where this project can be run   Not Implemented
Multi-configuration Project
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
  Quiet period   Complete  
  Retry Count   Complete  
  Block build when upstream project is building   Complete  
  Block build when downstream project is building   Complete  
  Use custom workspace   Complete  
  Configuration Matrix   Complete  
  Run each configuration sequentially
  Complete  
  Combination Filter
  Complete  
  Execute touchstone builds first   Complete  
  Builders   Complete  
  Publishers   Complete  
  SCM (None, CVS, Subversion, Git)   Complete  
  Build Triggers   Not Implemented  
  Parameters   Not Implemented  
  Restrict where this project can be run   Not Implemented  
  Build Triggers   Pending  
Maven 2/3 project (legacy)
     
Monitor an external job
Discard Old Builds(Days to keep builds, Max # of builds to keep,
Days to keep artifacts,Max # of builds to keep with artifacts)
  Complete  
         

Hudson plugins which support cascading

Plugin Version
Comments
Copy Artifact Plugin 1.12
 
Promoted Builds Plugin 2.4
 
Parameterized Trigger Plugin 2.4
 
Deploy Plugin 1.7
 
Build Timeout Plugin
1.6
 
Join Plugin 1.9
 
Static Analysis Utilities 1.34
 
Findbugs Plugin 4.3
 
Warnings Plugin 3.22
 
Task Scanner Plugin 4.23
 
Checkstyle Plugin 3.21
 
PMD Plugin 3.22
 
Mercurial Plugin 1.35
 
Sonar plugin 1.7.1
 
M2release plugin 0.8.1
 
Maven-info 0.0.3
 
M2-extra-steps 1.1.3
 
Svn-tagging 1.14
 
Violations 0.7.7
 
Email-ext plugin 2.10
 
Github plugin 0.4
 
Emma plugin 1.26
 
Cobertura plugin 1.1
 
Locks and Latches plugin 0.6
 
Batch task plugin 1.14
 
Ivy plugin 1.17
NPE on the Ivy project loading:
updateTransientActions(AbstractIvyProject.java:63)
Implementation Point of View
  • Parent project is a regular project.
  • Additional property will be added to the regular project to hold the "Cascading parent name"
  • The inheritance will be done purely by comparison.
  • Same way initially the loading and saving of config page is also done purely by comparison.
    • All the UI elements in the config page relies on respective getter method of the project. The getter will provide corresponding data comparing what is saved in the project level config and what is saved in the parent level.
    • While saving, compare project level and parent level. If the item (property) to be saved match that of the parent, do not save it in the project config, keep it in the parent config. Properties can have multiple count (example: a project can have more than one builder), So while comparing the count also should be taken in to consideration.

Labels:

inheritance inheritance Delete
project project Delete
cascading cascading Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Sep 13, 2011

    Henrik Lynggaard Hansen says:

    This is very similar to the posting I made here http://wiki.eclipse.org/Hudson-c...

    This is very similar to the posting I made here http://wiki.eclipse.org/Hudson-ci/Planning/Job_Templates, biggest point missing seems to be the multiple inheritance.

    Mine is however more about the user requirements than implementation details.

    1. Sep 14, 2011

      Anton Kozak says:

      Hello Henrik Implementation of the configuration multiple inheritance is a very...

      Hello Henrik

      Implementation of the configuration multiple inheritance is a very complicated task. It affects almost all Hudson project, including plugins. It also may add inconsistency on the UI and affect backward compatibility.

      We propose to simplify first implementation a little bit, to support single inheritance only. In the further releases it will be improved.

      Does it work for you?

      Thank you.

    2. Sep 14, 2011

      Winston Prakash says:

      Henrik, this page is mainly to flush out the implementation details. This page c...

      Henrik, this page is mainly to flush out the implementation details. This page considers  the requirements from your page as well as  HUDSON-3157. As Anton pointed out we target single inheritance for initial implementation and follow up with more complicated multiple inheritances

  2. Oct 28, 2011

    Manfred Moser says:

    Looks nice. I have added this to the book now, but it would be good to get some ...

    Looks nice. I have added this to the book now, but it would be good to get some more use case examples.

    Oh and btw. I would not port this to the Maven2/3 legacy project type.