00b8b281a0b779d0cb9040ffa4c88ea35b9def2f
[infra/cicd.git] / jjb / onap / global-templates-onap-java.yaml
1 - job-template:
2     name: 'onap-{project-name}-{stream}-verify-java'
3     disabled_job_var: false
4     node: onap-ubuntu1804
5
6     disabled: '{obj:disabled_job_var}'
7     concurrent: true
8     mvn_settings_xml_version:
9     mvn_params:
10     mvn_version: 3.5.4
11     subdirectory:
12     properties:
13       - logrotate
14
15     parameters:
16       - project-parameters:
17           project: 'onap/{project}'
18           branch: '{branch}'
19       - nordix-gerrit-parameters
20       - string:
21           name: JAVA_HOME
22           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
23           description: Java home
24       - string:
25           name: MVN_VERSION
26           default: '{mvn_version}'
27           description: Maven version
28       - string:
29           name: MVN_URL
30           default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
31           description: URL to download Maven
32       - string:
33           name: MVN
34           default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
35           description: Path to mvn executable
36       - string:
37           name: MVN_SETTINGS_XML_VERSION
38           default: '{mvn_settings_xml_version}'
39           description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
40       - string:
41           name: MVN_PARAMS
42           default: '{mvn_params}'
43           description: Maven build parameters
44       - string:
45           name: SUBDIRECTORY
46           default: '{subdirectory}'
47           description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
48
49     scm:
50       - git-scm-gerrit:
51           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
52           branch: '{branch}'
53           refspec: $GERRIT_REFSPEC
54           wipe_workspace: true
55           clean_before: false
56
57     triggers:
58       - nordix-gerrit-trigger-patchset-created:
59           project: 'onap/{project}'
60           branch: '{branch}'
61           files: '**'
62
63     wrappers:
64       - build-timeout:
65           timeout: 45
66
67     builders:
68       - shell:
69           !include-raw-escape: ./verify-jobs.sh
70
71 # A job to perform CSIT on policy components
72 - job-template:
73     name: 'onap-{project-name}-{stream}-policy-csit-verify-java'
74     disabled_job_var: false
75     node: onap-ubuntu1804
76
77     disabled: '{obj:disabled_job_var}'
78     concurrent: true
79     mvn_settings_xml_version:
80     mvn_params:
81     mvn_version: 3.5.4
82     subdirectory:
83     properties:
84       - logrotate
85
86     parameters:
87       - project-parameters:
88           project: 'onap/{project}'
89           branch: '{branch}'
90       - nordix-gerrit-parameters
91       - string:
92           name: JAVA_HOME
93           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
94           description: Java home
95       - string:
96           name: MVN_VERSION
97           default: '{mvn_version}'
98           description: Maven version
99       - string:
100           name: MVN_URL
101           default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
102           description: URL to download Maven
103       - string:
104           name: MVN
105           default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
106           description: Path to mvn executable
107       - string:
108           name: MVN_SETTINGS_XML_VERSION
109           default: '{mvn_settings_xml_version}'
110           description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
111       - string:
112           name: MVN_PARAMS
113           default: '{mvn_params}'
114           description: Maven build parameters
115       - string:
116           name: CSIT_NAME
117           default: '{csit-name}'
118           description: The name of the csit-test to run
119       - string:
120           name: SUBDIRECTORY
121           default: '{subdirectory}'
122           description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
123
124     scm:
125       - git-scm-gerrit:
126           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
127           branch: '{branch}'
128           refspec: $GERRIT_REFSPEC
129           wipe_workspace: true
130           clean_before: false
131
132     triggers:
133       - nordix-gerrit-trigger-patchset-created:
134           project: 'onap/{project}'
135           branch: '{branch}'
136           files: '**'
137
138     wrappers:
139       - build-timeout:
140           timeout: 45
141
142     builders:
143       - shell:
144           !include-raw-escape: ./verify-jobs.sh
145       - shell:
146           !include-raw-escape: ./verify-policy-csit.sh
147
148 - job-template:
149     name: 'onap-{project-name}-performance-tests-plots'
150     disabled_job_var: false
151     node: xerces-cps-hw
152     wipe_workspace: false
153
154     triggers:
155       - timed: '{timer}'
156
157     builders:
158       - shell:
159           !include-raw-escape: ./cps/prepare-performance-tests-data.sh
160
161     publishers:
162       - html-publisher:
163           name: "Performance Review"
164           dir: "."
165           files: "index.html,createOperation.html,readOperation.html,updateOperation.html,deleteOperation.html"
166
167 - job-template:
168     name: 'onap-{project-name}-{stream}-performance-test-java'
169     disabled_job_var: false
170     node: xerces-cps-hw
171
172     disabled: '{obj:disabled_job_var}'
173     concurrent: true
174     mvn_settings_xml_version:
175     mvn_params:
176     mvn_version: 3.5.4
177     subdirectory:
178     properties:
179       - logrotate
180
181     parameters:
182       - project-parameters:
183           project: 'onap/{project}'
184           branch: '{branch}'
185       - nordix-gerrit-parameters
186       - string:
187           name: JAVA_HOME
188           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
189           description: Java home
190       - string:
191           name: MVN_VERSION
192           default: '{mvn_version}'
193           description: Maven version
194       - string:
195           name: MVN_URL
196           default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
197           description: URL to download Maven
198       - string:
199           name: MVN
200           default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
201           description: Path to mvn executable
202       - string:
203           name: MVN_SETTINGS_XML_VERSION
204           default: '{mvn_settings_xml_version}'
205           description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
206       - string:
207           name: MVN_PARAMS
208           default: '{mvn_params}'
209           description: Maven build parameters
210       - string:
211           name: SUBDIRECTORY
212           default: '{subdirectory}'
213           description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
214
215     scm:
216       - git-scm:
217           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
218           branch: '{branch}'
219           refspec: ''
220           wipe_workspace: true
221           clean_before: false
222
223     triggers:
224       - timed: '{timer}'
225       - gerrit:
226           server-name: 'Nordix Gerrit'
227           trigger-on:
228             - comment-added-contains-event:
229                 comment-contains-value: 'performance-test'
230           projects:
231             - project-compare-type: 'ANT'
232               project-pattern: 'onap/{project}'
233               branches:
234                 - branch-compare-type: 'ANT'
235                   branch-pattern: '**/{branch}'
236               file-paths:
237                 - compare-type: 'ANT'
238                   pattern: '**'
239
240     wrappers:
241       - build-timeout:
242           timeout: 45
243
244     builders:
245       - shell:
246           !include-raw-escape: ./verify-jobs.sh
247
248 # csits for diferent projects are different so need to have special handling
249 - job-template:
250     name: 'onap-policy-docker-{stream}-csit-java'
251     disabled_job_var: false
252     node: onap-ubuntu1804
253
254     disabled: '{obj:disabled_job_var}'
255     concurrent: true
256     properties:
257       - logrotate
258
259     parameters:
260       - project-parameters:
261           project: 'onap/{project}'
262           branch: '{branch}'
263       - nordix-gerrit-parameters
264       - string:
265           name: JAVA_HOME
266           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
267           description: Java home
268       - string:
269           name: CSIT_TEST_NAMES
270           default: '{csit_test_names}'
271           description: The name of the csits test to run
272     scm:
273       - git-scm-gerrit:
274           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
275           branch: 'master'
276           refspec: $GERRIT_REFSPEC
277           wipe_workspace: true
278           clean_before: false
279
280     triggers:
281       - nordix-gerrit-trigger-patchset-created:
282           project: 'onap/{project}'
283           branch: '{branch}'
284           files: '**'
285
286     wrappers:
287       - build-timeout:
288           timeout: 45
289
290     builders:
291       - 'wait-pkg-mgr-macro'
292       - shell:
293           !include-raw-escape: ./policy-docker-csit-jobs.sh