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
59 - config-file-provider:
62 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
64 - lf_jjb_file_paths: &lf_jjb_file_paths
65 name: lf-jjb-file-paths
72 - lf_packer_file_paths: &lf_packer_file_paths
73 name: lf-packer-file-paths
75 # Common files for all projects
77 pattern: 'packer/vars/{platforms}.json'
79 pattern: 'packer/templates/{templates}.json'
81 pattern: 'packer/provision/{templates}.sh'
83 pattern: 'packer/provision/lib/**'
85 - lf_packer: &lf_packer_common
86 name: lf-packer-common
87 # Adds wrappers and parameters sections common to packer jobs.
89 ######################
90 # Default parameters #
91 ######################
94 packer-cloud-settings: packer-cloud-env
98 build-timeout: '{build-timeout}'
99 jenkins-ssh-credential: '{jenkins-ssh-credential}'
102 - lf-infra-parameters:
106 lftools-version: '{lftools-version}'
107 - lf-infra-packer-parameters:
108 packer-version: '{packer-version}'
111 name: lf-infra-jjb-parameters
115 default: '{jjb-version}'
116 description: Jenkins Job Builder version to download and install.
119 name: lf-infra-packer-parameters
123 default: '{packer-version}'
124 description: Packer version to download and install.
126 - lf_jjb_common: &lf_jjb_common
128 project-type: freestyle
132 ######################
133 # Default parameters #
134 ######################
138 submodule-recursive: true
140 #####################
141 # Job Configuration #
142 #####################
145 - lf-infra-properties:
147 build-days-to-keep: 7
150 - lf-infra-parameters:
154 lftools-version: '{lftools-version}'
155 - lf-infra-jjb-parameters:
156 jjb-version: '{jjb-version}'
161 jenkins-ssh-credential: '{jenkins-ssh-credential}'
170 - lf_jjb_merge_builders: &lf_jjb_merge_builders
171 name: lf-jjb-merge-builders
174 - shell: !include-raw-escape:
175 - ../shell/jjb-install.sh
176 - ../shell/jjb-merge-job.sh
179 name: '{project-name}-jjb-merge'
182 # yamllint disable-line rule:key-duplicates
183 <<: *lf_jjb_merge_builders
185 ######################
186 # Default parameters #
187 ######################
189 git-url: '$GIT_URL/$GERRIT_PROJECT'
191 gerrit_merge_triggers:
192 - change-merged-event
193 - comment-added-contains-event:
194 comment-contains-value: remerge$
196 #####################
197 # Job Configuration #
198 #####################
201 - lf-infra-gerrit-scm:
205 submodule-recursive: '{submodule-recursive}'
206 choosing-strategy: default
207 jenkins-ssh-credential: '{jenkins-ssh-credential}'
211 server-name: '{gerrit-server-name}'
212 trigger-on: '{obj:gerrit_merge_triggers}'
214 - project-compare-type: ANT
215 project-pattern: '{project}'
217 - branch-compare-type: ANT
218 branch-pattern: '**/{branch}'
219 <<: *lf_jjb_file_paths
222 name: '{project-name}-jjb-merge'
225 # yamllint disable-line rule:key-duplicates
226 <<: *lf_jjb_merge_builders
228 #####################
229 # Job Configuration #
230 #####################
234 url: '{git-url}/{github-org}/{project}'
237 - lf-infra-github-scm:
238 url: '{git-clone-url}{github-org}/{project}'
241 submodule-recursive: '{submodule-recursive}'
242 choosing-strategy: default
243 jenkins-ssh-credential: '{jenkins-ssh-credential}'
249 - lf-infra-github-pr-trigger:
250 trigger-phrase: '^remerge$'
251 only-trigger-phrase: true
252 status-context: 'JJB Merge'
255 github-org: '{github-org}'
256 github_pr_whitelist: '{obj:github_pr_whitelist}'
257 github_pr_admin_list: '{obj:github_pr_admin_list}'
263 - lf_jjb_verify_builders: &lf_jjb_verify_builders
264 name: lf-jjb-verfy-builders
267 - shell: !include-raw-escape:
268 - ../shell/git-validate-jira-urls.sh
269 - ../shell/jjb-install.sh
270 - ../shell/jjb-verify-job.sh
271 - ../shell/jjb-check-unicode.sh
272 - lf-infra-gpg-verify-git-signature
275 name: '{project-name}-jjb-verify'
276 id: gerrit-jjb-verify
279 # yamllint disable-line rule:key-duplicates
280 <<: *lf_jjb_verify_builders
282 ######################
283 # Default parameters #
284 ######################
286 git-url: '$GIT_URL/$GERRIT_PROJECT'
288 gerrit_verify_triggers:
289 - patchset-created-event:
290 exclude-drafts: false
291 exclude-trivial-rebase: false
292 exclude-no-code-change: false
293 - draft-published-event
294 - comment-added-contains-event:
295 comment-contains-value: recheck$
297 #####################
298 # Job Configuration #
299 #####################
302 - lf-infra-gerrit-scm:
304 refspec: '$GERRIT_REFSPEC'
305 branch: '$GERRIT_BRANCH'
306 submodule-recursive: '{submodule-recursive}'
307 choosing-strategy: gerrit
308 jenkins-ssh-credential: '{jenkins-ssh-credential}'
312 server-name: '{gerrit-server-name}'
313 trigger-on: '{obj:gerrit_verify_triggers}'
315 - project-compare-type: ANT
316 project-pattern: '{project}'
318 - branch-compare-type: ANT
319 branch-pattern: '**/{branch}'
320 <<: *lf_jjb_file_paths
323 name: '{project-name}-jjb-verify'
324 id: github-jjb-verify
327 # yamllint disable-line rule:key-duplicates
328 <<: *lf_jjb_verify_builders
330 #####################
331 # Job Configuration #
332 #####################
336 url: '{git-url}/{github-org}/{project}'
339 - lf-infra-github-scm:
340 url: '{git-clone-url}{github-org}/{project}'
341 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
343 submodule-recursive: '{submodule-recursive}'
344 choosing-strategy: default
345 jenkins-ssh-credential: '{jenkins-ssh-credential}'
348 - lf-infra-github-pr-trigger:
349 trigger-phrase: '^recheck$'
350 only-trigger-phrase: false
351 status-context: 'JJB Verify'
357 github_pr_admin_list:
364 - lf_packer_merge_builders: &lf_packer_merge_builders
365 name: lf-packer-merge-builders
367 # Adds builders section common to merge packer jobs.
368 # {packer-cloud-settings} is passed from the project, defines the managed
369 # file-id name created in Jenkins
370 # (default: packer-cloud-env)
371 # {packer-version}: is global defined in job group level, the version number
372 # can be updated to install the latest version of packer.
373 # {platforms}: defines the packer platform file, passed from the project.
374 # {template}: defines the packer template file, passed from the project.
377 - lf-infra-packer-validate:
378 packer-cloud-settings: '{packer-cloud-settings}'
379 packer-version: '{packer-version}'
380 - lf-infra-packer-build:
381 packer-cloud-settings: '{packer-cloud-settings}'
382 packer-version: '{packer-version}'
383 platform: '{platforms}'
384 template: '{templates}'
387 name: '{project-name}-packer-merge-{platforms}-{templates}'
388 id: gerrit-packer-merge
391 # yamllint disable-line rule:key-duplicates
392 <<: *lf_packer_common
393 # yamllint disable-line rule:key-duplicates
394 <<: *lf_packer_merge_builders
396 ######################
397 # Default parameters #
398 ######################
400 git-url: '$GIT_URL/$GERRIT_PROJECT'
402 gerrit_merge_triggers:
403 - change-merged-event
404 - comment-added-contains-event:
405 comment-contains-value: remerge$
407 #####################
408 # Job Configuration #
409 #####################
412 - lf-infra-gerrit-scm:
414 refspec: '$GERRIT_REFSPEC'
415 branch: '$GERRIT_BRANCH'
416 submodule-recursive: '{submodule-recursive}'
417 choosing-strategy: gerrit
418 jenkins-ssh-credential: '{jenkins-ssh-credential}'
421 - timed: '00 10 1 * *'
423 server-name: '{gerrit-server-name}'
424 trigger-on: '{obj:gerrit_merge_triggers}'
426 - project-compare-type: ANT
427 project-pattern: '{project}'
429 - branch-compare-type: ANT
430 branch-pattern: '**/{branch}'
431 <<: *lf_packer_file_paths
434 name: '{project-name}-packer-merge-{platforms}-{templates}'
435 id: github-packer-merge
438 # yamllint disable-line rule:key-duplicates
439 <<: *lf_packer_common
440 # yamllint disable-line rule:key-duplicates
441 <<: *lf_packer_merge_builders
443 #####################
444 # Job Configuration #
445 #####################
449 url: '{git-url}/{github-org}/{project}'
452 - lf-infra-github-scm:
453 url: '{git-clone-url}{github-org}/{project}'
456 submodule-recursive: '{submodule-recursive}'
457 choosing-strategy: default
458 jenkins-ssh-credential: '{jenkins-ssh-credential}'
461 - timed: '00 10 1 * *'
465 - lf-infra-github-pr-trigger:
466 trigger-phrase: '^remerge$'
467 only-trigger-phrase: true
468 status-context: 'Packer {platforms}-${templates} Merge'
471 github-org: '{github-org}'
472 github_pr_whitelist: '{obj:github_pr_whitelist}'
473 github_pr_admin_list: '{obj:github_pr_admin_list}'
479 - lf_packer_verify_builders: &lf_packer_verify_builders
480 name: lf-packer-verify-builders
482 # Adds builders section common to verify packer jobs.
483 # {packer-cloud-settings} is passed from the project, defines the managed
484 # file-id name created in Jenkins
485 # (default: packer-cloud-env)
486 # {packer-version}: is global defined in job group level, the version number
487 # can be updated to install the latest version of packer.
490 - lf-infra-packer-validate:
491 packer-cloud-settings: '{packer-cloud-settings}'
492 packer-version: '{packer-version}'
495 name: '{project-name}-packer-verify'
496 id: gerrit-packer-verify
499 # yamllint disable-line rule:key-duplicates
500 <<: *lf_packer_common
501 # yamllint disable-line rule:key-duplicates
502 <<: *lf_packer_verify_builders
504 ######################
505 # Default parameters #
506 ######################
509 git-url: '$GIT_URL/$GERRIT_PROJECT'
511 gerrit_verify_triggers:
512 - patchset-created-event:
513 exclude-drafts: false
514 exclude-trivial-rebase: false
515 exclude-no-code-change: false
516 - draft-published-event
517 - comment-added-contains-event:
518 comment-contains-value: recheck$
520 #####################
521 # Job Configuration #
522 #####################
525 - lf-infra-gerrit-scm:
527 refspec: '$GERRIT_REFSPEC'
528 branch: '$GERRIT_BRANCH'
529 submodule-recursive: '{submodule-recursive}'
530 choosing-strategy: gerrit
531 jenkins-ssh-credential: '{jenkins-ssh-credential}'
535 server-name: '{gerrit-server-name}'
536 trigger-on: '{obj:gerrit_verify_triggers}'
538 - project-compare-type: ANT
539 project-pattern: '{project}'
541 - branch-compare-type: ANT
542 branch-pattern: '**/{branch}'
543 <<: *lf_packer_file_paths
546 name: '{project-name}-packer-verify'
547 id: github-packer-verify
550 # yamllint disable-line rule:key-duplicates
551 <<: *lf_packer_common
552 # yamllint disable-line rule:key-duplicates
553 <<: *lf_packer_verify_builders
555 ######################
556 # Default parameters #
557 ######################
561 #####################
562 # Job Configuration #
563 #####################
567 url: '{git-url}/{github-org}/{project}'
570 - lf-infra-github-scm:
571 url: '{git-clone-url}{github-org}/{project}'
572 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
574 submodule-recursive: '{submodule-recursive}'
575 choosing-strategy: default
576 jenkins-ssh-credential: '{jenkins-ssh-credential}'
579 - lf-infra-github-pr-trigger:
580 trigger-phrase: '^recheck$'
581 only-trigger-phrase: false
582 status-context: 'Packer Verify'
588 github_pr_admin_list: