hc2vpp.yaml revision e0033529
1---
2- project:
3    name: hc2vpp
4    jobs:
5      - 'hc2vpp-verify-{stream}-{os}'
6      - 'hc2vpp-merge-{stream}-{os}'
7      - 'hc2vpp-integration-{stream}-{os}'
8      - 'hc2vpp-verify-image-{stream}-{os}'
9    project: 'hc2vpp'
10    os:
11      - ubuntu1804:
12          repo-os-part: 'ubuntu.bionic.main'
13          skip-site: 'false'
14          skip-jar-deploy: 'false'
15      - ubuntu1604:
16          repo-os-part: 'ubuntu.xenial.main'
17          skip-site: 'true'
18          skip-jar-deploy: 'true'
19      - centos7:
20          repo-os-part: 'centos7'
21          skip-site: 'true'
22          skip-jar-deploy: 'true'
23    stream:
24      - master:
25          branch: 'master'
26          repo-stream-part: 'master'
27      - '1807':
28          branch: 'stable/1807'
29          repo-stream-part: 'stable.1807'
30      - '1810':
31          branch: 'stable/1810'
32          repo-stream-part: 'stable.1810'
33      - '1901':
34          branch: 'stable/1901'
35          repo-stream-part: 'stable.1901'
36
37- project:
38    name: hc2vpp-view
39    views:
40      - project-view
41    project-name: hc2vpp
42
43- job-template:
44    name: 'hc2vpp-verify-{stream}-{os}'
45    project-type: maven
46    node: '{os}-basebuild-4c-4g'
47    concurrent: true
48    jdk: openjdk8-{os}
49
50    build-discarder:
51      daysToKeep: '{build-days-to-keep}'
52      numToKeep: '{build-num-to-keep}'
53      artifactDaysToKeep: '{build-artifact-days-to-keep}'
54      artifactNumToKeep: '{build-artifact-num-to-keep}'
55
56    parameters:
57      - project-parameter:
58          project: '{project}'
59      - gerrit-parameter:
60          branch: '{branch}'
61      - os-parameter:
62          os: '{os}'
63
64    scm:
65      - gerrit-trigger-scm:
66          credentials-id: 'jenkins-gerrit-credentials'
67          refspec: '$GERRIT_REFSPEC'
68          choosing-strategy: 'gerrit'
69
70    wrappers:
71      - fdio-infra-wrappers:
72          build-timeout: '{build-timeout}'
73
74    triggers:
75      - gerrit-trigger-patch-submitted:
76          name: 'hc2vpp'
77          branch: '{branch}'
78
79    maven:
80      maven-name: 'mvn33-new'
81      root-pom: 'pom.xml'
82      # yamllint disable-line rule:line-length
83      goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge site'
84      maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
85      settings: 'hc2vpp-settings'
86      settings-type: cfp
87      global-settings: 'global-settings'
88      global-settings-type: cfp
89
90    publishers:
91      - email-notification:
92          email-prefix: '[hc2vpp]'
93      - fdio-infra-shiplogs:
94          maven-version: 'mvn33-new'
95
96- job-template:
97    name: 'hc2vpp-verify-image-{stream}-{os}'
98    project-type: maven
99    node: '{os}-basebuild-4c-4g'
100    concurrent: true
101    jdk: openjdk8-{os}
102
103    build-discarder:
104      daysToKeep: '{build-days-to-keep}'
105      numToKeep: '{build-num-to-keep}'
106      artifactDaysToKeep: '{build-artifact-days-to-keep}'
107      artifactNumToKeep: '{build-artifact-num-to-keep}'
108
109    parameters:
110      - project-parameter:
111          project: '{project}'
112      - gerrit-parameter:
113          branch: '{branch}'
114      - os-parameter:
115          os: '{os}'
116
117    scm:
118      - gerrit-trigger-scm:
119          credentials-id: 'jenkins-gerrit-credentials'
120          refspec: '$GERRIT_REFSPEC'
121          choosing-strategy: 'gerrit'
122
123    wrappers:
124      - fdio-infra-wrappers:
125          build-timeout: '{build-timeout}'
126
127    triggers:
128      - gerrit:
129          server-name: 'Primary'
130          trigger-on:
131            - comment-added-contains-event:
132                comment-contains-value: 'verify-images'
133          projects:
134            - project-compare-type: 'ANT'
135              project-pattern: '{project}'
136              branches:
137                - branch-compare-type: 'ANT'
138                  branch-pattern: '**/{branch}'
139          skip-vote:
140            successful: true
141            failed: true
142            unstable: true
143            notbuilt: true
144
145    maven:
146      maven-name: 'mvn33-new'
147      root-pom: 'pom.xml'
148      # yamllint disable-line rule:line-length
149      goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge'
150      maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
151      settings: 'hc2vpp-settings'
152      settings-type: cfp
153      global-settings: 'global-settings'
154      global-settings-type: cfp
155
156    publishers:
157      - email-notification:
158          email-prefix: '[hc2vpp]'
159      - fdio-infra-shiplogs:
160          maven-version: 'mvn33-new'
161
162- job-template:
163    name: 'hc2vpp-merge-{stream}-{os}'
164    project-type: maven
165    node: '{os}-basebuild-4c-4g'
166    jdk: openjdk8-{os}
167
168    build-discarder:
169      daysToKeep: '{build-days-to-keep}'
170      numToKeep: '{build-num-to-keep}'
171      artifactDaysToKeep: '{build-artifact-days-to-keep}'
172      artifactNumToKeep: '{build-artifact-num-to-keep}'
173
174    parameters:
175      - project-parameter:
176          project: '{project}'
177      - os-parameter:
178          os: '{os}'
179      - maven-project-parameter:
180          maven: 'mvn33-new'
181      - maven-exec:
182          maven-version: 'mvn33-new'
183      - repo-name-parameter:
184          repo-name: '{repo-stream-part}.{repo-os-part}'
185
186    scm:
187      - gerrit-trigger-scm:
188          credentials-id: 'jenkins-gerrit-credentials'
189          refspec: ''
190          choosing-strategy: 'default'
191
192    wrappers:
193      - ssh-agent-credentials:
194          users:
195            - 'jenkins-gerrit-credentials'
196      - fdio-infra-wrappers:
197          build-timeout: '{build-timeout}'
198
199    triggers:
200      - gerrit-trigger-patch-merged:
201          name: 'hc2vpp'
202          branch: '{branch}'
203
204    maven:
205      maven-name: 'mvn33-new'
206      root-pom: 'pom.xml'
207      # yamllint disable-line rule:line-length
208      goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge -Dsonar -Ddocs.hc.folder=io/fd/hc2vpp -Dmaven.site.skip={skip-site} site -Dmaven.site.deploy.skip={skip-site} site:deploy'
209      maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
210      settings: 'hc2vpp-settings'
211      settings-type: cfp
212      global-settings: 'global-settings'
213      global-settings-type: cfp
214
215    reporters:
216      - findbugs
217
218    publishers:
219      - sonar:
220          jdk: 'openjdk8-{os}'
221          language: 'java'
222          branch: '{stream}'
223      - email-notification:
224        email-prefix: '[hc2vpp]'
225      - fdio-infra-shiplogs:
226          maven-version: 'mvn33-new'
227
228- job-template:
229    name: 'hc2vpp-integration-{stream}-{os}'
230    project-type: maven
231    node: '{os}-basebuild-4c-4g'
232    jdk: openjdk8-{os}
233
234    build-discarder:
235      daysToKeep: '{build-days-to-keep}'
236      numToKeep: '{build-num-to-keep}'
237      artifactDaysToKeep: '{build-artifact-days-to-keep}'
238      artifactNumToKeep: '{build-artifact-num-to-keep}'
239
240    parameters:
241      - project-parameter:
242          project: '{project}'
243      - os-parameter:
244          os: '{os}'
245      - stream-parameter:
246          stream: '{stream}'
247      - maven-project-parameter:
248          maven: 'mvn33-new'
249      - maven-exec:
250          maven-version: 'mvn33-new'
251      - repo-name-parameter:
252          repo-name: '{repo-stream-part}.{repo-os-part}'
253      - string:
254          name: SKIP_JAR_DEPLOY
255          default: '{skip-jar-deploy}'
256          # yamllint disable-line rule:line-length
257          description: "Skips deployment of hc2vpp jars if variable is set to true"
258
259    scm:
260      - git-scm:
261          credentials-id: 'jenkins-gerrit-credentials'
262          refspec: ''
263          branch: '{branch}'
264
265    wrappers:
266      - ssh-agent-credentials:
267          users:
268            - 'jenkins-gerrit-credentials'
269      - fdio-infra-wrappers:
270          build-timeout: '{build-timeout}'
271
272    triggers:
273      - reverse:
274          jobs: 'jvpp-merge-{stream}-{os},hc2vpp-merge-{stream}-{os}'
275          result: 'success'
276
277    prebuilders:
278      - config-file-provider:
279          files:
280            - file-id: '.packagecloud'
281              target: '/home/jenkins'
282      - config-file-provider:
283          files:
284            - file-id: 'packagecloud_api'
285              target: '/home/jenkins'
286
287      - shell:
288          !include-raw-escape: include-raw-hc2vpp-integration-prebuild.sh
289    maven:
290      maven-name: 'mvn33-new'
291      root-pom: 'pom.xml'
292      # yamllint disable-line rule:line-length
293      goals: 'clean install -V -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r  -Dmerge'
294      maven-opts: '-Xmx2048m -Dmaven.compile.fork=true'
295      settings: 'hc2vpp-settings'
296      settings-type: cfp
297      global-settings: 'global-settings'
298      global-settings-type: cfp
299
300    postbuilders:
301      - maven-target:
302          maven-version: 'mvn33-new'
303          goals: '--version'
304          settings: 'hc2vpp-settings'
305          settings-type: cfp
306          global-settings: 'global-settings'
307          global-settings-type: cfp
308      - provide-maven-settings:
309          settings-file: 'hc2vpp-settings'
310          global-settings-file: 'global-settings'
311      - shell:
312          !include-raw-escape:
313          - ../scripts/maven_push_functions.sh
314          - include-raw-hc2vpp-pkg-push.sh
315      - shell:
316          !include-raw-escape:
317          - ../scripts/packagecloud_push.sh
318    reporters:
319      - findbugs
320
321    publishers:
322      - email-notification:
323          email-prefix: '[hc2vpp]'
324      - maven-deploy:
325          id: ''
326          unique-version: true
327          deploy-unstable: false
328          release-env-var: SKIP_JAR_DEPLOY
329      - fdio-infra-shiplogs:
330          maven-version: 'mvn33-new'
331