[ELIOT]Add verify job
[ci-management.git] / jjb / akraino-templates / akraino-jjb-templates.yaml
1 ---
2 #
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
7 #
8 # You may obtain a copy of the License at
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 - job-template:
18     id: akraino-project-stream-release-config
19     name: '{project}-{stream}-release-config'
20
21     ######################
22     # Default parameters #
23     ######################
24
25     archive-artifacts: >
26       **/*.log
27       **/hs_err_*.log
28       **/target/**/feature.xml
29       **/target/failsafe-reports/failsafe-summary.xml
30       **/target/surefire-reports/*-output.txt
31     build-days-to-keep: 30
32     build-timeout: 60
33     java-version: openjdk8
34     maven-repo-url: '$NEXUS_URL/content/repositories/snapshots'
35     mvn-global-settings: global-settings
36     mvn-opts: ''
37     mvn-params: ''
38     mvn-version: mvn35
39     nexus-shapshot-repo: snapshots
40     repo-id: snapshots
41     staging-profile-id: ''  # Unused by this job.
42     stream: master
43     submodule-recursive: true
44     upload-files-dir: /tmp/tardir
45
46     #####################
47     # Job Configuration #
48     #####################
49
50     project-type: freestyle
51     node: '{build-node}'
52
53     properties:
54       - lf-infra-properties:
55           build-days-to-keep: '{build-days-to-keep}'
56
57     parameters:
58       - lf-infra-parameters:
59           project: '{project}'
60           branch: '{branch}'
61           stream: '{stream}'
62           lftools-version: '{lftools-version}'
63       - lf-infra-maven-parameters:
64           mvn-opts: '{mvn-opts}'
65           mvn-params: '{mvn-params}'
66           mvn-version: '{mvn-version}'
67           # Staging repos do not make sense for CLM jobs so set it blank.
68           staging-profile-id: '{staging-profile-id}'
69       - string:
70           name: ARCHIVE_ARTIFACTS
71           default: '{archive-artifacts}'
72           description: Artifacts to archive to the logs server.
73       - string:
74           name: UPLOAD_FILES_PATH
75           default: '{upload-files-dir}'
76           description: File path to generate tarball and upload to repository.
77
78     wrappers:
79       - lf-infra-wrappers:
80           build-timeout: '{build-timeout}'
81           jenkins-ssh-credential: '{jenkins-ssh-credential}'
82
83     gerrit_merge_triggers:
84       - change-merged-event
85       - comment-added-contains-event:
86           comment-contains-value: remerge$
87
88     gerrit_trigger_file_paths:
89       - compare-type: REG_EXP
90         pattern: '.*'
91
92     scm:
93       - lf-infra-gerrit-scm:
94           jenkins-ssh-credential: '{jenkins-ssh-credential}'
95           git-url: '{git-url}/{project}.git'
96           refspec: '{refspec}'
97           branch: '{branch}'
98           submodule-recursive: '{submodule-recursive}'
99           submodule-timeout: '{submodule-timeout}'
100           choosing-strategy: default
101
102     triggers:
103       - timed: '{obj:cron}'
104       - gerrit:
105           server-name: '{gerrit-server-name}'
106           trigger-on: '{obj:gerrit_merge_triggers}'
107           projects:
108             - project-compare-type: ANT
109               project-pattern: '{project}'
110               branches:
111                 - branch-compare-type: ANT
112                   branch-pattern: '**/{branch}'
113               file-paths: '{obj:gerrit_trigger_file_paths}'
114
115     builders:
116       - lf-infra-pre-build
117       - lf-maven-install:
118           mvn-version: '{mvn-version}'
119       - lf-update-java-alternatives:
120           java-version: '{java-version}'
121       - lf-provide-maven-settings:
122           global-settings-file: '{mvn-global-settings}'
123           settings-file: '{mvn-settings}'
124       - shell: !include-raw-escape:
125           - ../shell/make-tar.sh
126       - lf-infra-deploy-maven-file:
127           global-settings-file: '{mvn-global-settings}'
128           settings-file: '{mvn-settings}'
129           mvn-version: '{mvn-version}'
130           repo-id: '{repo-id}'
131           group-id: '{group-id}'
132           upload-files-dir: '{upload-files-dir}'
133           maven-repo-url: '{maven-repo-url}'
134
135     publishers:
136       - lf-infra-publish
137
138
139 - job-template:
140     id: akraino-project-stream-stage-config
141     name: '{project}-{stream}-stage-config'
142
143     ######################
144     # Default parameters #
145     ######################
146
147     archive-artifacts: >
148       **/*.log
149       **/hs_err_*.log
150       **/target/**/feature.xml
151       **/target/failsafe-reports/failsafe-summary.xml
152       **/target/surefire-reports/*-output.txt
153     build-days-to-keep: 14
154     build-timeout: 60
155     cron: '@daily'
156     disable-job: false
157     git-url: '$GIT_URL/$PROJECT'
158     github-url: 'https://github.com'
159     java-version: openjdk8
160     mvn-global-settings: global-settings
161     mvn-goals: clean deploy
162     mvn-opts: ''
163     mvn-params: ''
164     mvn-version: mvn35
165     sign-artifacts: false
166     stream: master
167     submodule-recursive: true
168     upload-files-dir: m2repo  # expected by "lftools deploy nexus-stage"
169
170     #####################
171     # Job Configuration #
172     #####################
173
174     project-type: freestyle
175     node: '{build-node}'
176
177     properties:
178       - lf-infra-properties:
179           build-days-to-keep: '{build-days-to-keep}'
180
181     parameters:
182       - lf-infra-parameters:
183           project: '{project}'
184           branch: '{branch}'
185           stream: '{stream}'
186           lftools-version: '{lftools-version}'
187       - lf-infra-maven-parameters:
188           mvn-opts: '{mvn-opts}'
189           mvn-params: '{mvn-params}'
190           mvn-version: '{mvn-version}'
191           staging-profile-id: '{staging-profile-id}'
192       - string:
193           name: ARCHIVE_ARTIFACTS
194           default: '{archive-artifacts}'
195           description: Artifacts to archive to the logs server.
196       - string:
197           name: UPLOAD_FILES_PATH
198           default: '{upload-files-dir}'
199           description: File path to generate tarball and upload to repository.
200       - string:
201           name: STAGING_PROFILE_ID
202           default: '{staging-profile-id}'
203           description: Nexus staging profile ID.
204       - string:
205           name: STAGING_BUILD
206           default: 'true'
207           description: Mark this as a staging build.
208
209     wrappers:
210       - lf-infra-wrappers:
211           build-timeout: '{build-timeout}'
212           jenkins-ssh-credential: '{jenkins-ssh-credential}'
213
214     gerrit_release_triggers:
215       - comment-added-contains-event:
216           comment-contains-value: stage-release$
217
218     disabled: '{disable-job}'
219
220     scm:
221       - lf-infra-gerrit-scm:
222           jenkins-ssh-credential: '{jenkins-ssh-credential}'
223           git-url: '{git-url}'
224           refspec: '$GERRIT_REFSPEC'
225           branch: '$GERRIT_BRANCH'
226           submodule-recursive: '{submodule-recursive}'
227           submodule-timeout: '{submodule-timeout}'
228           choosing-strategy: default
229
230     triggers:
231       - timed: '{obj:cron}'
232       - gerrit:
233           server-name: '{gerrit-server-name}'
234           trigger-on: '{obj:gerrit_release_triggers}'
235           projects:
236             - project-compare-type: ANT
237               project-pattern: '{project}'
238               branches:
239                 - branch-compare-type: ANT
240                   branch-pattern: '**/{branch}'
241
242     builders:
243       - lf-infra-pre-build
244       - lf-jacoco-nojava-workaround
245       - lf-maven-install:
246           mvn-version: '{mvn-version}'
247       - lf-update-java-alternatives:
248           java-version: '{java-version}'
249       - lf-provide-maven-settings:
250           global-settings-file: '{mvn-global-settings}'
251           settings-file: '{mvn-settings}'
252       - lf-infra-create-netrc:
253           server-id: '{mvn-staging-id}'
254       - shell: !include-raw-escape:
255           - ../shell/make-tar.sh
256       - lf-sigul-sign-dir:
257           sign-artifacts: '{sign-artifacts}'
258           sign-dir: '$WORKSPACE/m2repo'
259       - lf-maven-stage
260       - lf-provide-maven-settings-cleanup
261
262     publishers:
263       - lf-infra-publish
264
265 - job-template:
266     id: akraino-project-stream-verify
267     name: '{project}-{stream}-verify'
268     archive-artifacts: >
269       **/*.log
270     build-days-to-keep: 30
271     build-timeout: 60
272     stream: master
273     project-type: freestyle
274     submodule-recursive: true
275     node: '{build-node}'
276
277     properties:
278       - lf-infra-properties:
279           build-days-to-keep: '{build-days-to-keep}'
280
281     parameters:
282       - lf-infra-parameters:
283           project: '{project}'
284           branch: '{branch}'
285           stream: '{stream}'
286           lftools-version: '{lftools-version}'
287
288       - string:
289           name: ARCHIVE_ARTIFACTS
290           default: '{archive-artifacts}'
291           description: Artifacts to archive to the logs server.
292
293     wrappers:
294       - lf-infra-wrappers:
295           build-timeout: '{build-timeout}'
296           jenkins-ssh-credential: '{jenkins-ssh-credential}'
297
298     scm:
299       - lf-infra-gerrit-scm:
300           jenkins-ssh-credential: '{jenkins-ssh-credential}'
301           git-url: '{git-url}/{project}.git'
302           refspec: '{refspec}'
303           branch: '{branch}'
304           submodule-recursive: '{submodule-recursive}'
305           submodule-timeout: '{submodule-timeout}'
306           choosing-strategy: default
307
308     triggers:
309       - gerrit:
310           server-name: '{gerrit-server-name}'
311           trigger-on:
312             - patchset-created-event:
313                 exclude-drafts: 'false'
314                 exclude-trivial-rebase: 'false'
315                 exclude-no-code-change: 'false'
316             - change-merged-event
317             - draft-published-event
318             - comment-added-contains-event:
319                 comment-contains-value: remerge$
320             - comment-added-contains-event:
321                 comment-contains-value: 'recheck'
322             - comment-added-contains-event:
323                 comment-contains-value: 'reverify'
324           projects:
325             - project-compare-type: 'ANT'
326               project-pattern: '{project}'
327               branches:
328                 - branch-compare-type: 'ANT'
329                   branch-pattern: '**/{branch}'
330               file-paths:
331                 - compare-type: ANT
332                   pattern: '**/*'
333               disable-strict-forbidden-file-verification: 'true'
334               forbidden-file-paths:
335                 - compare-type: ANT
336                   pattern: 'docs/**'
337           readable-message: true
338
339
340
341     builders:
342       - shell: !include-raw-escape:
343           - ../shell/eliot-verify.sh
344
345     publishers:
346       - lf-infra-publish