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.
109 ######################
110 # Default parameters #
111 ######################
117 build-timeout: '{build-timeout}'
118 jenkins-ssh-credential: '{jenkins-ssh-credential}'
121 - lf-infra-parameters:
125 - lf-infra-packer-parameters:
126 packer-version: '{packer-version}'
128 - lf_packer_merge_builders: &lf_packer_merge_builders
129 name: lf-packer-merge-builders
130 # Adds builders section common to merge packer jobs.
132 - lf-infra-packer-validate:
133 packer-version: '{packer-version}'
134 - lf-infra-packer-build:
135 platform: '{platforms}'
136 template: '{templates}'
137 packer-version: '{packer-version}'
139 - lf_packer_verify_builders: &lf_packer_verify_builders
140 # Adds builders section common to verify packer jobs.
141 name: lf-packer-verify-builders
143 - lf-infra-packer-validate:
144 packer-version: '{packer-version}'
147 name: lf-infra-jjb-parameters
151 default: '{jjb-version}'
152 description: Jenkins Job Builder version to download and install.
155 name: lf-infra-packer-parameters
159 default: '{packer-version}'
160 description: Packer version to download and install.
167 # JJB verify and merge jobs are the same except for their scm, trigger, and
168 # builders definition. This anchor is the common template
169 - lf_jjb_verify_merge: &lf_jjb_verify_merge
170 name: lf-jjb-verify-merge
171 project-type: freestyle
175 ######################
176 # Default parameters #
177 ######################
181 submodule-recursive: true
183 #####################
184 # Job Configuration #
185 #####################
188 - lf-infra-properties:
190 build-days-to-keep: 7
193 - lf-infra-parameters:
197 - lf-infra-jjb-parameters:
198 jjb-version: '{jjb-version}'
203 jenkins-ssh-credential: '{jenkins-ssh-credential}'
209 name: '{project-name}-jjb-merge'
211 <<: *lf_jjb_verify_merge
212 # yamllint disable-line rule:key-duplicates
213 <<: *lf_jjb_merge_builders
215 ######################
216 # Default parameters #
217 ######################
219 git-url: '$GIT_URL/$GERRIT_PROJECT'
221 #####################
222 # Job Configuration #
223 #####################
226 - lf-infra-gerrit-scm:
230 submodule-recursive: '{submodule-recursive}'
231 choosing-strategy: default
232 jenkins-ssh-credential: '{jenkins-ssh-credential}'
236 server-name: '{gerrit-server-name}'
238 - change-merged-event
239 - comment-added-contains-event:
240 comment-contains-value: remerge$
242 - project-compare-type: ANT
243 project-pattern: '{project}'
245 - branch-compare-type: ANT
246 branch-pattern: '**/{branch}'
247 <<: *lf_jjb_file_paths
250 name: '{project-name}-jjb-verify'
251 id: gerrit-jjb-verify
253 <<: *lf_jjb_verify_merge
254 # yamllint disable-line rule:key-duplicates
255 <<: *lf_jjb_verify_builders
257 ######################
258 # Default parameters #
259 ######################
261 git-url: '$GIT_URL/$GERRIT_PROJECT'
263 #####################
264 # Job Configuration #
265 #####################
268 - lf-infra-gerrit-scm:
270 refspec: '$GERRIT_REFSPEC'
271 branch: '$GERRIT_BRANCH'
272 submodule-recursive: '{submodule-recursive}'
273 choosing-strategy: gerrit
274 jenkins-ssh-credential: '{jenkins-ssh-credential}'
278 server-name: '{gerrit-server-name}'
280 - patchset-created-event:
281 exclude-drafts: false
282 exclude-trivial-rebase: false
283 exclude-no-code-change: false
284 - draft-published-event
285 - comment-added-contains-event:
286 comment-contains-value: recheck$
288 - project-compare-type: ANT
289 project-pattern: '{project}'
291 - branch-compare-type: ANT
292 branch-pattern: '**/{branch}'
293 <<: *lf_jjb_file_paths
296 name: '{project-name}-jjb-merge'
298 <<: *lf_jjb_verify_merge
299 # yamllint disable-line rule:key-duplicates
300 <<: *lf_jjb_merge_builders
302 #####################
303 # Job Configuration #
304 #####################
308 url: '{git-url}/{github-org}/{project}'
311 - lf-infra-github-scm:
312 url: '{git-clone-url}{github-org}/{project}'
315 submodule-recursive: '{submodule-recursive}'
316 choosing-strategy: default
317 jenkins-ssh-credential: '{jenkins-ssh-credential}'
323 - lf-infra-github-pr-trigger:
324 trigger-phrase: '^remerge$'
325 only-trigger-phrase: true
326 status-context: 'JJB Merge'
329 github-org: '{github-org}'
330 github_pr_whitelist: '{obj:github_pr_whitelist}'
331 github_pr_admin_list: '{obj:github_pr_admin_list}'
334 name: '{project-name}-jjb-verify'
335 id: github-jjb-verify
337 <<: *lf_jjb_verify_merge
338 # yamllint disable-line rule:key-duplicates
339 <<: *lf_jjb_verify_builders
341 #####################
342 # Job Configuration #
343 #####################
347 url: '{git-url}/{github-org}/{project}'
350 - lf-infra-github-scm:
351 url: '{git-clone-url}{github-org}/{project}'
352 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
354 submodule-recursive: '{submodule-recursive}'
355 choosing-strategy: default
356 jenkins-ssh-credential: '{jenkins-ssh-credential}'
359 - lf-infra-github-pr-trigger:
360 trigger-phrase: '^recheck$'
361 only-trigger-phrase: false
362 status-context: 'JJB Verify'
368 github_pr_admin_list:
372 name: '{project-name}-packer-merge-{platforms}-{templates}'
373 id: gerrit-packer-merge
375 <<: *lf_jjb_verify_merge
376 # yamllint disable-line rule:key-duplicates
377 <<: *lf_packer_common
378 # yamllint disable-line rule:key-duplicates
379 <<: *lf_packer_merge_builders
381 ######################
382 # Default parameters #
383 ######################
385 git-url: '$GIT_URL/$GERRIT_PROJECT'
387 #####################
388 # Job Configuration #
389 #####################
392 - lf-infra-gerrit-scm:
394 refspec: '$GERRIT_REFSPEC'
395 branch: '$GERRIT_BRANCH'
396 submodule-recursive: '{submodule-recursive}'
397 choosing-strategy: gerrit
398 jenkins-ssh-credential: '{jenkins-ssh-credential}'
402 server-name: '{gerrit-server-name}'
404 - change-merged-event
405 - comment-added-contains-event:
406 comment-contains-value: remerge$
408 - project-compare-type: ANT
409 project-pattern: '{project}'
411 - branch-compare-type: ANT
412 branch-pattern: '**/{branch}'
413 <<: *lf_packer_file_paths
416 name: '{project-name}-packer-verify'
417 id: gerrit-packer-verify
419 <<: *lf_jjb_verify_merge
420 # yamllint disable-line rule:key-duplicates
421 <<: *lf_packer_common
422 # yamllint disable-line rule:key-duplicates
423 <<: *lf_packer_verify_builders
425 ######################
426 # Default parameters #
427 ######################
430 git-url: '$GIT_URL/$GERRIT_PROJECT'
432 #####################
433 # Job Configuration #
434 #####################
437 - lf-infra-gerrit-scm:
439 refspec: '$GERRIT_REFSPEC'
440 branch: '$GERRIT_BRANCH'
441 submodule-recursive: '{submodule-recursive}'
442 choosing-strategy: gerrit
443 jenkins-ssh-credential: '{jenkins-ssh-credential}'
447 server-name: '{gerrit-server-name}'
449 - patchset-created-event:
450 exclude-drafts: false
451 exclude-trivial-rebase: false
452 exclude-no-code-change: false
453 - draft-published-event
454 - comment-added-contains-event:
455 comment-contains-value: recheck$
457 - project-compare-type: ANT
458 project-pattern: '{project}'
460 - branch-compare-type: ANT
461 branch-pattern: '**/{branch}'
462 <<: *lf_packer_file_paths
466 name: '{project-name}-packer-merge-{platforms}-{templates}'
467 id: github-packer-merge
469 <<: *lf_jjb_verify_merge
470 # yamllint disable-line rule:key-duplicates
471 <<: *lf_packer_common
472 # yamllint disable-line rule:key-duplicates
473 <<: *lf_packer_merge_builders
475 #####################
476 # Job Configuration #
477 #####################
481 url: '{git-url}/{github-org}/{project}'
484 - lf-infra-github-scm:
485 url: '{git-clone-url}{github-org}/{project}'
488 submodule-recursive: '{submodule-recursive}'
489 choosing-strategy: default
490 jenkins-ssh-credential: '{jenkins-ssh-credential}'
496 - lf-infra-github-pr-trigger:
497 trigger-phrase: '^remerge$'
498 only-trigger-phrase: true
499 status-context: 'Packer {platforms}-${templates} Merge'
502 github-org: '{github-org}'
503 github_pr_whitelist: '{obj:github_pr_whitelist}'
504 github_pr_admin_list: '{obj:github_pr_admin_list}'
507 name: '{project-name}-packer-verify'
508 id: github-packer-verify
510 <<: *lf_jjb_verify_merge
511 # yamllint disable-line rule:key-duplicates
512 <<: *lf_packer_common
513 # yamllint disable-line rule:key-duplicates
514 <<: *lf_packer_verify_builders
516 ######################
517 # Default parameters #
518 ######################
522 #####################
523 # Job Configuration #
524 #####################
528 url: '{git-url}/{github-org}/{project}'
531 - lf-infra-github-scm:
532 url: '{git-clone-url}{github-org}/{project}'
533 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
535 submodule-recursive: '{submodule-recursive}'
536 choosing-strategy: default
537 jenkins-ssh-credential: '{jenkins-ssh-credential}'
540 - lf-infra-github-pr-trigger:
541 trigger-phrase: '^recheck$'
542 only-trigger-phrase: false
543 status-context: 'Packer Verify'
549 github_pr_admin_list: