439038bc2c0d53b43e49defecb71e2f4426f301e
[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:
120           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
121           branch: '{branch}'
122           refspec: ''
123           wipe_workspace: true
124           clean_before: false
125
126     triggers:
127       - timed: '{timer}'
128       - gerrit:
129           server-name: 'Nordix Gerrit'
130           trigger-on:
131             - comment-added-contains-event:
132                 comment-contains-value: 'performance-test'
133           projects:
134             - project-compare-type: 'ANT'
135               project-pattern: 'onap/{project}'
136               branches:
137                 - branch-compare-type: 'ANT'
138                   branch-pattern: '**/{branch}'
139               file-paths:
140                 - compare-type: 'ANT'
141                   pattern: '**'
142
143     wrappers:
144       - build-timeout:
145           timeout: 45
146
147     builders:
148       - shell:
149           !include-raw-escape: ./verify-jobs.sh
150
151 # csits for diferent projects are different so need to have special handling
152 - job-template:
153     name: 'onap-policy-docker-{stream}-csit-java'
154     disabled_job_var: false
155     node: onap-ubuntu1804
156
157     disabled: '{obj:disabled_job_var}'
158     concurrent: true
159     properties:
160       - logrotate
161
162     parameters:
163       - project-parameters:
164           project: 'onap/{project}'
165           branch: '{branch}'
166       - nordix-gerrit-parameters
167       - string:
168           name: JAVA_HOME
169           default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
170           description: Java home
171       - string:
172           name: CSIT_TEST_NAMES
173           default: '{csit_test_names}'
174           description: The name of the csits test to run
175     scm:
176       - git-scm-gerrit:
177           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
178           branch: 'master'
179           refspec: $GERRIT_REFSPEC
180           wipe_workspace: true
181           clean_before: false
182
183     triggers:
184       - nordix-gerrit-trigger-patchset-created:
185           project: 'onap/{project}'
186           branch: '{branch}'
187           files: '**'
188
189     wrappers:
190       - build-timeout:
191           timeout: 45
192
193     builders:
194       - 'wait-pkg-mgr-macro'
195       - shell:
196           !include-raw-escape: ./policy-docker-csit-jobs.sh