Minor fixup of example SCM
[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 == Verify Job Template
21
22 The Verify job template creates a Gerrit Trigger job that will trigger
23 when a new patch is submitted to Gerrit.
24
25 == Merge Job Template
26
27 The Merge job template is similar to the Verify Job Template except it
28 will trigger once a Gerrit patch is merged into
29 the repo.
30
31 == Daily Job Template
32
33 The Daily (or Nightly) Job Template creates a job which will run on a
34 Daily basis and also Submits Sonar reports.
35
36
37 == Basic Job Configuration
38
39 To create a jobs based on the above templates you can use the following
40 example which will create 6 jobs (verify, merge, and daily jobs for both
41 master and stable/helium branch).
42
43 Before starting create a sub-directory under jjb/ for your project
44 configuration files.
45
46     1. mkdir jjb/PROJECT                # For example controller
47     2. touch jjb/PROJECT/PROJECT.yaml
48     3. Add your job configuration to jjb/PROJECT/PROJECT.yaml
49
50 If all your project requires is the basic verify, merge, and
51 daily jobs then the following template should be all you need to
52 configure for your job.
53
54 Replace:
55
56 PROJECT:           Project Name
57 PROJECT_SCM_URL:   URL to Gerrit repo
58 PROJECT_MVN_GOALS: Maven Goals
59 PROJECT_MVN_OPTS:  Maven Options
60
61 ########### EXAMPLE ###########
62
63 - project:
64     name: PROJECT
65     jobs:
66         - '{name}-verify-{stream}'
67         - '{name}-merge-{stream}'
68         - '{name}-daily-{stream}'
69
70     # SCM
71     scm-url: PROJECT_SCM_URL
72     stream:
73         - master:
74             branch: master
75         - stable-helium:
76             branch: stable/helium
77
78     # Maven
79     mvn-goals: 'PROJECT_MVN_GOALS'
80     mvn-opts: 'PROJECT_MVN_OPTS'
81
82     # Email Publisher
83     email-prefix: '[PROJECT]'
84
85 ########### END EXAMPLE ###########
86
87
88
89 Sample data:
90
91 ########### SAMPLE ###########
92
93 - project:
94     name: aaa
95     jobs:
96         - '{name}-verify-{stream}'
97         - '{name}-merge-{stream}'
98         - '{name}-daily-{stream}'
99
100     # SCM
101     scm-url: ssh://jenkins-releng@git.opendaylight.org:29418/aaa.git
102     stream:
103         - master:
104             branch: master
105         - stable-helium:
106             branch: stable/helium
107
108     # Maven
109     mvn-goals: '-Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo clean install'
110     mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
111
112     # Email Publisher
113     email-prefix: '[aaa]'
114
115 ########### END SAMPLE ###########