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 ######################
114 packer-cloud-settings: packer-cloud-env
118 build-timeout: '{build-timeout}'
119 jenkins-ssh-credential: '{jenkins-ssh-credential}'
122 - lf-infra-parameters:
126 - lf-infra-packer-parameters:
127 packer-version: '{packer-version}'
129 - lf_packer_merge_builders: &lf_packer_merge_builders
130 name: lf-packer-merge-builders
131 # Adds builders section common to merge packer jobs.
132 # {packer-cloud-settings} is passed from the project, defines the managed
133 # file-id name created in Jenkins
134 # (default: packer-cloud-env)
135 # {packer-version}: is global defined in job group level, the version number
136 # can be updated to install the latest version of packer.
137 # {platforms}: defines the packer platform file, passed from the project.
138 # {template}: defines the packer template file, passed from the project.
140 - lf-infra-packer-validate:
141 packer-cloud-settings: '{packer-cloud-settings}'
142 packer-version: '{packer-version}'
143 - lf-infra-packer-build:
144 packer-cloud-settings: '{packer-cloud-settings}'
145 packer-version: '{packer-version}'
146 platform: '{platforms}'
147 template: '{templates}'
149 - lf_packer_verify_builders: &lf_packer_verify_builders
150 # Adds builders section common to verify packer jobs.
151 # {packer-cloud-settings} is passed from the project, defines the managed
152 # file-id name created in Jenkins
153 # (default: packer-cloud-env)
154 # {packer-version}: is global defined in job group level, the version number
155 # can be updated to install the latest version of packer.
156 name: lf-packer-verify-builders
158 - lf-infra-packer-validate:
159 packer-cloud-settings: '{packer-cloud-settings}'
160 packer-version: '{packer-version}'
163 name: lf-infra-jjb-parameters
167 default: '{jjb-version}'
168 description: Jenkins Job Builder version to download and install.
171 name: lf-infra-packer-parameters
175 default: '{packer-version}'
176 description: Packer version to download and install.
183 # JJB verify and merge jobs are the same except for their scm, trigger, and
184 # builders definition. This anchor is the common template
185 - lf_jjb_verify_merge: &lf_jjb_verify_merge
186 name: lf-jjb-verify-merge
187 project-type: freestyle
191 ######################
192 # Default parameters #
193 ######################
197 submodule-recursive: true
199 #####################
200 # Job Configuration #
201 #####################
204 - lf-infra-properties:
206 build-days-to-keep: 7
209 - lf-infra-parameters:
213 - lf-infra-jjb-parameters:
214 jjb-version: '{jjb-version}'
219 jenkins-ssh-credential: '{jenkins-ssh-credential}'
225 name: '{project-name}-jjb-merge'
227 <<: *lf_jjb_verify_merge
228 # yamllint disable-line rule:key-duplicates
229 <<: *lf_jjb_merge_builders
231 ######################
232 # Default parameters #
233 ######################
235 git-url: '$GIT_URL/$GERRIT_PROJECT'
237 gerrit_merge_triggers:
238 - change-merged-event
239 - comment-added-contains-event:
240 comment-contains-value: remerge$
242 #####################
243 # Job Configuration #
244 #####################
247 - lf-infra-gerrit-scm:
251 submodule-recursive: '{submodule-recursive}'
252 choosing-strategy: default
253 jenkins-ssh-credential: '{jenkins-ssh-credential}'
257 server-name: '{gerrit-server-name}'
258 trigger-on: '{obj:gerrit_merge_triggers}'
260 - project-compare-type: ANT
261 project-pattern: '{project}'
263 - branch-compare-type: ANT
264 branch-pattern: '**/{branch}'
265 <<: *lf_jjb_file_paths
268 name: '{project-name}-jjb-verify'
269 id: gerrit-jjb-verify
271 <<: *lf_jjb_verify_merge
272 # yamllint disable-line rule:key-duplicates
273 <<: *lf_jjb_verify_builders
275 ######################
276 # Default parameters #
277 ######################
279 git-url: '$GIT_URL/$GERRIT_PROJECT'
281 gerrit_verify_triggers:
282 - patchset-created-event:
283 exclude-drafts: false
284 exclude-trivial-rebase: false
285 exclude-no-code-change: false
286 - draft-published-event
287 - comment-added-contains-event:
288 comment-contains-value: recheck$
290 #####################
291 # Job Configuration #
292 #####################
295 - lf-infra-gerrit-scm:
297 refspec: '$GERRIT_REFSPEC'
298 branch: '$GERRIT_BRANCH'
299 submodule-recursive: '{submodule-recursive}'
300 choosing-strategy: gerrit
301 jenkins-ssh-credential: '{jenkins-ssh-credential}'
305 server-name: '{gerrit-server-name}'
306 trigger-on: '{obj:gerrit_verify_triggers}'
308 - project-compare-type: ANT
309 project-pattern: '{project}'
311 - branch-compare-type: ANT
312 branch-pattern: '**/{branch}'
313 <<: *lf_jjb_file_paths
316 name: '{project-name}-jjb-merge'
318 <<: *lf_jjb_verify_merge
319 # yamllint disable-line rule:key-duplicates
320 <<: *lf_jjb_merge_builders
322 #####################
323 # Job Configuration #
324 #####################
328 url: '{git-url}/{github-org}/{project}'
331 - lf-infra-github-scm:
332 url: '{git-clone-url}{github-org}/{project}'
335 submodule-recursive: '{submodule-recursive}'
336 choosing-strategy: default
337 jenkins-ssh-credential: '{jenkins-ssh-credential}'
343 - lf-infra-github-pr-trigger:
344 trigger-phrase: '^remerge$'
345 only-trigger-phrase: true
346 status-context: 'JJB Merge'
349 github-org: '{github-org}'
350 github_pr_whitelist: '{obj:github_pr_whitelist}'
351 github_pr_admin_list: '{obj:github_pr_admin_list}'
354 name: '{project-name}-jjb-verify'
355 id: github-jjb-verify
357 <<: *lf_jjb_verify_merge
358 # yamllint disable-line rule:key-duplicates
359 <<: *lf_jjb_verify_builders
361 #####################
362 # Job Configuration #
363 #####################
367 url: '{git-url}/{github-org}/{project}'
370 - lf-infra-github-scm:
371 url: '{git-clone-url}{github-org}/{project}'
372 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
374 submodule-recursive: '{submodule-recursive}'
375 choosing-strategy: default
376 jenkins-ssh-credential: '{jenkins-ssh-credential}'
379 - lf-infra-github-pr-trigger:
380 trigger-phrase: '^recheck$'
381 only-trigger-phrase: false
382 status-context: 'JJB Verify'
388 github_pr_admin_list:
392 name: '{project-name}-packer-merge-{platforms}-{templates}'
393 id: gerrit-packer-merge
395 <<: *lf_jjb_verify_merge
396 # yamllint disable-line rule:key-duplicates
397 <<: *lf_packer_common
398 # yamllint disable-line rule:key-duplicates
399 <<: *lf_packer_merge_builders
401 ######################
402 # Default parameters #
403 ######################
405 git-url: '$GIT_URL/$GERRIT_PROJECT'
407 gerrit_merge_triggers:
408 - change-merged-event
409 - comment-added-contains-event:
410 comment-contains-value: remerge$
412 #####################
413 # Job Configuration #
414 #####################
417 - lf-infra-gerrit-scm:
419 refspec: '$GERRIT_REFSPEC'
420 branch: '$GERRIT_BRANCH'
421 submodule-recursive: '{submodule-recursive}'
422 choosing-strategy: gerrit
423 jenkins-ssh-credential: '{jenkins-ssh-credential}'
426 - timed: '00 10 1 * *'
428 server-name: '{gerrit-server-name}'
429 trigger-on: '{obj:gerrit_merge_triggers}'
431 - project-compare-type: ANT
432 project-pattern: '{project}'
434 - branch-compare-type: ANT
435 branch-pattern: '**/{branch}'
436 <<: *lf_packer_file_paths
439 name: '{project-name}-packer-verify'
440 id: gerrit-packer-verify
442 <<: *lf_jjb_verify_merge
443 # yamllint disable-line rule:key-duplicates
444 <<: *lf_packer_common
445 # yamllint disable-line rule:key-duplicates
446 <<: *lf_packer_verify_builders
448 ######################
449 # Default parameters #
450 ######################
453 git-url: '$GIT_URL/$GERRIT_PROJECT'
455 gerrit_verify_triggers:
456 - patchset-created-event:
457 exclude-drafts: false
458 exclude-trivial-rebase: false
459 exclude-no-code-change: false
460 - draft-published-event
461 - comment-added-contains-event:
462 comment-contains-value: recheck$
464 #####################
465 # Job Configuration #
466 #####################
469 - lf-infra-gerrit-scm:
471 refspec: '$GERRIT_REFSPEC'
472 branch: '$GERRIT_BRANCH'
473 submodule-recursive: '{submodule-recursive}'
474 choosing-strategy: gerrit
475 jenkins-ssh-credential: '{jenkins-ssh-credential}'
479 server-name: '{gerrit-server-name}'
480 trigger-on: '{obj:gerrit_verify_triggers}'
482 - project-compare-type: ANT
483 project-pattern: '{project}'
485 - branch-compare-type: ANT
486 branch-pattern: '**/{branch}'
487 <<: *lf_packer_file_paths
491 name: '{project-name}-packer-merge-{platforms}-{templates}'
492 id: github-packer-merge
494 <<: *lf_jjb_verify_merge
495 # yamllint disable-line rule:key-duplicates
496 <<: *lf_packer_common
497 # yamllint disable-line rule:key-duplicates
498 <<: *lf_packer_merge_builders
500 #####################
501 # Job Configuration #
502 #####################
506 url: '{git-url}/{github-org}/{project}'
509 - lf-infra-github-scm:
510 url: '{git-clone-url}{github-org}/{project}'
513 submodule-recursive: '{submodule-recursive}'
514 choosing-strategy: default
515 jenkins-ssh-credential: '{jenkins-ssh-credential}'
518 - timed: '00 10 1 * *'
522 - lf-infra-github-pr-trigger:
523 trigger-phrase: '^remerge$'
524 only-trigger-phrase: true
525 status-context: 'Packer {platforms}-${templates} Merge'
528 github-org: '{github-org}'
529 github_pr_whitelist: '{obj:github_pr_whitelist}'
530 github_pr_admin_list: '{obj:github_pr_admin_list}'
533 name: '{project-name}-packer-verify'
534 id: github-packer-verify
536 <<: *lf_jjb_verify_merge
537 # yamllint disable-line rule:key-duplicates
538 <<: *lf_packer_common
539 # yamllint disable-line rule:key-duplicates
540 <<: *lf_packer_verify_builders
542 ######################
543 # Default parameters #
544 ######################
548 #####################
549 # Job Configuration #
550 #####################
554 url: '{git-url}/{github-org}/{project}'
557 - lf-infra-github-scm:
558 url: '{git-clone-url}{github-org}/{project}'
559 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
561 submodule-recursive: '{submodule-recursive}'
562 choosing-strategy: default
563 jenkins-ssh-credential: '{jenkins-ssh-credential}'
566 - lf-infra-github-pr-trigger:
567 trigger-phrase: '^recheck$'
568 only-trigger-phrase: false
569 status-context: 'Packer Verify'
575 github_pr_admin_list: