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 os-cloud-file-id: '{os-cloud-file-id}'
127 packer-version: '{packer-version}'
128 - lf-infra-packer-build:
129 platform: '{platforms}'
130 template: '{templates}'
131 os-cloud-file-id: '{os-cloud-file-id}'
132 packer-version: '{packer-version}'
134 - lf_packer_verify_builders: &lf_packer_verify_builders
135 # Adds builders section common to verify packer jobs.
136 name: lf-packer-verify-builders
138 - lf-infra-packer-validate:
139 os-cloud-file-id: '{os-cloud-file-id}'
140 packer-version: '{packer-version}'
143 name: lf-infra-jjb-parameters
147 default: '{jjb-version}'
148 description: Jenkins Job Builder version to download and install.
151 name: lf-infra-packer-parameters
155 default: '{packer-version}'
156 description: Packer version to download and install.
163 # JJB verify and merge jobs are the same except for their scm, trigger, and
164 # builders definition. This anchor is the common template
165 - lf_jjb_verify_merge: &lf_jjb_verify_merge
166 name: lf-jjb-verify-merge
167 project-type: freestyle
171 ######################
172 # Default parameters #
173 ######################
177 submodule-recursive: true
179 #####################
180 # Job Configuration #
181 #####################
184 - lf-infra-properties:
186 build-days-to-keep: 7
189 - lf-infra-parameters:
193 - lf-infra-jjb-parameters:
194 jjb-version: '{jjb-version}'
199 jenkins-ssh-credential: '{jenkins-ssh-credential}'
205 name: '{project-name}-jjb-merge'
207 <<: *lf_jjb_verify_merge
208 # yamllint disable-line rule:key-duplicates
209 <<: *lf_jjb_merge_builders
211 ######################
212 # Default parameters #
213 ######################
215 git-url: '$GIT_URL/$GERRIT_PROJECT'
217 #####################
218 # Job Configuration #
219 #####################
222 - lf-infra-gerrit-scm:
226 submodule-recursive: '{submodule-recursive}'
227 choosing-strategy: default
228 jenkins-ssh-credential: '{jenkins-ssh-credential}'
232 server-name: '{gerrit-server-name}'
234 - change-merged-event
235 - comment-added-contains-event:
236 comment-contains-value: remerge$
238 - project-compare-type: ANT
239 project-pattern: '{project}'
241 - branch-compare-type: ANT
242 branch-pattern: '**/{branch}'
243 <<: *lf_jjb_file_paths
246 name: '{project-name}-jjb-verify'
247 id: gerrit-jjb-verify
249 <<: *lf_jjb_verify_merge
250 # yamllint disable-line rule:key-duplicates
251 <<: *lf_jjb_verify_builders
253 ######################
254 # Default parameters #
255 ######################
257 git-url: '$GIT_URL/$GERRIT_PROJECT'
259 #####################
260 # Job Configuration #
261 #####################
264 - lf-infra-gerrit-scm:
266 refspec: '$GERRIT_REFSPEC'
267 branch: '$GERRIT_BRANCH'
268 submodule-recursive: '{submodule-recursive}'
269 choosing-strategy: gerrit
270 jenkins-ssh-credential: '{jenkins-ssh-credential}'
274 server-name: '{gerrit-server-name}'
276 - patchset-created-event:
277 exclude-drafts: false
278 exclude-trivial-rebase: false
279 exclude-no-code-change: false
280 - draft-published-event
281 - comment-added-contains-event:
282 comment-contains-value: recheck$
284 - project-compare-type: ANT
285 project-pattern: '{project}'
287 - branch-compare-type: ANT
288 branch-pattern: '**/{branch}'
289 <<: *lf_jjb_file_paths
292 name: '{project-name}-jjb-merge'
294 <<: *lf_jjb_verify_merge
295 # yamllint disable-line rule:key-duplicates
296 <<: *lf_jjb_merge_builders
298 #####################
299 # Job Configuration #
300 #####################
304 url: '{git-url}/{github-org}/{project}'
307 - lf-infra-github-scm:
308 url: '{git-clone-url}{github-org}/{project}'
311 submodule-recursive: '{submodule-recursive}'
312 choosing-strategy: default
313 jenkins-ssh-credential: '{jenkins-ssh-credential}'
319 - lf-infra-github-pr-trigger:
320 trigger-phrase: '^remerge$'
321 only-trigger-phrase: true
322 status-context: 'JJB Merge'
325 github-org: '{github-org}'
326 github_pr_whitelist: '{obj:github_pr_whitelist}'
327 github_pr_admin_list: '{obj:github_pr_admin_list}'
330 name: '{project-name}-jjb-verify'
331 id: github-jjb-verify
333 <<: *lf_jjb_verify_merge
334 # yamllint disable-line rule:key-duplicates
335 <<: *lf_jjb_verify_builders
337 #####################
338 # Job Configuration #
339 #####################
343 url: '{git-url}/{github-org}/{project}'
346 - lf-infra-github-scm:
347 url: '{git-clone-url}{github-org}/{project}'
348 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
350 submodule-recursive: '{submodule-recursive}'
351 choosing-strategy: default
352 jenkins-ssh-credential: '{jenkins-ssh-credential}'
355 - lf-infra-github-pr-trigger:
356 trigger-phrase: '^recheck$'
357 only-trigger-phrase: false
358 status-context: 'JJB Verify'
364 github_pr_admin_list:
368 name: '{project-name}-packer-merge-{platforms}-{templates}'
369 id: gerrit-packer-merge
371 <<: *lf_jjb_verify_merge
372 # yamllint disable-line rule:key-duplicates
373 <<: *lf_packer_common
374 # yamllint disable-line rule:key-duplicates
375 <<: *lf_packer_merge_builders
377 ######################
378 # Default parameters #
379 ######################
381 git-url: '$GIT_URL/$GERRIT_PROJECT'
383 #####################
384 # Job Configuration #
385 #####################
388 - lf-infra-gerrit-scm:
390 refspec: '$GERRIT_REFSPEC'
391 branch: '$GERRIT_BRANCH'
392 submodule-recursive: '{submodule-recursive}'
393 choosing-strategy: gerrit
394 jenkins-ssh-credential: '{jenkins-ssh-credential}'
398 server-name: '{gerrit-server-name}'
400 - change-merged-event
401 - comment-added-contains-event:
402 comment-contains-value: remerge$
404 - project-compare-type: ANT
405 project-pattern: '{project}'
407 - branch-compare-type: ANT
408 branch-pattern: '**/{branch}'
409 <<: *lf_packer_file_paths
412 name: '{project-name}-packer-verify'
413 id: gerrit-packer-verify
415 <<: *lf_jjb_verify_merge
416 # yamllint disable-line rule:key-duplicates
417 <<: *lf_packer_common
418 # yamllint disable-line rule:key-duplicates
419 <<: *lf_packer_verify_builders
421 ######################
422 # Default parameters #
423 ######################
425 git-url: '$GIT_URL/$GERRIT_PROJECT'
427 #####################
428 # Job Configuration #
429 #####################
432 - lf-infra-gerrit-scm:
434 refspec: '$GERRIT_REFSPEC'
435 branch: '$GERRIT_BRANCH'
436 submodule-recursive: '{submodule-recursive}'
437 choosing-strategy: gerrit
438 jenkins-ssh-credential: '{jenkins-ssh-credential}'
442 server-name: '{gerrit-server-name}'
444 - patchset-created-event:
445 exclude-drafts: false
446 exclude-trivial-rebase: false
447 exclude-no-code-change: false
448 - draft-published-event
449 - comment-added-contains-event:
450 comment-contains-value: recheck$
452 - project-compare-type: ANT
453 project-pattern: '{project}'
455 - branch-compare-type: ANT
456 branch-pattern: '**/{branch}'
457 <<: *lf_packer_file_paths
461 name: '{project-name}-packer-merge-{platforms}-{templates}'
462 id: github-packer-merge
464 <<: *lf_jjb_verify_merge
465 # yamllint disable-line rule:key-duplicates
466 <<: *lf_packer_common
467 # yamllint disable-line rule:key-duplicates
468 <<: *lf_packer_merge_builders
470 #####################
471 # Job Configuration #
472 #####################
476 url: '{git-url}/{github-org}/{project}'
479 - lf-infra-github-scm:
480 url: '{git-clone-url}{github-org}/{project}'
483 submodule-recursive: '{submodule-recursive}'
484 choosing-strategy: default
485 jenkins-ssh-credential: '{jenkins-ssh-credential}'
491 - lf-infra-github-pr-trigger:
492 trigger-phrase: '^remerge$'
493 only-trigger-phrase: true
494 status-context: 'JJB Merge'
497 github-org: '{github-org}'
498 github_pr_whitelist: '{obj:github_pr_whitelist}'
499 github_pr_admin_list: '{obj:github_pr_admin_list}'
502 name: '{project-name}-packer-verify'
503 id: github-packer-verify
505 <<: *lf_jjb_verify_merge
506 # yamllint disable-line rule:key-duplicates
507 <<: *lf_packer_common
508 # yamllint disable-line rule:key-duplicates
509 <<: *lf_packer_verify_builders
511 #####################
512 # Job Configuration #
513 #####################
517 url: '{git-url}/{github-org}/{project}'
520 - lf-infra-github-scm:
521 url: '{git-clone-url}{github-org}/{project}'
522 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
524 submodule-recursive: '{submodule-recursive}'
525 choosing-strategy: default
526 jenkins-ssh-credential: '{jenkins-ssh-credential}'
529 - lf-infra-github-pr-trigger:
530 trigger-phrase: '^recheck$'
531 only-trigger-phrase: false
532 status-context: 'JJB Verify'
538 github_pr_admin_list: