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 #####################
238 # Job Configuration #
239 #####################
242 - lf-infra-gerrit-scm:
246 submodule-recursive: '{submodule-recursive}'
247 choosing-strategy: default
248 jenkins-ssh-credential: '{jenkins-ssh-credential}'
252 server-name: '{gerrit-server-name}'
254 - change-merged-event
255 - comment-added-contains-event:
256 comment-contains-value: remerge$
258 - project-compare-type: ANT
259 project-pattern: '{project}'
261 - branch-compare-type: ANT
262 branch-pattern: '**/{branch}'
263 <<: *lf_jjb_file_paths
266 name: '{project-name}-jjb-verify'
267 id: gerrit-jjb-verify
269 <<: *lf_jjb_verify_merge
270 # yamllint disable-line rule:key-duplicates
271 <<: *lf_jjb_verify_builders
273 ######################
274 # Default parameters #
275 ######################
277 git-url: '$GIT_URL/$GERRIT_PROJECT'
279 #####################
280 # Job Configuration #
281 #####################
284 - lf-infra-gerrit-scm:
286 refspec: '$GERRIT_REFSPEC'
287 branch: '$GERRIT_BRANCH'
288 submodule-recursive: '{submodule-recursive}'
289 choosing-strategy: gerrit
290 jenkins-ssh-credential: '{jenkins-ssh-credential}'
294 server-name: '{gerrit-server-name}'
296 - patchset-created-event:
297 exclude-drafts: false
298 exclude-trivial-rebase: false
299 exclude-no-code-change: false
300 - draft-published-event
301 - comment-added-contains-event:
302 comment-contains-value: recheck$
304 - project-compare-type: ANT
305 project-pattern: '{project}'
307 - branch-compare-type: ANT
308 branch-pattern: '**/{branch}'
309 <<: *lf_jjb_file_paths
312 name: '{project-name}-jjb-merge'
314 <<: *lf_jjb_verify_merge
315 # yamllint disable-line rule:key-duplicates
316 <<: *lf_jjb_merge_builders
318 #####################
319 # Job Configuration #
320 #####################
324 url: '{git-url}/{github-org}/{project}'
327 - lf-infra-github-scm:
328 url: '{git-clone-url}{github-org}/{project}'
331 submodule-recursive: '{submodule-recursive}'
332 choosing-strategy: default
333 jenkins-ssh-credential: '{jenkins-ssh-credential}'
339 - lf-infra-github-pr-trigger:
340 trigger-phrase: '^remerge$'
341 only-trigger-phrase: true
342 status-context: 'JJB Merge'
345 github-org: '{github-org}'
346 github_pr_whitelist: '{obj:github_pr_whitelist}'
347 github_pr_admin_list: '{obj:github_pr_admin_list}'
350 name: '{project-name}-jjb-verify'
351 id: github-jjb-verify
353 <<: *lf_jjb_verify_merge
354 # yamllint disable-line rule:key-duplicates
355 <<: *lf_jjb_verify_builders
357 #####################
358 # Job Configuration #
359 #####################
363 url: '{git-url}/{github-org}/{project}'
366 - lf-infra-github-scm:
367 url: '{git-clone-url}{github-org}/{project}'
368 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
370 submodule-recursive: '{submodule-recursive}'
371 choosing-strategy: default
372 jenkins-ssh-credential: '{jenkins-ssh-credential}'
375 - lf-infra-github-pr-trigger:
376 trigger-phrase: '^recheck$'
377 only-trigger-phrase: false
378 status-context: 'JJB Verify'
384 github_pr_admin_list:
388 name: '{project-name}-packer-merge-{platforms}-{templates}'
389 id: gerrit-packer-merge
391 <<: *lf_jjb_verify_merge
392 # yamllint disable-line rule:key-duplicates
393 <<: *lf_packer_common
394 # yamllint disable-line rule:key-duplicates
395 <<: *lf_packer_merge_builders
397 ######################
398 # Default parameters #
399 ######################
401 git-url: '$GIT_URL/$GERRIT_PROJECT'
403 #####################
404 # Job Configuration #
405 #####################
408 - lf-infra-gerrit-scm:
410 refspec: '$GERRIT_REFSPEC'
411 branch: '$GERRIT_BRANCH'
412 submodule-recursive: '{submodule-recursive}'
413 choosing-strategy: gerrit
414 jenkins-ssh-credential: '{jenkins-ssh-credential}'
418 server-name: '{gerrit-server-name}'
420 - change-merged-event
421 - comment-added-contains-event:
422 comment-contains-value: remerge$
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-verify'
433 id: gerrit-packer-verify
435 <<: *lf_jjb_verify_merge
436 # yamllint disable-line rule:key-duplicates
437 <<: *lf_packer_common
438 # yamllint disable-line rule:key-duplicates
439 <<: *lf_packer_verify_builders
441 ######################
442 # Default parameters #
443 ######################
446 git-url: '$GIT_URL/$GERRIT_PROJECT'
448 #####################
449 # Job Configuration #
450 #####################
453 - lf-infra-gerrit-scm:
455 refspec: '$GERRIT_REFSPEC'
456 branch: '$GERRIT_BRANCH'
457 submodule-recursive: '{submodule-recursive}'
458 choosing-strategy: gerrit
459 jenkins-ssh-credential: '{jenkins-ssh-credential}'
463 server-name: '{gerrit-server-name}'
465 - patchset-created-event:
466 exclude-drafts: false
467 exclude-trivial-rebase: false
468 exclude-no-code-change: false
469 - draft-published-event
470 - comment-added-contains-event:
471 comment-contains-value: recheck$
473 - project-compare-type: ANT
474 project-pattern: '{project}'
476 - branch-compare-type: ANT
477 branch-pattern: '**/{branch}'
478 <<: *lf_packer_file_paths
482 name: '{project-name}-packer-merge-{platforms}-{templates}'
483 id: github-packer-merge
485 <<: *lf_jjb_verify_merge
486 # yamllint disable-line rule:key-duplicates
487 <<: *lf_packer_common
488 # yamllint disable-line rule:key-duplicates
489 <<: *lf_packer_merge_builders
491 #####################
492 # Job Configuration #
493 #####################
497 url: '{git-url}/{github-org}/{project}'
500 - lf-infra-github-scm:
501 url: '{git-clone-url}{github-org}/{project}'
504 submodule-recursive: '{submodule-recursive}'
505 choosing-strategy: default
506 jenkins-ssh-credential: '{jenkins-ssh-credential}'
512 - lf-infra-github-pr-trigger:
513 trigger-phrase: '^remerge$'
514 only-trigger-phrase: true
515 status-context: 'Packer {platforms}-${templates} Merge'
518 github-org: '{github-org}'
519 github_pr_whitelist: '{obj:github_pr_whitelist}'
520 github_pr_admin_list: '{obj:github_pr_admin_list}'
523 name: '{project-name}-packer-verify'
524 id: github-packer-verify
526 <<: *lf_jjb_verify_merge
527 # yamllint disable-line rule:key-duplicates
528 <<: *lf_packer_common
529 # yamllint disable-line rule:key-duplicates
530 <<: *lf_packer_verify_builders
532 ######################
533 # Default parameters #
534 ######################
538 #####################
539 # Job Configuration #
540 #####################
544 url: '{git-url}/{github-org}/{project}'
547 - lf-infra-github-scm:
548 url: '{git-clone-url}{github-org}/{project}'
549 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
551 submodule-recursive: '{submodule-recursive}'
552 choosing-strategy: default
553 jenkins-ssh-credential: '{jenkins-ssh-credential}'
556 - lf-infra-github-pr-trigger:
557 trigger-phrase: '^recheck$'
558 only-trigger-phrase: false
559 status-context: 'Packer Verify'
565 github_pr_admin_list: