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 - lf-infra-packer-parameters:
107 packer-version: '{packer-version}'
110 name: lf-infra-jjb-parameters
114 default: '{jjb-version}'
115 description: Jenkins Job Builder version to download and install.
118 name: lf-infra-packer-parameters
122 default: '{packer-version}'
123 description: Packer version to download and install.
125 - lf_jjb_common: &lf_jjb_common
127 project-type: freestyle
131 ######################
132 # Default parameters #
133 ######################
137 submodule-recursive: true
139 #####################
140 # Job Configuration #
141 #####################
144 - lf-infra-properties:
146 build-days-to-keep: 7
149 - lf-infra-parameters:
153 - lf-infra-jjb-parameters:
154 jjb-version: '{jjb-version}'
159 jenkins-ssh-credential: '{jenkins-ssh-credential}'
168 - lf_jjb_merge_builders: &lf_jjb_merge_builders
169 name: lf-jjb-merge-builders
172 - shell: !include-raw-escape:
173 - ../shell/jjb-install.sh
174 - ../shell/jjb-merge-job.sh
177 name: '{project-name}-jjb-merge'
180 # yamllint disable-line rule:key-duplicates
181 <<: *lf_jjb_merge_builders
183 ######################
184 # Default parameters #
185 ######################
187 git-url: '$GIT_URL/$GERRIT_PROJECT'
189 gerrit_merge_triggers:
190 - change-merged-event
191 - comment-added-contains-event:
192 comment-contains-value: remerge$
194 #####################
195 # Job Configuration #
196 #####################
199 - lf-infra-gerrit-scm:
203 submodule-recursive: '{submodule-recursive}'
204 choosing-strategy: default
205 jenkins-ssh-credential: '{jenkins-ssh-credential}'
209 server-name: '{gerrit-server-name}'
210 trigger-on: '{obj:gerrit_merge_triggers}'
212 - project-compare-type: ANT
213 project-pattern: '{project}'
215 - branch-compare-type: ANT
216 branch-pattern: '**/{branch}'
217 <<: *lf_jjb_file_paths
220 name: '{project-name}-jjb-merge'
223 # yamllint disable-line rule:key-duplicates
224 <<: *lf_jjb_merge_builders
226 #####################
227 # Job Configuration #
228 #####################
232 url: '{git-url}/{github-org}/{project}'
235 - lf-infra-github-scm:
236 url: '{git-clone-url}{github-org}/{project}'
239 submodule-recursive: '{submodule-recursive}'
240 choosing-strategy: default
241 jenkins-ssh-credential: '{jenkins-ssh-credential}'
247 - lf-infra-github-pr-trigger:
248 trigger-phrase: '^remerge$'
249 only-trigger-phrase: true
250 status-context: 'JJB Merge'
253 github-org: '{github-org}'
254 github_pr_whitelist: '{obj:github_pr_whitelist}'
255 github_pr_admin_list: '{obj:github_pr_admin_list}'
261 - lf_jjb_verify_builders: &lf_jjb_verify_builders
262 name: lf-jjb-verfy-builders
265 - shell: !include-raw-escape:
266 - ../shell/git-validate-jira-urls.sh
267 - ../shell/jjb-install.sh
268 - ../shell/jjb-verify-job.sh
269 - ../shell/jjb-check-unicode.sh
270 - lf-infra-gpg-verify-git-signature
273 name: '{project-name}-jjb-verify'
274 id: gerrit-jjb-verify
277 # yamllint disable-line rule:key-duplicates
278 <<: *lf_jjb_verify_builders
280 ######################
281 # Default parameters #
282 ######################
284 git-url: '$GIT_URL/$GERRIT_PROJECT'
286 gerrit_verify_triggers:
287 - patchset-created-event:
288 exclude-drafts: false
289 exclude-trivial-rebase: false
290 exclude-no-code-change: false
291 - draft-published-event
292 - comment-added-contains-event:
293 comment-contains-value: recheck$
295 #####################
296 # Job Configuration #
297 #####################
300 - lf-infra-gerrit-scm:
302 refspec: '$GERRIT_REFSPEC'
303 branch: '$GERRIT_BRANCH'
304 submodule-recursive: '{submodule-recursive}'
305 choosing-strategy: gerrit
306 jenkins-ssh-credential: '{jenkins-ssh-credential}'
310 server-name: '{gerrit-server-name}'
311 trigger-on: '{obj:gerrit_verify_triggers}'
313 - project-compare-type: ANT
314 project-pattern: '{project}'
316 - branch-compare-type: ANT
317 branch-pattern: '**/{branch}'
318 <<: *lf_jjb_file_paths
321 name: '{project-name}-jjb-verify'
322 id: github-jjb-verify
325 # yamllint disable-line rule:key-duplicates
326 <<: *lf_jjb_verify_builders
328 #####################
329 # Job Configuration #
330 #####################
334 url: '{git-url}/{github-org}/{project}'
337 - lf-infra-github-scm:
338 url: '{git-clone-url}{github-org}/{project}'
339 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
341 submodule-recursive: '{submodule-recursive}'
342 choosing-strategy: default
343 jenkins-ssh-credential: '{jenkins-ssh-credential}'
346 - lf-infra-github-pr-trigger:
347 trigger-phrase: '^recheck$'
348 only-trigger-phrase: false
349 status-context: 'JJB Verify'
355 github_pr_admin_list:
362 - lf_packer_merge_builders: &lf_packer_merge_builders
363 name: lf-packer-merge-builders
365 # Adds builders section common to merge packer jobs.
366 # {packer-cloud-settings} is passed from the project, defines the managed
367 # file-id name created in Jenkins
368 # (default: packer-cloud-env)
369 # {packer-version}: is global defined in job group level, the version number
370 # can be updated to install the latest version of packer.
371 # {platforms}: defines the packer platform file, passed from the project.
372 # {template}: defines the packer template file, passed from the project.
375 - lf-infra-packer-validate:
376 packer-cloud-settings: '{packer-cloud-settings}'
377 packer-version: '{packer-version}'
378 - lf-infra-packer-build:
379 packer-cloud-settings: '{packer-cloud-settings}'
380 packer-version: '{packer-version}'
381 platform: '{platforms}'
382 template: '{templates}'
385 name: '{project-name}-packer-merge-{platforms}-{templates}'
386 id: gerrit-packer-merge
389 # yamllint disable-line rule:key-duplicates
390 <<: *lf_packer_common
391 # yamllint disable-line rule:key-duplicates
392 <<: *lf_packer_merge_builders
394 ######################
395 # Default parameters #
396 ######################
398 git-url: '$GIT_URL/$GERRIT_PROJECT'
400 gerrit_merge_triggers:
401 - change-merged-event
402 - comment-added-contains-event:
403 comment-contains-value: remerge$
405 #####################
406 # Job Configuration #
407 #####################
410 - lf-infra-gerrit-scm:
412 refspec: '$GERRIT_REFSPEC'
413 branch: '$GERRIT_BRANCH'
414 submodule-recursive: '{submodule-recursive}'
415 choosing-strategy: gerrit
416 jenkins-ssh-credential: '{jenkins-ssh-credential}'
419 - timed: '00 10 1 * *'
421 server-name: '{gerrit-server-name}'
422 trigger-on: '{obj:gerrit_merge_triggers}'
424 - project-compare-type: ANT
425 project-pattern: '{project}'
427 - branch-compare-type: ANT
428 branch-pattern: '**/{branch}'
429 <<: *lf_packer_file_paths
432 name: '{project-name}-packer-merge-{platforms}-{templates}'
433 id: github-packer-merge
436 # yamllint disable-line rule:key-duplicates
437 <<: *lf_packer_common
438 # yamllint disable-line rule:key-duplicates
439 <<: *lf_packer_merge_builders
441 #####################
442 # Job Configuration #
443 #####################
447 url: '{git-url}/{github-org}/{project}'
450 - lf-infra-github-scm:
451 url: '{git-clone-url}{github-org}/{project}'
454 submodule-recursive: '{submodule-recursive}'
455 choosing-strategy: default
456 jenkins-ssh-credential: '{jenkins-ssh-credential}'
459 - timed: '00 10 1 * *'
463 - lf-infra-github-pr-trigger:
464 trigger-phrase: '^remerge$'
465 only-trigger-phrase: true
466 status-context: 'Packer {platforms}-${templates} Merge'
469 github-org: '{github-org}'
470 github_pr_whitelist: '{obj:github_pr_whitelist}'
471 github_pr_admin_list: '{obj:github_pr_admin_list}'
477 - lf_packer_verify_builders: &lf_packer_verify_builders
478 name: lf-packer-verify-builders
480 # Adds builders section common to verify packer jobs.
481 # {packer-cloud-settings} is passed from the project, defines the managed
482 # file-id name created in Jenkins
483 # (default: packer-cloud-env)
484 # {packer-version}: is global defined in job group level, the version number
485 # can be updated to install the latest version of packer.
488 - lf-infra-packer-validate:
489 packer-cloud-settings: '{packer-cloud-settings}'
490 packer-version: '{packer-version}'
493 name: '{project-name}-packer-verify'
494 id: gerrit-packer-verify
497 # yamllint disable-line rule:key-duplicates
498 <<: *lf_packer_common
499 # yamllint disable-line rule:key-duplicates
500 <<: *lf_packer_verify_builders
502 ######################
503 # Default parameters #
504 ######################
507 git-url: '$GIT_URL/$GERRIT_PROJECT'
509 gerrit_verify_triggers:
510 - patchset-created-event:
511 exclude-drafts: false
512 exclude-trivial-rebase: false
513 exclude-no-code-change: false
514 - draft-published-event
515 - comment-added-contains-event:
516 comment-contains-value: recheck$
518 #####################
519 # Job Configuration #
520 #####################
523 - lf-infra-gerrit-scm:
525 refspec: '$GERRIT_REFSPEC'
526 branch: '$GERRIT_BRANCH'
527 submodule-recursive: '{submodule-recursive}'
528 choosing-strategy: gerrit
529 jenkins-ssh-credential: '{jenkins-ssh-credential}'
533 server-name: '{gerrit-server-name}'
534 trigger-on: '{obj:gerrit_verify_triggers}'
536 - project-compare-type: ANT
537 project-pattern: '{project}'
539 - branch-compare-type: ANT
540 branch-pattern: '**/{branch}'
541 <<: *lf_packer_file_paths
544 name: '{project-name}-packer-verify'
545 id: github-packer-verify
548 # yamllint disable-line rule:key-duplicates
549 <<: *lf_packer_common
550 # yamllint disable-line rule:key-duplicates
551 <<: *lf_packer_verify_builders
553 ######################
554 # Default parameters #
555 ######################
559 #####################
560 # Job Configuration #
561 #####################
565 url: '{git-url}/{github-org}/{project}'
568 - lf-infra-github-scm:
569 url: '{git-clone-url}{github-org}/{project}'
570 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
572 submodule-recursive: '{submodule-recursive}'
573 choosing-strategy: default
574 jenkins-ssh-credential: '{jenkins-ssh-credential}'
577 - lf-infra-github-pr-trigger:
578 trigger-phrase: '^recheck$'
579 only-trigger-phrase: false
580 status-context: 'Packer Verify'
586 github_pr_admin_list: