68c0fdf34f11eaa800e0952c8bee29942659feb6
[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 - job-template:
72     name: 'onap-{project-name}-{stream}-performance-test-java'
73     disabled_job_var: false
74     node: onap-ubuntu1804
75
76     disabled: '{obj:disabled_job_var}'
77     concurrent: true
78     mvn_settings_xml_version:
79     mvn_params:
80     mvn_version: 3.5.4
81     subdirectory:
82     properties:
83       - logrotate
84
85     parameters:
86       - project-parameters:
87           project: 'onap/{project}'
88           branch: '{branch}'
89       - nordix-gerrit-parameters
90       - string:
91           name: JAVA_HOME
92           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
93           description: Java home
94       - string:
95           name: MVN_VERSION
96           default: '{mvn_version}'
97           description: Maven version
98       - string:
99           name: MVN_URL
100           default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
101           description: URL to download Maven
102       - string:
103           name: MVN
104           default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
105           description: Path to mvn executable
106       - string:
107           name: MVN_SETTINGS_XML_VERSION
108           default: '{mvn_settings_xml_version}'
109           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.
110       - string:
111           name: MVN_PARAMS
112           default: '{mvn_params}'
113           description: Maven build parameters
114       - string:
115           name: SUBDIRECTORY
116           default: '{subdirectory}'
117           description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
118     scm:
119       - git-scm-gerrit:
120           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
121           branch: '{branch}'
122           refspec: ''
123           wipe_workspace: true
124           clean_before: false
125           choosing-strategy: 'default'
126
127     triggers:
128       - timed: '{timer}'
129       - gerrit:
130           server-name: 'Nordix Gerrit'
131           trigger-on:
132             - comment-added-contains-event:
133                 comment-contains-value: 'performance-test'
134           projects:
135             - project-compare-type: 'ANT'
136               project-pattern: 'onap/{project}'
137               branches:
138                 - branch-compare-type: 'ANT'
139                   branch-pattern: '**/{branch}'
140               file-paths:
141                 - compare-type: 'ANT'
142                   pattern: '**'
143
144     wrappers:
145       - build-timeout:
146           timeout: 45
147
148     builders:
149       - shell:
150           !include-raw-escape: ./verify-jobs.sh
151
152 # csits for diferent projects are different so need to have special handling
153 - job-template:
154     name: 'onap-policy-docker-{stream}-csit-java'
155     disabled_job_var: false
156     node: onap-ubuntu1804
157
158     disabled: '{obj:disabled_job_var}'
159     concurrent: true
160     properties:
161       - logrotate
162
163     parameters:
164       - project-parameters:
165           project: 'onap/{project}'
166           branch: '{branch}'
167       - nordix-gerrit-parameters
168       - string:
169           name: JAVA_HOME
170           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
171           description: Java home
172       - string:
173           name: CSIT_TEST_NAMES
174           default: '{csit_test_names}'
175           description: The name of the csits test to run
176     scm:
177       - git-scm-gerrit:
178           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
179           branch: 'master'
180           refspec: $GERRIT_REFSPEC
181           wipe_workspace: true
182           clean_before: false
183
184     triggers:
185       - nordix-gerrit-trigger-patchset-created:
186           project: 'onap/{project}'
187           branch: '{branch}'
188           files: '**'
189
190     wrappers:
191       - build-timeout:
192           timeout: 45
193
194     builders:
195       - 'wait-pkg-mgr-macro'
196       - shell:
197           !include-raw-escape: ./policy-docker-csit-jobs.sh