3 name: '{project-name}-ci-jobs'
5 # This job group contains all the recommended jobs that should be deployed
15 name: '{project-name}-github-ci-jobs'
17 # This job group contains all the recommended jobs that should be deployed
18 # for any project ci that is using github.
28 name: '{project-name}-packer-jobs'
30 # This job group contains all the recommended jobs that should be deployed
31 # for any project ci that is using packer.
37 - gerrit-packer-verify
41 name: '{project-name}-github-packer-jobs'
43 # This job group contains all the recommended jobs that should be deployed
44 # for any project ci that is using packer.
50 - github-packer-verify
60 - config-file-provider:
63 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
65 - lf_jjb_file_paths: &lf_jjb_file_paths
66 name: lf-jjb-file-paths
73 - lf_packer_file_paths: &lf_packer_file_paths
74 name: lf-packer-file-paths
76 # Common files for all projects
78 pattern: 'packer/vars/{platforms}.json'
80 pattern: 'packer/templates/{templates}.json'
82 pattern: 'packer/provision/{templates}.sh'
84 pattern: 'packer/provision/lib/**'
86 - lf_jjb_merge_builders: &lf_jjb_merge_builders
87 name: lf-jjb-merge-builders
90 - shell: !include-raw-escape:
91 - ../shell/jjb-install.sh
92 - ../shell/jjb-merge-job.sh
94 - lf_jjb_verify_builders: &lf_jjb_verify_builders
95 name: lf-jjb-verfy-builders
98 - shell: !include-raw-escape:
99 - ../shell/git-validate-jira-urls.sh
100 - ../shell/jjb-install.sh
101 - ../shell/jjb-verify-job.sh
102 - ../shell/jjb-check-unicode.sh
103 - lf-infra-gpg-verify-git-signature
105 - lf_packer: &lf_packer_common
106 name: lf-packer-common
107 # Adds wrappers and parameters sections common to packer jobs.
111 jenkins-ssh-credential: '{jenkins-ssh-credential}'
114 - lf-infra-parameters:
118 - lf-infra-packer-parameters:
119 packer-version: '{packer-version}'
121 - lf_packer_merge_builders: &lf_packer_merge_builders
122 name: lf-packer-merge-builders
123 # Adds builders section common to merge packer jobs.
125 - lf-infra-packer-validate:
126 packer-version: '{packer-version}'
127 - lf-infra-packer-build:
128 platform: '{platforms}'
129 template: '{templates}'
130 packer-version: '{packer-version}'
132 - lf_packer_verify_builders: &lf_packer_verify_builders
133 # Adds builders section common to verify packer jobs.
134 name: lf-packer-verify-builders
136 - lf-infra-packer-validate:
137 packer-version: '{packer-version}'
140 name: lf-infra-jjb-parameters
144 default: '{jjb-version}'
145 description: Jenkins Job Builder version to download and install.
148 name: lf-infra-packer-parameters
152 default: '{packer-version}'
153 description: Packer version to download and install.
160 # JJB verify and merge jobs are the same except for their scm, trigger, and
161 # builders definition. This anchor is the common template
162 - lf_jjb_verify_merge: &lf_jjb_verify_merge
163 name: lf-jjb-verify-merge
164 project-type: freestyle
168 ######################
169 # Default parameters #
170 ######################
174 submodule-recursive: true
176 #####################
177 # Job Configuration #
178 #####################
181 - lf-infra-properties:
183 build-days-to-keep: 7
186 - lf-infra-parameters:
190 - lf-infra-jjb-parameters:
191 jjb-version: '{jjb-version}'
196 jenkins-ssh-credential: '{jenkins-ssh-credential}'
202 name: '{project-name}-jjb-merge'
204 <<: *lf_jjb_verify_merge
205 # yamllint disable-line rule:key-duplicates
206 <<: *lf_jjb_merge_builders
208 ######################
209 # Default parameters #
210 ######################
212 git-url: '$GIT_URL/$GERRIT_PROJECT'
214 #####################
215 # Job Configuration #
216 #####################
219 - lf-infra-gerrit-scm:
223 submodule-recursive: '{submodule-recursive}'
224 choosing-strategy: default
225 jenkins-ssh-credential: '{jenkins-ssh-credential}'
229 server-name: '{gerrit-server-name}'
231 - change-merged-event
232 - comment-added-contains-event:
233 comment-contains-value: remerge$
235 - project-compare-type: ANT
236 project-pattern: '{project}'
238 - branch-compare-type: ANT
239 branch-pattern: '**/{branch}'
240 <<: *lf_jjb_file_paths
243 name: '{project-name}-jjb-verify'
244 id: gerrit-jjb-verify
246 <<: *lf_jjb_verify_merge
247 # yamllint disable-line rule:key-duplicates
248 <<: *lf_jjb_verify_builders
250 ######################
251 # Default parameters #
252 ######################
254 git-url: '$GIT_URL/$GERRIT_PROJECT'
256 #####################
257 # Job Configuration #
258 #####################
261 - lf-infra-gerrit-scm:
263 refspec: '$GERRIT_REFSPEC'
264 branch: '$GERRIT_BRANCH'
265 submodule-recursive: '{submodule-recursive}'
266 choosing-strategy: gerrit
267 jenkins-ssh-credential: '{jenkins-ssh-credential}'
271 server-name: '{gerrit-server-name}'
273 - patchset-created-event:
274 exclude-drafts: false
275 exclude-trivial-rebase: false
276 exclude-no-code-change: false
277 - draft-published-event
278 - comment-added-contains-event:
279 comment-contains-value: recheck$
281 - project-compare-type: ANT
282 project-pattern: '{project}'
284 - branch-compare-type: ANT
285 branch-pattern: '**/{branch}'
286 <<: *lf_jjb_file_paths
289 name: '{project-name}-jjb-merge'
291 <<: *lf_jjb_verify_merge
292 # yamllint disable-line rule:key-duplicates
293 <<: *lf_jjb_merge_builders
295 #####################
296 # Job Configuration #
297 #####################
301 url: '{git-url}/{github-org}/{project}'
304 - lf-infra-github-scm:
305 url: '{git-clone-url}{github-org}/{project}'
308 submodule-recursive: '{submodule-recursive}'
309 choosing-strategy: default
310 jenkins-ssh-credential: '{jenkins-ssh-credential}'
316 - lf-infra-github-pr-trigger:
317 trigger-phrase: '^remerge$'
318 only-trigger-phrase: true
319 status-context: 'JJB Merge'
322 github-org: '{github-org}'
323 github_pr_whitelist: '{obj:github_pr_whitelist}'
324 github_pr_admin_list: '{obj:github_pr_admin_list}'
327 name: '{project-name}-jjb-verify'
328 id: github-jjb-verify
330 <<: *lf_jjb_verify_merge
331 # yamllint disable-line rule:key-duplicates
332 <<: *lf_jjb_verify_builders
334 #####################
335 # Job Configuration #
336 #####################
340 url: '{git-url}/{github-org}/{project}'
343 - lf-infra-github-scm:
344 url: '{git-clone-url}{github-org}/{project}'
345 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
347 submodule-recursive: '{submodule-recursive}'
348 choosing-strategy: default
349 jenkins-ssh-credential: '{jenkins-ssh-credential}'
352 - lf-infra-github-pr-trigger:
353 trigger-phrase: '^recheck$'
354 only-trigger-phrase: false
355 status-context: 'JJB Verify'
361 github_pr_admin_list:
365 name: '{project-name}-packer-merge-{platforms}-{templates}'
366 id: gerrit-packer-merge
368 <<: *lf_jjb_verify_merge
369 # yamllint disable-line rule:key-duplicates
370 <<: *lf_packer_common
371 # yamllint disable-line rule:key-duplicates
372 <<: *lf_packer_merge_builders
374 ######################
375 # Default parameters #
376 ######################
378 git-url: '$GIT_URL/$GERRIT_PROJECT'
380 #####################
381 # Job Configuration #
382 #####################
385 - lf-infra-gerrit-scm:
387 refspec: '$GERRIT_REFSPEC'
388 branch: '$GERRIT_BRANCH'
389 submodule-recursive: '{submodule-recursive}'
390 choosing-strategy: gerrit
391 jenkins-ssh-credential: '{jenkins-ssh-credential}'
395 server-name: '{gerrit-server-name}'
397 - change-merged-event
398 - comment-added-contains-event:
399 comment-contains-value: remerge$
401 - project-compare-type: ANT
402 project-pattern: '{project}'
404 - branch-compare-type: ANT
405 branch-pattern: '**/{branch}'
406 <<: *lf_packer_file_paths
409 name: '{project-name}-packer-verify'
410 id: gerrit-packer-verify
412 <<: *lf_jjb_verify_merge
413 # yamllint disable-line rule:key-duplicates
414 <<: *lf_packer_common
415 # yamllint disable-line rule:key-duplicates
416 <<: *lf_packer_verify_builders
418 ######################
419 # Default parameters #
420 ######################
422 git-url: '$GIT_URL/$GERRIT_PROJECT'
424 #####################
425 # Job Configuration #
426 #####################
429 - lf-infra-gerrit-scm:
431 refspec: '$GERRIT_REFSPEC'
432 branch: '$GERRIT_BRANCH'
433 submodule-recursive: '{submodule-recursive}'
434 choosing-strategy: gerrit
435 jenkins-ssh-credential: '{jenkins-ssh-credential}'
439 server-name: '{gerrit-server-name}'
441 - patchset-created-event:
442 exclude-drafts: false
443 exclude-trivial-rebase: false
444 exclude-no-code-change: false
445 - draft-published-event
446 - comment-added-contains-event:
447 comment-contains-value: recheck$
449 - project-compare-type: ANT
450 project-pattern: '{project}'
452 - branch-compare-type: ANT
453 branch-pattern: '**/{branch}'
454 <<: *lf_packer_file_paths
458 name: '{project-name}-packer-merge-{platforms}-{templates}'
459 id: github-packer-merge
461 <<: *lf_jjb_verify_merge
462 # yamllint disable-line rule:key-duplicates
463 <<: *lf_packer_common
464 # yamllint disable-line rule:key-duplicates
465 <<: *lf_packer_merge_builders
467 #####################
468 # Job Configuration #
469 #####################
473 url: '{git-url}/{github-org}/{project}'
476 - lf-infra-github-scm:
477 url: '{git-clone-url}{github-org}/{project}'
480 submodule-recursive: '{submodule-recursive}'
481 choosing-strategy: default
482 jenkins-ssh-credential: '{jenkins-ssh-credential}'
488 - lf-infra-github-pr-trigger:
489 trigger-phrase: '^remerge$'
490 only-trigger-phrase: true
491 status-context: 'Packer {platforms}-${templates} Merge'
494 github-org: '{github-org}'
495 github_pr_whitelist: '{obj:github_pr_whitelist}'
496 github_pr_admin_list: '{obj:github_pr_admin_list}'
499 name: '{project-name}-packer-verify'
500 id: github-packer-verify
502 <<: *lf_jjb_verify_merge
503 # yamllint disable-line rule:key-duplicates
504 <<: *lf_packer_common
505 # yamllint disable-line rule:key-duplicates
506 <<: *lf_packer_verify_builders
508 #####################
509 # Job Configuration #
510 #####################
514 url: '{git-url}/{github-org}/{project}'
517 - lf-infra-github-scm:
518 url: '{git-clone-url}{github-org}/{project}'
519 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
521 submodule-recursive: '{submodule-recursive}'
522 choosing-strategy: default
523 jenkins-ssh-credential: '{jenkins-ssh-credential}'
526 - lf-infra-github-pr-trigger:
527 trigger-phrase: '^recheck$'
528 only-trigger-phrase: false
529 status-context: 'Packer Verify'
535 github_pr_admin_list: