Put cronjobs in order
[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 # A job to plot the result of cps performance test
149 - job-template:
150     name: 'onap-{project-name}-performance-tests-plots'
151     disabled_job_var: false
152     node: xerces-cps-hw
153     wipe_workspace: false
154
155     triggers:
156       - timed: '{timer}'
157
158     builders:
159       - shell:
160           !include-raw-escape: ./cps/prepare-performance-tests-data.sh
161
162     publishers:
163       - html-publisher:
164           name: "Performance Review"
165           dir: "."
166           files: "cpsStableTestsPerformanceReview.html,ncmpStableTestsPerformanceReview.html,cpsUnstableTestsPerformanceReview.html,ncmpUnstableTestsPerformanceReview.html"
167
168 # A job to trigger performance test which are based on K6 Framework on cps project
169 - job-template:
170     name: 'onap-{project-name}-performance-test-k6'
171     disabled_job_var: false
172     node: xerces-cps-hw
173     wipe_workspace: false
174
175     triggers:
176       - timed: '{timer}'
177
178     builders:
179       - shell:
180           !include-raw-escape: ./cps/k6-performance-tests-trigger.sh
181
182 # A job to plot the result of k6 cps performance test
183 - job-template:
184     name: 'onap-{project-name}-k6-performance-tests-plots'
185     disabled_job_var: false
186     node: xerces-cps-hw
187     wipe_workspace: false
188
189     triggers:
190       - timed: '{timer}'
191
192     builders:
193       - shell:
194           !include-raw-escape: ./cps/prepare-k6-performance-tests-plots.sh
195
196     publishers:
197       - html-publisher:
198           name: "K6 Performance Review"
199           dir: "."
200           files: "k6TestsPerformanceReview.html"
201
202 # A job to perform performance test which are based on Spock-Groovy Framework on cps project
203 - job-template:
204     name: 'onap-{project-name}-{stream}-performance-test-java'
205     disabled_job_var: false
206     node: xerces-cps-hw
207
208     disabled: '{obj:disabled_job_var}'
209     concurrent: true
210     mvn_settings_xml_version:
211     mvn_params:
212     mvn_version: 3.5.4
213     subdirectory:
214     properties:
215       - logrotate
216
217     parameters:
218       - project-parameters:
219           project: 'onap/{project}'
220           branch: '{branch}'
221       - nordix-gerrit-parameters
222       - string:
223           name: JAVA_HOME
224           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
225           description: Java home
226       - string:
227           name: MVN_VERSION
228           default: '{mvn_version}'
229           description: Maven version
230       - string:
231           name: MVN_URL
232           default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
233           description: URL to download Maven
234       - string:
235           name: MVN
236           default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
237           description: Path to mvn executable
238       - string:
239           name: MVN_SETTINGS_XML_VERSION
240           default: '{mvn_settings_xml_version}'
241           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.
242       - string:
243           name: MVN_PARAMS
244           default: '{mvn_params}'
245           description: Maven build parameters
246       - string:
247           name: SUBDIRECTORY
248           default: '{subdirectory}'
249           description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
250
251     scm:
252       - git-scm:
253           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
254           branch: '{branch}'
255           refspec: ''
256           wipe_workspace: true
257           clean_before: false
258
259     triggers:
260       - timed: '{timer}'
261       - gerrit:
262           server-name: 'Nordix Gerrit'
263           trigger-on:
264             - comment-added-contains-event:
265                 comment-contains-value: 'performance-test'
266           projects:
267             - project-compare-type: 'ANT'
268               project-pattern: 'onap/{project}'
269               branches:
270                 - branch-compare-type: 'ANT'
271                   branch-pattern: '**/{branch}'
272               file-paths:
273                 - compare-type: 'ANT'
274                   pattern: '**'
275
276     wrappers:
277       - build-timeout:
278           timeout: 45
279
280     builders:
281       - shell:
282           !include-raw-escape: ./verify-jobs.sh
283
284 # csits for diferent projects are different so need to have special handling
285 - job-template:
286     name: 'onap-policy-docker-{stream}-csit-java'
287     disabled_job_var: false
288     node: onap-ubuntu1804
289
290     disabled: '{obj:disabled_job_var}'
291     concurrent: true
292     properties:
293       - logrotate
294
295     parameters:
296       - project-parameters:
297           project: 'onap/{project}'
298           branch: '{branch}'
299       - nordix-gerrit-parameters
300       - string:
301           name: JAVA_HOME
302           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
303           description: Java home
304       - string:
305           name: CSIT_TEST_NAMES
306           default: '{csit_test_names}'
307           description: The name of the csits test to run
308     scm:
309       - git-scm-gerrit:
310           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
311           branch: 'master'
312           refspec: $GERRIT_REFSPEC
313           wipe_workspace: true
314           clean_before: false
315
316     triggers:
317       - nordix-gerrit-trigger-patchset-created:
318           project: 'onap/{project}'
319           branch: '{branch}'
320           files: '**'
321
322     wrappers:
323       - build-timeout:
324           timeout: 45
325
326     builders:
327       - 'wait-pkg-mgr-macro'
328       - shell:
329           !include-raw-escape: ./policy-docker-csit-jobs.sh