Add Maven Settings file support to templates
[releng/builder.git] / README.md
1 = How to test locally
2     - Use the official Jenkins docker image:
3         docker run -d -p 8080:8080 jenkins:weekly"
4     - Then install the Jenkins Plugin Dependencies as listed below
5     - Run JJB with:
6         jenkins-jobs -l DEBUG --conf jenkins.ini update jjb
7
8 = Jenkins Plugin Dependencies
9     - Email-ext Plugin
10     - Gerrit Trigger Plugin
11     - Git Plugin
12     - Sonar Plugin
13     - SSH-Agent Plugin
14
15 = Creating jobs from OpenDaylight templates
16
17 The ODL Releng project provides 3 job templates which can be used to
18 define basic jobs.
19
20 Note: The templates below depend on a modified JJB version to add
21       support for Config File Provider module in the Maven Project
22       module for JJB. This custom version of JJB can be found at:
23       https://github.com/zxiiro/jenkins-job-builder/tree/support-config-file-provider
24
25 == Verify Job Template
26
27 The Verify job template creates a Gerrit Trigger job that will trigger
28 when a new patch is submitted to Gerrit.
29
30 == Merge Job Template
31
32 The Merge job template is similar to the Verify Job Template except it
33 will trigger once a Gerrit patch is merged into
34 the repo.
35
36 == Daily Job Template
37
38 The Daily (or Nightly) Job Template creates a job which will run on a
39 Daily basis and also Submits Sonar reports.
40
41
42 == Basic Job Configuration
43
44 To create a jobs based on the above templates you can use the example
45 template which will create 6 jobs (verify, merge, and daily jobs for both
46 master and stable/helium branch). Begin by using job.yaml.template as a
47 starting point. You can also look at job.yaml.example to see an example
48 of a job configuration that is filled out.
49
50 Before starting create a sub-directory under jjb/ for your project
51 configuration files.
52
53     1. mkdir jjb/PROJECT                # For example aaa
54     2. cp jjb/job.yaml.template jjb/PROJECT/PROJECT.yaml
55     3. Modify jjb/PROJECT/PROJECT.yaml and replace the following keywords
56         - PROJECT: With your project name (eg. aaa)
57         - MAVEN_GOALS: With your job's Maven Goals necessary to build
58         - MAVEN_OPTS: With your job's Maven Options necessary to build
59
60 If all your project requires is the basic verify, merge, and
61 daily jobs then using the job.template should be all you need to
62 configure for your jobs.