Switch to project type MultiJob for Joid and structure jobs accordingly 81/4781/6
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Thu, 17 Dec 2015 10:45:26 +0000 (11:45 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 18 Dec 2015 09:37:42 +0000 (09:37 +0000)
commitac5d45ded390496a2845d72dce8ec89ecc2a9174
treea571f057925083a6e0c3cf51c9e5960f09207aa1
parent93e45bc5f7b4144d98373c4b54e23db1d51b221e
Switch to project type MultiJob for Joid and structure jobs accordingly

Multijob project type has some advantages over the Freestyle project. [1]
- Jobs in same phase run in parallel.
- Jobs in another phase need to wait completion of jobs in earlier phase.
- Ability to create phases where different jobs can be run in parallel
  so a deploy phase can contain virtual and bare metal deployment jobs
  where both are running in parallel.
- Ability to determine what should be done when a job fails
- Ability to automatically abort other jobswhen a job is aborted. [2]
- Expose parameters from main job to jobs executed by it.
  (If a parameter is defined in sub job, it won't be overriden.
  That's why SDN_CONTROLLER and OPNFV_FEATURE parameters are not defined
  in sub jobs.)
- See full CI pipeline by just clicking the main job.
- Access the console logs of sub jobs from main job.

See example job from link [3].

Other important aspects of this change are
- One main job per installer, SDN controller and POD created. The purpose
  of the main job is to ease the scheduling and troubleshooting. The actual
  stuff is done by subjobs.
- Use same build, deploy, and test jobs for an installer and POD for running
  different combinations. The installer and test project scripts should do
  what needs to be done by determining the combination using SDN_CONTROLLER
  OPNFV_FEATURE env variables.
- Create and enable main installer jobs with supported SDN controllers by
  the specific installer which will automatically be triggered.
- The change requires us to increase no of executors per pod jumphost/slave
  by one since main and subjobs get executed on same slave due to passing
  parameters from main job to subjobs.
- Enabling additional OPNFV features can be done by using Build with Parameters
  manually and changing the OPNFV_FEATURE parameter before clicking the Build
  button.
- Use common naming scheme for jobs:
  Installer main jobs: [installer]-[controller]-[pod]-daily-[stream]
  Installer sub jobs: [installer]-[activity]-[pod]-daily-[stream]
  Test jobs: [test_project]-[installer]-[pod]-daily-[stream]

[1] Details of Multijob Plugin is available on below link.
https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin

[2] Available once the patch below gets merged.
https://review.openstack.org/#/c/257948/

[3] Example main job showing subjobs.
https://build.opnfv.org/ci/job/installer-controller-pod-daily-master/

Change-Id: Ie6ce2aaa7117583bc71e5153748a8e32f7d00351
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/joid/joid.yml