balanced-cookbooks / balanced-ci

Internal configuration for the Jekins CI environment
4 stars 1 forks source link

How can I inherit from one ci_job to another? #5

Closed mjallday closed 10 years ago

mjallday commented 10 years ago

https://github.com/balanced-cookbooks/balanced-ci/blob/new-jobs/libraries/balanced_ci_pipeline.rb#L140 https://github.com/balanced-cookbooks/balanced-ci/blob/new-jobs/libraries/balanced_ci_pipeline.rb#L170

Each declaration of a ci_job has lots of duplication. Inheritance can solve this.

coderanger commented 10 years ago

The parent thing in particular can't fixed since thats a data flow requirement, but overall I would recommend making a balanced_ci_job that subclasses ci_job. You can look at ci_server which subclasses jenkins for an example. This will also address #4.