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