First take at JJB for TTP
[releng/builder.git] / jjb / job.yaml.template
1 # ODL Releng build templates
2 - project:
3     name: PROJECT
4     jobs:
5         - 'PROJECT-verify-{stream}'
6         - 'PROJECT-merge-{stream}'
7         - 'PROJECT-daily-{stream}'
8
9     # stream:    branch with - in place of / (eg. stable-helium)
10     # branch:    branch (eg. stable/helium)
11     stream:
12         - master:
13             branch: 'master'
14         - stable-helium:
15             branch: 'stable/helium'
16
17
18 # For the Job templates below replace instances of:
19 # PROJECT with your project name (eg. controller)
20 # MAVEN_GOALS with your maven goals to build
21 # MAVEN_OPTS with your maven options to build
22
23 - job-template:
24     name: 'PROJECT-verify-{stream}'
25
26     # Job template for ODL verify jobs
27     #
28     # The purpose of this job template is to setup a ODL verify job
29     #
30     # Required Variables:
31     #     stream:    branch with - in place of / (eg. stable-helium)
32     #     branch:    branch (eg. stable/helium)
33
34     project-type: maven
35     node: dynamic_verify
36
37     logrotate:
38         daysToKeep: '{build-days-to-keep}'
39         numToKeep: '{build-num-to-keep}'
40         artifactDaysToKeep: '{build-artifact-days-to-keep}'
41         artifactNumToKeep: '{build-artifact-num-to-keep}'
42
43     parameters:
44         - gerrit-parameter:
45             branch: '{branch}'
46
47     scm:
48         - gerrit-trigger-scm:
49             credentials-id: '{ssh-credentials}'
50             scm-url: 'ssh://jenkins-releng@git.opendaylight.org:29418/PROJECT.git'
51             refspec: '$GERRIT_REFSPEC'
52
53     wrappers:
54         - ssh-agent-credentials:
55             user: '{ssh-credentials}'
56
57     triggers:
58         - gerrit-trigger-patch-submitted:
59             name: 'PROJECT'
60             branch: '{branch}'
61
62     maven:
63         maven-name: '{mvn30}'
64         root-pom: 'pom.xml'
65         goals: 'MAVEN_GOALS'
66         maven-opts: 'MAVEN_OPTS'
67         settings: '{PROJECT-settings}'
68         global-settings: '{odl-global-settings}'
69
70     publishers:
71         - email-notification:
72             email-prefix: '[PROJECT]'
73
74 - job-template:
75     name: 'PROJECT-merge-{stream}'
76
77     # Job template for ODL merge jobs
78     #
79     # The purpose of this job template is to setup a ODL merge job
80     # and deploy artifacts to Nexus.
81     #
82     # Required Variables:
83     #     stream:    branch with - in place of / (eg. stable-helium)
84     #     branch:    branch (eg. stable/helium)
85
86     project-type: maven
87     node: dynamic_merge
88
89     logrotate:
90         daysToKeep: '{build-days-to-keep}'
91         numToKeep: '{build-num-to-keep}'
92         artifactDaysToKeep: '{build-artifact-days-to-keep}'
93         artifactNumToKeep: '{build-artifact-num-to-keep}'
94
95     scm:
96         - gerrit-trigger-scm:
97             credentials-id: '{ssh-credentials}'
98             scm-url: 'ssh://jenkins-releng@git.opendaylight.org:29418/PROJECT.git'
99             refspec: ''
100
101     wrappers:
102         - ssh-agent-credentials:
103             user: '{ssh-credentials}'
104
105     triggers:
106         - gerrit-trigger-patch-merged:
107             name: 'PROJECT'
108             branch: '{branch}'
109
110     maven:
111         maven-name: '{mvn30}'
112         root-pom: 'pom.xml'
113         goals: 'MAVEN_GOALS'
114         maven-opts: 'MAVEN_OPTS'
115         settings: '{PROJECT-settings}'
116         global-settings: '{odl-global-settings}'
117
118     publishers:
119         - email-notification:
120             email-prefix: '[PROJECT]'
121         - maven-deploy:
122             id:
123             url:
124             unique-version: true
125             deploy-unstable: false
126
127 - job-template:
128     name: 'PROJECT-daily-{stream}'
129
130     # Job template for daily builders
131     #
132     # The purpose of this job template is to setup a daily/nightly
133     # builder and pushes to Sonar analysis.
134     #
135     # Required Variables:
136     #     stream:    branch with - in place of / (eg. stable-helium)
137     #     branch:    branch (eg. stable/helium)
138
139     project-type: maven
140     node: dynamic_verify
141
142     logrotate:
143         daysToKeep: '{build-days-to-keep}'
144         numToKeep: '{build-num-to-keep}'
145         artifactDaysToKeep: '{build-artifact-days-to-keep}'
146         artifactNumToKeep: '{build-artifact-num-to-keep}'
147
148     scm:
149         - git-scm:
150             credentials-id: '{ssh-credentials}'
151             scm-url: 'ssh://jenkins-releng@git.opendaylight.org:29418/PROJECT.git'
152             refspec: ''
153             branch: '{branch}'
154
155     wrappers:
156         - ssh-agent-credentials:
157             user: '{ssh-credentials}'
158
159     triggers:
160         - timed: 'H H * * *'
161
162     maven:
163         maven-name: '{mvn30}'
164         root-pom: 'pom.xml'
165         goals: 'MAVEN_GOALS'
166         maven-opts: 'MAVEN_OPTS'
167         settings: '{PROJECT-settings}'
168         global-settings: '{odl-global-settings}'
169
170     publishers:
171         - email-notification:
172             email-prefix: '[PROJECT]'
173         - sonar:
174             branch: 'origin/{branch}'
175             language: 'java'
176             maven-opts: 'MAVEN_OPTS'