DEV/Setting up JJB

From fd.io
Revision as of 14:01, 14 June 2016 by Hagbard (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

fd.io uses Jenkins in conjunction with gerrit to run various different types of jobs:

  1. Verify jobs whenever a new job is submitted to gerrit.
  2. Merge jobs which run whenever a new patch is merged.
  3. Integration jobs which run whenever a project within fd.io you depend on merges a patch.

These jobs are defined per-project.

ci-management

The definition of the Jenkins Jobs is kept in Jenkins Job Builder format in the ci-management repo (soon to be a project).

Checking out ci-managment

git clone ssh://hagbard@gerrit.fd.io:29418/ci-management.git

Structure of ci-management

The crucial subdirectories for most projects in ci-management are:

  1. jjb/ - subdirectory defining project Jenkins Jobs in JJB format
  2. vagrant/ - subdirectory defining how Jenkins Slave snapshots are built

jjb/

For each project there needs to be a jjb/${reponame}/ subdirectory. Within that subdirectory there is usually one or more .yaml files, traditionally named ${reponame}.yaml, defining JJB jobs, and some scripts that are run by those jobs, generally named include-raw-${reponame}-${functional part}.sh.

Generally speaking, a patch to a projects jjb/ directory need to either originate with a committer for that project,