9 - config-file-provider:
12 target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
14 - lf_packer: &lf_packer_common
15 name: lf-packer-common
16 # Provide configuration common in packer jobs.
18 ######################
19 # Default parameters #
20 ######################
26 github-url: "https://github.com"
28 submodule-recursive: true
30 submodule-disable: false
31 packer-cloud-settings: packer-cloud-env
38 project-type: freestyle
40 disabled: "{disable-job}"
43 - lf-infra-properties:
48 - lf-infra-parameters:
52 - lf-packer-parameters:
53 packer-version: "{packer-version}"
57 build-timeout: "{build-timeout}"
58 jenkins-ssh-credential: "{jenkins-ssh-credential}"
64 name: lf-infra-jjb-parameters
68 default: "{jjb-version}"
69 description: Jenkins Job Builder version to download and install.
72 default: "{jjb-cache}"
73 description: Jenkins Job Builder cache location.
76 name: lf-packer-parameters
80 default: "{packer-version}"
81 description: Packer version to download and install.
84 name: lf-puppet-parameters
87 name: PUPPET_LINT_VERSION
88 default: "{puppet-lint-version}"
89 description: Puppet-lint version to download and install.
91 - lf_jjb_common: &lf_jjb_common
94 ######################
95 # Default parameters #
96 ######################
101 github-url: "https://github.com"
102 jjb-cache: "$HOME/.cache/jenkins_jobs"
105 submodule-recursive: true
106 submodule-timeout: 10
107 submodule-disable: false
108 throttle_categories: []
109 throttle-enabled: false
110 throttle-max-per-node: 1
111 throttle-max-total: 0
112 throttle-option: "project"
114 gerrit_trigger_file_paths:
115 - compare-type: REG_EXP
117 - compare-type: REG_EXP
118 pattern: "global-jjb"
119 - compare-type: REG_EXP
122 # github_included_regions MUST match gerrit_trigger_file_paths
123 github_included_regions:
128 #####################
129 # Job Configuration #
130 #####################
132 project-type: freestyle
134 disabled: "{disable-job}"
137 - lf-infra-properties:
139 build-days-to-keep: 7
141 categories: "{obj:throttle_categories}"
142 enabled: "{throttle-enabled}"
143 max-per-node: "{throttle-max-per-node}"
144 max-total: "{throttle-max-total}"
145 option: "{throttle-option}"
148 - lf-infra-parameters:
152 - lf-infra-jjb-parameters:
153 jjb-cache: "{jjb-cache}"
154 jjb-version: "{jjb-version}"
158 build-timeout: "{build-timeout}"
159 jenkins-ssh-credential: "{jenkins-ssh-credential}"
164 ######################
165 # Gerrit Branch Lock #
166 ######################
169 name: "{project-name}-gerrit-branch-lock"
170 id: gerrit-branch-lock
172 ######################
173 # Default parameters #
174 ######################
178 git-url: "$GIT_URL/$GERRIT_PROJECT"
179 submodule-timeout: 10
180 submodule-disable: true
181 gerrit_merge_triggers:
182 - comment-added-contains-event:
183 comment-contains-value: (un)?lock branch$
185 #####################
186 # Job Configuration #
187 #####################
189 project-type: freestyle
191 disabled: "{disable-job}"
194 - lf-infra-properties:
196 build-days-to-keep: 1
199 - lf-infra-parameters:
207 jenkins-ssh-credential: "{jenkins-ssh-credential}"
210 - lf-infra-gerrit-scm:
213 branch: "$GERRIT_BRANCH"
214 submodule-recursive: false
215 submodule-timeout: "{submodule-timeout}"
216 submodule-disable: "{submodule-disable}"
217 choosing-strategy: default
218 jenkins-ssh-credential: "{jenkins-ssh-credential}"
222 server-name: "{gerrit-server-name}"
223 trigger-on: "{obj:gerrit_merge_triggers}"
225 - project-compare-type: ANT
226 project-pattern: "**"
228 - branch-compare-type: ANT
229 branch-pattern: "**/{branch}"
232 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
237 ##########################################
238 # Jenkins Configuration Management Merge #
239 ##########################################
242 name: lf-jenkins-cfg-clouds
246 properties-content: "jenkins_silos={jenkins-silos}"
247 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
248 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
251 name: lf-jenkins-cfg-global-vars
255 properties-content: "jenkins_silos={jenkins-silos}"
256 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
257 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
259 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
260 name: lf-jenkins-cfg-merge
262 ######################
263 # Default parameters #
264 ######################
269 git-url: "$GIT_URL/$GERRIT_PROJECT"
270 github-url: "https://github.com"
271 jenkins-silos: production sandbox
272 submodule-timeout: 10
273 submodule-disable: false
275 gerrit_merge_triggers:
276 - change-merged-event
277 - comment-added-contains-event:
278 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
280 gerrit_trigger_file_paths:
281 - compare-type: REG_EXP
282 pattern: 'jenkins-config\/.*'
284 # github_included_regions MUST match gerrit_trigger_file_paths
285 github_included_regions:
286 - 'jenkins-config\/.*'
288 #####################
289 # Job Configuration #
290 #####################
292 project-type: freestyle
295 disabled: "{disable-job}"
298 - lf-infra-properties:
300 build-days-to-keep: 1
303 - lf-infra-parameters:
311 jenkins-ssh-credential: "{jenkins-ssh-credential}"
315 - lf-jenkins-cfg-global-vars:
316 jenkins-silos: "{jenkins-silos}"
317 - lf-jenkins-cfg-clouds:
318 jenkins-silos: "{jenkins-silos}"
324 name: "{project-name}-jenkins-cfg-merge"
325 id: gerrit-jenkins-cfg-merge
326 <<: *lf_jenkins_cfg_merge
329 - lf-infra-gerrit-scm:
331 refspec: "refs/heads/{branch}"
333 submodule-recursive: true
334 submodule-timeout: "{submodule-timeout}"
335 submodule-disable: "{submodule-disable}"
336 choosing-strategy: default
337 jenkins-ssh-credential: "{jenkins-ssh-credential}"
340 - timed: "{obj:cron}"
342 server-name: "{gerrit-server-name}"
343 trigger-on: "{obj:gerrit_merge_triggers}"
345 - project-compare-type: ANT
346 project-pattern: "{project}"
348 - branch-compare-type: ANT
349 branch-pattern: "**/{branch}"
350 file-paths: "{obj:gerrit_trigger_file_paths}"
353 name: "{project-name}-jenkins-cfg-merge"
354 id: github-jenkins-cfg-merge
355 <<: *lf_jenkins_cfg_merge
358 - lf-infra-properties:
360 build-days-to-keep: 1
362 url: "{github-url}/{github-org}/{project}"
365 - lf-infra-github-scm:
366 url: "{git-clone-url}{github-org}/{project}"
368 branch: "refs/heads/{branch}"
369 submodule-recursive: true
370 submodule-timeout: "{submodule-timeout}"
371 submodule-disable: "{submodule-disable}"
372 choosing-strategy: default
373 jenkins-ssh-credential: "{jenkins-ssh-credential}"
376 - timed: "{obj:cron}"
380 - github-pull-request:
381 trigger-phrase: "^remerge$"
382 only-trigger-phrase: true
383 status-context: "Jenkins CFG Merge"
388 white-list: "{obj:github_pr_whitelist}"
389 admin-list: "{obj:github_pr_admin_list}"
390 included-regions: "{obj:github_included_regions}"
391 white-list-target-branches:
394 ###########################################
395 # Jenkins Configuration Management Verify #
396 ###########################################
398 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
399 name: lf-jenkins-cfg-verify
401 ######################
402 # Default parameters #
403 ######################
406 build-days-to-keep: 7
408 git-url: "$GIT_URL/$GERRIT_PROJECT"
409 github-url: "https://github.com"
410 submodule-timeout: 10
411 submodule-disable: false
413 gerrit_verify_triggers:
414 - patchset-created-event:
416 exclude-trivial-rebase: false
417 exclude-no-code-change: false
418 - draft-published-event
419 - comment-added-contains-event:
420 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
422 gerrit_trigger_file_paths:
423 - compare-type: REG_EXP
424 pattern: 'jenkins-config\/.*'
426 # github_included_regions MUST match gerrit_trigger_file_paths
427 github_included_regions:
428 - 'jenkins-config\/.*'
430 #####################
431 # Job Configuration #
432 #####################
434 project-type: freestyle
437 disabled: "{disable-job}"
440 - lf-infra-properties:
442 build-days-to-keep: 1
445 - lf-infra-parameters:
453 jenkins-ssh-credential: "{jenkins-ssh-credential}"
454 - config-file-provider:
455 # Listed after to override openstack-infra-wrappers clouds.yaml
458 - file-id: clouds-yaml
459 target: "$HOME/.config/openstack/clouds.yaml"
461 target: "$HOME/.npmrc"
463 target: "$HOME/.config/pip/pip.conf"
467 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
473 name: "{project-name}-jenkins-cfg-verify"
474 id: gerrit-jenkins-cfg-verify
475 <<: *lf_jenkins_cfg_verify
478 - lf-infra-gerrit-scm:
480 refspec: "$GERRIT_REFSPEC"
481 branch: "$GERRIT_BRANCH"
482 submodule-recursive: true
483 submodule-timeout: "{submodule-timeout}"
484 submodule-disable: "{submodule-disable}"
485 choosing-strategy: gerrit
486 jenkins-ssh-credential: "{jenkins-ssh-credential}"
490 server-name: "{gerrit-server-name}"
491 trigger-on: "{obj:gerrit_verify_triggers}"
493 - project-compare-type: ANT
494 project-pattern: "{project}"
496 - branch-compare-type: ANT
497 branch-pattern: "**/{branch}"
498 file-paths: "{obj:gerrit_trigger_file_paths}"
501 name: "{project-name}-jenkins-cfg-verify"
502 id: github-jenkins-cfg-verify
503 <<: *lf_jenkins_cfg_verify
507 url: "{github-url}/{github-org}/{project}"
510 - lf-infra-github-scm:
511 url: "{git-clone-url}{github-org}/{project}"
512 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
514 submodule-recursive: true
515 submodule-timeout: "{submodule-timeout}"
516 submodule-disable: "{submodule-disable}"
517 choosing-strategy: default
518 jenkins-ssh-credential: "{jenkins-ssh-credential}"
521 - github-pull-request:
522 trigger-phrase: "^(recheck|reverify)$"
523 only-trigger-phrase: false
524 status-context: "Jenkins CFG Verify"
527 included-regions: "{obj:github_included_regions}"
528 white-list-target-branches:
531 ###########################
532 # JENKINS SANDBOX CLEANUP #
533 ###########################
535 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
536 name: lf-jenkins-sandbox-cleanup
538 ######################
539 # Default parameters #
540 ######################
543 # Run every Saturday at 08:00 UTC
547 #####################
548 # Job Configuration #
549 #####################
551 project-type: freestyle
554 disabled: "{disable-job}"
557 - lf-infra-jjb-parameters:
558 jjb-cache: "{jjb-cache}"
559 jjb-version: "{jjb-version}"
562 - timed: "{obj:cron}"
566 - shell: !include-raw-escape:
567 - ../shell/jenkins-sandbox-cleanup.sh
570 name: "{project-name}-jenkins-sandbox-cleanup"
571 id: gerrit-jenkins-sandbox-cleanup
573 # yamllint disable-line rule:key-duplicates
574 <<: *lf_jenkins_sandbox_cleanup
577 name: "{project-name}-jenkins-sandbox-cleanup"
578 id: github-jenkins-sandbox-cleanup
580 # yamllint disable-line rule:key-duplicates
581 <<: *lf_jenkins_sandbox_cleanup
587 - lf_jjb_deploy_job: &lf_jjb_deploy_job
588 name: lf-jjb-deploy-job
590 ######################
591 # Default parameters #
592 ######################
596 # jjb-deploy should always clone $PROJECT regardless of what
597 # $GERRIT_PROJECT triggered the job.
598 git-url: "$GIT_URL/$PROJECT"
599 github-url: "https://github.com"
601 submodule-timeout: 10
602 submodule-disable: false
603 gerrit_jjb_deploy_job_triggers:
604 - comment-added-contains-event:
605 comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
607 #####################
608 # Job Configuration #
609 #####################
611 project-type: freestyle
614 disabled: "{disable-job}"
617 - lf-infra-properties:
619 build-days-to-keep: 1
622 - lf-infra-parameters:
630 jenkins-ssh-credential: "{jenkins-ssh-credential}"
634 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
640 name: "{project-name}-jjb-deploy-job"
641 id: gerrit-jjb-deploy-job
642 <<: *lf_jjb_deploy_job
645 - lf-infra-gerrit-scm:
647 refspec: "refs/heads/{branch}"
649 submodule-recursive: true
650 submodule-timeout: "{submodule-timeout}"
651 submodule-disable: "{submodule-disable}"
652 choosing-strategy: default
653 jenkins-ssh-credential: "{jenkins-ssh-credential}"
657 server-name: "{gerrit-server-name}"
658 trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
660 - project-compare-type: ANT
661 project-pattern: "**"
663 - branch-compare-type: ANT
672 name: "{project-name}-jjb-deploy-job"
673 id: github-jjb-deploy-job
674 <<: *lf_jjb_deploy_job
677 - lf-infra-properties:
679 build-days-to-keep: 1
681 url: "{github-url}/{github-org}/{project}"
684 - lf-infra-github-scm:
685 url: "{git-clone-url}{github-org}/{project}"
686 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
688 submodule-recursive: true
689 submodule-timeout: "{submodule-timeout}"
690 submodule-disable: "{submodule-disable}"
691 choosing-strategy: default
692 jenkins-ssh-credential: "{jenkins-ssh-credential}"
695 - github-pull-request:
696 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
697 only-trigger-phrase: true
698 status-context: "JJB Deploy Job"
701 white-list-target-branches:
708 - lf_jjb_merge: &lf_jjb_merge
711 ######################
712 # Default parameters #
713 ######################
717 gerrit_merge_triggers:
718 - change-merged-event
719 - comment-added-contains-event:
720 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
722 #####################
723 # Job Configuration #
724 #####################
730 properties-content: JJB_WORKERS={jjb-workers}
731 - shell: !include-raw-escape:
732 - ../shell/jjb-merge-job.sh
735 name: "{project-name}-jjb-merge"
738 # yamllint disable-line rule:key-duplicates
741 git-url: "$GIT_URL/$GERRIT_PROJECT"
744 - lf-infra-gerrit-scm:
748 submodule-recursive: "{submodule-recursive}"
749 submodule-timeout: "{submodule-timeout}"
750 submodule-disable: "{submodule-disable}"
751 choosing-strategy: default
752 jenkins-ssh-credential: "{jenkins-ssh-credential}"
756 server-name: "{gerrit-server-name}"
757 trigger-on: "{obj:gerrit_merge_triggers}"
759 - project-compare-type: ANT
760 project-pattern: "{project}"
762 - branch-compare-type: ANT
763 branch-pattern: "**/{branch}"
764 file-paths: "{obj:gerrit_trigger_file_paths}"
767 name: "{project-name}-jjb-merge"
770 # yamllint disable-line rule:key-duplicates
773 #####################
774 # Job Configuration #
775 #####################
778 - lf-infra-properties:
780 build-days-to-keep: 7
782 url: "{github-url}/{github-org}/{project}"
785 - lf-infra-github-scm:
786 url: "{git-clone-url}{github-org}/{project}"
788 branch: "refs/heads/{branch}"
789 submodule-recursive: "{submodule-recursive}"
790 submodule-timeout: "{submodule-timeout}"
791 submodule-disable: "{submodule-disable}"
792 choosing-strategy: default
793 jenkins-ssh-credential: "{jenkins-ssh-credential}"
799 - github-pull-request:
800 trigger-phrase: "^remerge$"
801 only-trigger-phrase: true
802 status-context: "JJB Merge"
807 white-list: "{obj:github_pr_whitelist}"
808 admin-list: "{obj:github_pr_admin_list}"
809 included-regions: "{obj:github_included_regions}"
810 white-list-target-branches:
817 - lf_jjb_verify: &lf_jjb_verify
820 ######################
821 # Default parameters #
822 ######################
824 build-concurrent: true
826 gerrit_verify_triggers:
827 - patchset-created-event:
829 exclude-trivial-rebase: false
830 exclude-no-code-change: false
831 - draft-published-event
832 - comment-added-contains-event:
833 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
835 #####################
836 # Job Configuration #
837 #####################
839 concurrent: "{build-concurrent}"
844 - shell: !include-raw-escape:
845 - ../shell/jjb-verify-job.sh
846 - lf-infra-gpg-verify-git-signature
849 name: "{project-name}-jjb-verify"
850 id: gerrit-jjb-verify
852 # yamllint disable-line rule:key-duplicates
855 ######################
856 # Default parameters #
857 ######################
859 git-url: "$GIT_URL/$GERRIT_PROJECT"
861 #####################
862 # Job Configuration #
863 #####################
866 - lf-infra-gerrit-scm:
868 refspec: "$GERRIT_REFSPEC"
869 branch: "$GERRIT_BRANCH"
870 submodule-recursive: "{submodule-recursive}"
871 submodule-timeout: "{submodule-timeout}"
872 submodule-disable: "{submodule-disable}"
873 choosing-strategy: gerrit
874 jenkins-ssh-credential: "{jenkins-ssh-credential}"
878 server-name: "{gerrit-server-name}"
879 trigger-on: "{obj:gerrit_verify_triggers}"
881 - project-compare-type: ANT
882 project-pattern: "{project}"
884 - branch-compare-type: ANT
885 branch-pattern: "**/{branch}"
886 file-paths: "{obj:gerrit_trigger_file_paths}"
889 name: "{project-name}-jjb-verify"
890 id: github-jjb-verify
892 # yamllint disable-line rule:key-duplicates
895 #####################
896 # Job Configuration #
897 #####################
900 - lf-infra-properties:
902 build-days-to-keep: 7
904 url: "{github-url}/{github-org}/{project}"
907 - lf-infra-github-scm:
908 url: "{git-clone-url}{github-org}/{project}"
909 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
911 submodule-recursive: "{submodule-recursive}"
912 submodule-timeout: "{submodule-timeout}"
913 submodule-disable: "{submodule-disable}"
914 choosing-strategy: default
915 jenkins-ssh-credential: "{jenkins-ssh-credential}"
918 - github-pull-request:
919 trigger-phrase: "^(recheck|reverify)$"
920 only-trigger-phrase: false
921 status-context: "JJB Verify"
924 included-regions: "{obj:github_included_regions}"
925 white-list-target-branches:
928 ############################
929 # JJB Verify Upstream GJJB #
930 ############################
932 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
933 name: lf-jjb-verify-upstream-gjjb
935 #####################
936 # Job Configuration #
937 #####################
944 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
945 git cherry-pick FETCH_HEAD
947 - shell: !include-raw-escape:
948 - ../shell/jjb-verify-job.sh
949 - lf-infra-gpg-verify-git-signature
952 name: "{project-name}-jjb-verify-upstream-gjjb"
953 id: gerrit-jjb-verify-upstream-gjjb
955 # yamllint disable-line rule:key-duplicates
956 <<: *lf_jjb_verify_upstream_gjjb
958 ######################
959 # Default parameters #
960 ######################
962 git-url: "$GIT_URL/$PROJECT"
963 submodule-timeout: 10
964 submodule-disable: false
966 #####################
967 # Job Configuration #
968 #####################
971 - lf-infra-gerrit-scm:
975 submodule-recursive: true
976 submodule-timeout: "{submodule-timeout}"
977 submodule-disable: "{submodule-disable}"
978 choosing-strategy: default
979 jenkins-ssh-credential: "{jenkins-ssh-credential}"
983 server-name: "LinuxFoundation"
985 - patchset-created-event:
987 exclude-trivial-rebase: false
988 exclude-no-code-change: false
989 - draft-published-event
990 - comment-added-contains-event:
991 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
993 - project-compare-type: ANT
994 project-pattern: "releng/global-jjb"
996 - branch-compare-type: ANT
997 branch-pattern: "**/master"
999 gerrit-build-failed-codereview-value: -1
1000 gerrit-build-failed-verified-value: 0
1001 gerrit-build-successful-codereview-value: 1
1002 gerrit-build-successful-verified-value: 0
1008 - lf_license_check: &lf_license_check
1009 name: lf-license-check
1011 ######################
1012 # Default parameters #
1013 ######################
1016 build-days-to-keep: 7
1025 git-url: "$GIT_URL/$PROJECT"
1026 github-url: "https://github.com"
1028 license-exclude-paths: ""
1029 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1030 project-pattern: "**"
1033 submodule-timeout: 10
1034 submodule-disable: false
1036 #####################
1037 # Job Configuration #
1038 #####################
1040 project-type: freestyle
1041 node: "{build-node}"
1043 disabled: "{disable-job}"
1046 - lf-infra-properties:
1047 build-days-to-keep: "{build-days-to-keep}"
1050 - lf-infra-parameters:
1051 project: "{project}"
1056 - lf-infra-wrappers:
1057 build-timeout: "{build-timeout}"
1058 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1062 file-patterns: "{file-patterns}"
1063 spdx-disable: "{spdx-disable}"
1064 lhc-version: "{lhc-version}"
1065 license-exclude-paths: "{license-exclude-paths}"
1066 licenses-allowed: "{licenses-allowed}"
1072 name: "{project-name}-license-check"
1073 id: gerrit-license-check
1074 <<: *lf_license_check
1076 git-url: "$GIT_URL/$GERRIT_PROJECT"
1079 - lf-infra-gerrit-scm:
1080 git-url: "{git-url}"
1081 refspec: "$GERRIT_REFSPEC"
1082 branch: "$GERRIT_BRANCH"
1083 # Submodules are out of the project's control
1084 submodule-recursive: false
1085 submodule-timeout: "{submodule-timeout}"
1086 submodule-disable: "{submodule-disable}"
1087 choosing-strategy: gerrit
1088 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1092 server-name: "{gerrit-server-name}"
1093 # Trigger should not be overridable as we want to always run
1095 - patchset-created-event:
1096 exclude-drafts: false
1097 exclude-trivial-rebase: false
1098 exclude-no-code-change: false
1099 - draft-published-event
1100 - comment-added-contains-event:
1101 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1103 - project-compare-type: ANT
1104 project-pattern: "{project-pattern}"
1106 - branch-compare-type: ANT
1107 branch-pattern: "**"
1110 name: "{project-name}-license-check"
1111 id: github-license-check
1112 <<: *lf_license_check
1115 - lf-infra-properties:
1116 build-days-to-keep: "{build-days-to-keep}"
1118 url: "{github-url}/{github-org}/{project}"
1121 - lf-infra-github-scm:
1122 url: "{git-clone-url}{github-org}/{project}"
1123 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1125 # Submodules are out of the project's control
1126 submodule-recursive: false
1127 submodule-timeout: "{submodule-timeout}"
1128 submodule-disable: "{submodule-disable}"
1129 choosing-strategy: default
1130 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1133 - github-pull-request:
1134 trigger-phrase: "^recheck$"
1135 only-trigger-phrase: false
1136 status-context: "License Check"
1139 white-list-target-branches:
1142 ####################
1143 # Info YAML Verify #
1144 ####################
1146 - lf_info_yaml_verify: &lf_info_yaml_verify
1147 name: lf-info-yaml-verify
1149 ######################
1150 # Default parameters #
1151 ######################
1153 gerrit_verify_triggers:
1154 - patchset-created-event:
1155 exclude-drafts: true
1156 exclude-trivial-rebase: false
1157 exclude-no-code-change: false
1158 - draft-published-event
1159 - comment-added-contains-event:
1160 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1162 #####################
1163 # Job Configuration #
1164 #####################
1169 - shell: !include-raw-escape:
1170 - ../shell/git-validate-info-yaml.sh
1171 - ../shell/info-file-validate.sh
1174 name: "{project-name}-info-yaml-verify"
1175 id: gerrit-info-yaml-verify
1177 # yamllint disable-line rule:key-duplicates
1178 <<: *lf_info_yaml_verify
1180 git-url: "$GIT_URL/$GERRIT_PROJECT"
1183 - lf-infra-gerrit-scm:
1184 git-url: "{git-url}"
1185 refspec: "$GERRIT_REFSPEC"
1186 branch: "$GERRIT_BRANCH"
1187 submodule-recursive: "{submodule-recursive}"
1188 submodule-timeout: "{submodule-timeout}"
1189 submodule-disable: "{submodule-disable}"
1190 choosing-strategy: gerrit
1191 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1195 server-name: "{gerrit-server-name}"
1196 trigger-on: "{obj:gerrit_verify_triggers}"
1198 - project-compare-type: ANT
1199 project-pattern: "{project}"
1201 - branch-compare-type: ANT
1202 branch-pattern: "**/{branch}"
1204 - compare-type: REG_EXP
1205 pattern: "INFO.yaml"
1208 name: "{project-name}-info-yaml-verify"
1209 id: github-info-yaml-verify
1211 # yamllint disable-line rule:key-duplicates
1212 <<: *lf_info_yaml_verify
1214 github-url: "https://github.com"
1217 url: "{github-url}/{github-org}/{project}"
1220 - lf-infra-github-scm:
1221 url: "{git-clone-url}{github-org}/{project}"
1222 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1224 submodule-recursive: "{submodule-recursive}"
1225 submodule-timeout: "{submodule-timeout}"
1226 submodule-disable: "{submodule-disable}"
1227 choosing-strategy: default
1228 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1231 - github-pull-request:
1232 trigger-phrase: "^(recheck|reverify)$"
1233 only-trigger-phrase: false
1234 status-context: "INFO File Verify"
1237 # included-regions MUST match gerrit file-paths
1238 included-regions: "INFO.yaml"
1239 white-list-target-branches:
1246 - lf_openstack_cron: &lf_openstack_cron
1247 name: lf-openstack-cron
1249 ######################
1250 # Default parameters #
1251 ######################
1254 build-days-to-keep: 7
1258 git-url: "$GIT_URL/$PROJECT"
1259 github-url: "https://github.com"
1260 openstack-cloud: vex
1261 openstack-image-cleanup: true
1262 openstack-image-cleanup-age: 30
1263 openstack-image-protect: true
1264 openstack-port-cleanup: true
1265 openstack-server-cleanup: true
1266 openstack-stack-cleanup: true
1267 openstack-volume-cleanup: true
1269 submodule-timeout: 10
1270 submodule-disable: false
1272 #####################
1273 # Job Configuration #
1274 #####################
1276 project-type: freestyle
1277 node: "{build-node}"
1279 disabled: "{disable-job}"
1282 - lf-infra-properties:
1283 build-days-to-keep: "{build-days-to-keep}"
1286 - lf-infra-parameters:
1287 project: "{project}"
1292 default: "{jenkins-urls}"
1294 Space separated list of Jenkins URLs to check for active builds.
1297 - lf-infra-wrappers:
1298 build-timeout: "{build-timeout}"
1299 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1300 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1301 - config-file-provider:
1303 - file-id: clouds-yaml
1304 target: "$HOME/.config/openstack/clouds.yaml"
1306 target: "$HOME/.npmrc"
1308 target: "$HOME/.config/pip/pip.conf"
1311 - timed: "{obj:cron}"
1314 - lf-infra-pre-build
1316 properties-content: OS_CLOUD={openstack-cloud}
1319 condition-kind: boolean-expression
1320 condition-expression: "{openstack-stack-cleanup}"
1322 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1325 condition-kind: boolean-expression
1326 condition-expression: "{openstack-server-cleanup}"
1328 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1331 condition-kind: boolean-expression
1332 condition-expression: "{openstack-port-cleanup}"
1334 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1337 condition-kind: boolean-expression
1338 condition-expression: "{openstack-volume-cleanup}"
1340 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1343 condition-kind: boolean-expression
1344 condition-expression: "{openstack-image-protect}"
1346 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1348 condition-kind: boolean-expression
1349 condition-expression: "{openstack-image-cleanup}"
1352 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1353 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1359 name: "{project-name}-openstack-cron"
1360 id: gerrit-openstack-cron
1361 <<: *lf_openstack_cron
1364 - lf-infra-gerrit-scm:
1365 git-url: "{git-url}"
1366 refspec: "refs/heads/{branch}"
1368 submodule-recursive: true
1369 submodule-timeout: "{submodule-timeout}"
1370 submodule-disable: "{submodule-disable}"
1371 choosing-strategy: default
1372 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1375 name: "{project-name}-openstack-cron"
1376 id: github-openstack-cron
1377 <<: *lf_openstack_cron
1380 - lf-infra-github-scm:
1381 url: "{git-clone-url}{github-org}/{project}"
1383 branch: "refs/heads/{branch}"
1384 submodule-recursive: true
1385 submodule-timeout: "{submodule-timeout}"
1386 submodule-disable: "{submodule-disable}"
1387 choosing-strategy: default
1388 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1394 - lf_packer_merge: &lf_packer_merge
1395 name: lf-packer-merge
1397 ######################
1398 # Default parameters #
1399 ######################
1402 openstack-cloud: vex
1403 update-cloud-image: false
1405 #####################
1406 # Job Configuration #
1407 #####################
1410 - lf-infra-parameters:
1411 project: "{project}"
1414 - lf-packer-parameters:
1415 packer-version: "{packer-version}"
1417 name: UPDATE_CLOUD_IMAGE
1418 default: "{update-cloud-image}"
1419 description: "Update new built image on the cloud."
1422 - lf-infra-packer-build:
1423 openstack: "{openstack}"
1424 openstack-cloud: "{openstack-cloud}"
1425 packer-cloud-settings: "{packer-cloud-settings}"
1426 packer-version: "{packer-version}"
1427 platform: "{platforms}"
1428 template: "{templates}"
1429 update-cloud-image: "{update-cloud-image}"
1430 - description-setter:
1431 regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1432 description: 'Image: \2'
1434 # - project: '{project-name}-openstack-update-cloud-image'
1436 # predefined-parameters: |
1437 # GERRIT_BRANCH=$GERRIT_BRANCH
1438 # GERRIT_PROJECT=$GERRIT_PROJECT
1439 # GERRIT_REFSPEC=$GERRIT_REFSPEC
1440 # NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1441 # property-file: variables.jenkins-trigger
1442 # property-file-fail-on-missing: true
1446 - trigger-parameterized-builds:
1447 - project: "{project-name}-openstack-update-cloud-image"
1448 condition: UNSTABLE_OR_BETTER
1449 predefined-parameters: |
1450 NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1451 property-file: variables.jenkins-trigger
1452 fail-on-missing: true
1455 name: "{project-name}-packer-merge-{platforms}-{templates}"
1456 id: gerrit-packer-merge
1457 <<: *lf_packer_common
1458 # yamllint disable-line rule:key-duplicates
1459 <<: *lf_packer_merge
1461 ######################
1462 # Default parameters #
1463 ######################
1465 git-url: "$GIT_URL/$GERRIT_PROJECT"
1467 gerrit_merge_triggers:
1468 - change-merged-event
1469 - comment-added-contains-event:
1470 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1472 #####################
1473 # Job Configuration #
1474 #####################
1477 - lf-infra-gerrit-scm:
1478 git-url: "{git-url}"
1479 refspec: "$GERRIT_REFSPEC"
1480 branch: "$GERRIT_BRANCH"
1481 submodule-recursive: "{submodule-recursive}"
1482 submodule-timeout: "{submodule-timeout}"
1483 submodule-disable: "{submodule-disable}"
1484 choosing-strategy: default
1485 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1488 - timed: "{obj:cron}"
1490 server-name: "{gerrit-server-name}"
1491 trigger-on: "{obj:gerrit_merge_triggers}"
1493 - project-compare-type: ANT
1494 project-pattern: "{project}"
1496 - branch-compare-type: ANT
1497 branch-pattern: "**/{branch}"
1499 - compare-type: REG_EXP
1500 pattern: 'packer\/provision\/.*\.sh'
1501 - compare-type: REG_EXP
1502 pattern: 'packer\/provision\/.*\.bat'
1503 - compare-type: REG_EXP
1504 pattern: 'packer\/provision\/.*\.ps1'
1505 - compare-type: REG_EXP
1506 pattern: 'packer\/provision\/{templates}\.yaml'
1507 - compare-type: REG_EXP
1508 pattern: 'packer\/provision\/local-{templates}\.yaml'
1509 - compare-type: REG_EXP
1510 pattern: 'packer\/templates\/{templates}\.json'
1511 - compare-type: REG_EXP
1512 pattern: 'packer\/vars\/{platforms}\.json'
1515 name: "{project-name}-packer-merge-{platforms}-{templates}"
1516 id: github-packer-merge
1517 <<: *lf_packer_common
1518 # yamllint disable-line rule:key-duplicates
1519 <<: *lf_packer_merge
1521 #####################
1522 # Job Configuration #
1523 #####################
1526 - lf-infra-properties:
1527 project: "{project}"
1528 build-days-to-keep: 7
1530 url: "{github-url}/{github-org}/{project}"
1533 - lf-infra-github-scm:
1534 url: "{git-clone-url}{github-org}/{project}"
1536 +refs/heads/*:refs/remotes/origin/*
1537 +refs/pull/*:refs/remotes/origin/pr/*
1538 branch: "$GERRIT_REFSPEC"
1539 submodule-recursive: "{submodule-recursive}"
1540 submodule-timeout: "{submodule-timeout}"
1541 submodule-disable: "{submodule-disable}"
1542 choosing-strategy: default
1543 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1546 - timed: "{obj:cron}"
1551 - github-pull-request:
1552 trigger-phrase: "^remerge$"
1553 only-trigger-phrase: true
1554 status-context: "Packer {platforms}-{templates} Merge"
1559 white-list: "{obj:github_pr_whitelist}"
1560 admin-list: "{obj:github_pr_admin_list}"
1561 # included-regions MUST match Gerrit Trigger file-paths
1563 - 'packer\/provision\/.*\.sh'
1564 - 'packer\/provision\/.*\.bat'
1565 - 'packer\/provision\/.*\.ps1'
1566 - 'packer\/provision\/{templates}\.yaml'
1567 - 'packer\/provision\/local-{templates}\.yaml'
1568 - 'packer\/templates\/{templates}\.json'
1569 - 'packer\/vars\/{platforms}\.json'
1570 white-list-target-branches:
1577 - lf_packer_verify: &lf_packer_verify
1578 name: lf-packer-verify
1580 ######################
1581 # Default parameters #
1582 ######################
1586 openstack-cloud: vex
1588 gerrit_verify_triggers:
1589 - patchset-created-event:
1590 exclude-drafts: true
1591 exclude-trivial-rebase: false
1592 exclude-no-code-change: false
1593 - draft-published-event
1594 - comment-added-contains-event:
1595 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1597 gerrit_trigger_file_paths:
1598 - compare-type: REG_EXP
1599 pattern: 'packer\/.*'
1601 # github_included_regions MUST match gerrit_trigger_file_paths
1602 github_included_regions:
1605 #####################
1606 # Job Configuration #
1607 #####################
1612 - lf-infra-packer-validate:
1613 openstack: "{openstack}"
1614 openstack-cloud: "{openstack-cloud}"
1615 packer-cloud-settings: "{packer-cloud-settings}"
1616 packer-version: "{packer-version}"
1619 name: "{project-name}-packer-verify"
1620 id: gerrit-packer-verify
1621 <<: *lf_packer_common
1622 # yamllint disable-line rule:key-duplicates
1623 <<: *lf_packer_verify
1625 ######################
1626 # Default parameters #
1627 ######################
1629 git-url: "$GIT_URL/$GERRIT_PROJECT"
1631 #####################
1632 # Job Configuration #
1633 #####################
1636 - lf-infra-gerrit-scm:
1637 git-url: "{git-url}"
1638 refspec: "$GERRIT_REFSPEC"
1639 branch: "$GERRIT_BRANCH"
1640 submodule-recursive: "{submodule-recursive}"
1641 submodule-timeout: "{submodule-timeout}"
1642 submodule-disable: "{submodule-disable}"
1643 choosing-strategy: gerrit
1644 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1648 server-name: "{gerrit-server-name}"
1649 trigger-on: "{obj:gerrit_verify_triggers}"
1651 - project-compare-type: ANT
1652 project-pattern: "{project}"
1654 - branch-compare-type: ANT
1655 branch-pattern: "**/{branch}"
1656 file-paths: "{obj:gerrit_trigger_file_paths}"
1659 name: "{project-name}-packer-verify"
1660 id: github-packer-verify
1661 <<: *lf_packer_common
1662 # yamllint disable-line rule:key-duplicates
1663 <<: *lf_packer_verify
1665 #####################
1666 # Job Configuration #
1667 #####################
1670 - lf-infra-properties:
1671 project: "{project}"
1672 build-days-to-keep: 7
1674 url: "{github-url}/{github-org}/{project}"
1677 - lf-infra-github-scm:
1678 url: "{git-clone-url}{github-org}/{project}"
1679 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1681 submodule-recursive: "{submodule-recursive}"
1682 submodule-timeout: "{submodule-timeout}"
1683 submodule-disable: "{submodule-disable}"
1684 choosing-strategy: default
1685 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1688 - github-pull-request:
1689 trigger-phrase: "^(recheck|reverify)$"
1690 only-trigger-phrase: false
1691 status-context: "Packer Verify"
1694 included-regions: "{obj:github_included_regions}"
1695 white-list-target-branches:
1698 ################################
1699 # Openstack Update Cloud Image #
1700 ################################
1702 - lf_openstack_cron: &lf_openstack_update_cloud_image
1703 name: lf-openstack-update-cloud-image
1705 ######################
1706 # Default parameters #
1707 ######################
1710 build-days-to-keep: 7
1714 git-url: "$GIT_URL/$PROJECT"
1715 github-url: "https://github.com"
1716 new-image-name: "all"
1717 openstack-cloud: vex
1719 submodule-timeout: 10
1720 submodule-disable: false
1721 update-cloud-image: false
1723 #####################
1724 # Job Configuration #
1725 #####################
1727 project-type: freestyle
1728 node: "{build-node}"
1730 disabled: "{disable-job}"
1733 - lf-infra-properties:
1734 build-days-to-keep: "{build-days-to-keep}"
1737 - lf-infra-parameters:
1738 project: "{project}"
1742 name: NEW_IMAGE_NAME
1743 default: "{new-image-name}"
1744 description: "Name of cloud image to update in Jenkins"
1747 - lf-infra-wrappers:
1748 build-timeout: "{build-timeout}"
1749 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1750 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1751 - config-file-provider:
1753 - file-id: clouds-yaml
1754 target: "$HOME/.config/openstack/clouds.yaml"
1756 target: "$HOME/.npmrc"
1758 target: "$HOME/.config/pip/pip.conf"
1761 - lf-infra-pre-build
1763 properties-content: |
1764 OS_CLOUD={openstack-cloud}
1767 echo "Extract the image type for commit message"
1768 # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1769 IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1770 echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1773 properties-file: "image-type.txt"
1774 - lf-infra-update-packer-images
1775 - lf-infra-push-gerrit-patch:
1776 project: "{project}"
1777 gerrit-user: "{gerrit-user}"
1778 gerrit-host: "{gerrit-host}"
1779 gerrit-topic: "{gerrit-topic}"
1780 gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1781 reviewers-email: "{reviewers-email}"
1787 name: "{project-name}-openstack-update-cloud-image"
1788 id: gerrit-openstack-update-cloud-image
1789 <<: *lf_openstack_update_cloud_image
1791 ######################
1792 # Default parameters #
1793 ######################
1795 git-url: "$GIT_URL/$GERRIT_PROJECT"
1797 #####################
1798 # Job Configuration #
1799 #####################
1802 - lf-infra-gerrit-scm:
1803 git-url: "{git-url}"
1804 refspec: "$GERRIT_REFSPEC"
1805 branch: "$GERRIT_BRANCH"
1806 submodule-recursive: false
1807 submodule-timeout: "{submodule-timeout}"
1808 submodule-disable: "{submodule-disable}"
1809 choosing-strategy: gerrit
1810 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1813 - timed: "{obj:cron}"
1819 - lf_puppet_verify: &lf_puppet_verify
1820 name: lf-puppet-verify
1822 ######################
1823 # Default parameters #
1824 ######################
1827 build-days-to-keep: 7
1830 git-url: "$GIT_URL/$GERRIT_PROJECT"
1831 github-url: "https://github.com"
1834 puppet-lint-version: 2.3.6
1836 submodule-recursive: true
1837 submodule-timeout: 10
1838 submodule-disable: false
1840 gerrit_trigger_file_paths:
1841 - compare-type: REG_EXP
1844 # github_included_regions MUST match gerrit_trigger_file_paths
1845 github_included_regions:
1848 #####################
1849 # Job Configuration #
1850 #####################
1852 project-type: freestyle
1853 node: "{build-node}"
1855 disabled: "{disable-job}"
1858 - lf-infra-properties:
1859 build-days-to-keep: "{build-days-to-keep}"
1862 - lf-infra-parameters:
1863 project: "{project}"
1866 - lf-puppet-parameters:
1867 puppet-lint-version: "{puppet-lint-version}"
1870 - lf-infra-wrappers:
1871 build-timeout: "{build-timeout}"
1872 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1875 - shell: !include-raw-escape: ../shell/puppet-lint.sh
1881 name: "{project-name}-puppet-verify"
1882 id: gerrit-puppet-verify
1883 <<: *lf_puppet_verify
1885 ######################
1886 # Default parameters #
1887 ######################
1889 gerrit_verify_triggers:
1890 - patchset-created-event:
1891 exclude-drafts: true
1892 exclude-trivial-rebase: false
1893 exclude-no-code-change: false
1894 - draft-published-event
1895 - comment-added-contains-event:
1896 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1898 #####################
1899 # Job Configuration #
1900 #####################
1903 - lf-infra-gerrit-scm:
1904 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1905 git-url: "{git-url}"
1906 refspec: "$GERRIT_REFSPEC"
1907 branch: "$GERRIT_BRANCH"
1908 submodule-recursive: "{submodule-recursive}"
1909 submodule-timeout: "{submodule-timeout}"
1910 submodule-disable: "{submodule-disable}"
1911 choosing-strategy: gerrit
1915 server-name: "{gerrit-server-name}"
1916 trigger-on: "{obj:gerrit_verify_triggers}"
1918 - project-compare-type: ANT
1919 project-pattern: "{project}"
1921 - branch-compare-type: ANT
1922 branch-pattern: "**/{branch}"
1923 file-paths: "{obj:gerrit_trigger_file_paths}"
1926 name: "{project-name}-puppet-verify"
1927 id: github-puppet-verify
1928 <<: *lf_puppet_verify
1930 #####################
1931 # Job Configuration #
1932 #####################
1935 - lf-infra-properties:
1936 project: "{project}"
1937 build-days-to-keep: 7
1939 url: "{github-url}/{github-org}/{project}"
1942 - lf-infra-github-scm:
1943 url: "{git-clone-url}{github-org}/{project}"
1944 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1946 submodule-recursive: "{submodule-recursive}"
1947 submodule-timeout: "{submodule-timeout}"
1948 submodule-disable: "{submodule-disable}"
1949 choosing-strategy: default
1950 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1953 - github-pull-request:
1954 trigger-phrase: "^(recheck|reverify)$"
1955 only-trigger-phrase: false
1956 status-context: "Puppet Verify"
1959 included-regions: "{obj:github_included_regions}"
1960 white-list-target-branches:
1967 - lf_sonar_common: &lf_sonar_common
1968 name: lf-sonar-common
1970 ######################
1971 # Default parameters #
1972 ######################
1974 archive-artifacts: >
1977 branch: master # Sonar should always be run on master branch
1978 build-days-to-keep: 7
1980 cron: "H H * * *" # run daily
1982 git-url: "$GIT_URL/$PROJECT"
1983 github-url: "https://github.com"
1985 submodule-recursive: true
1986 submodule-timeout: 10
1987 submodule-disable: false
1991 sonar-project-file: "sonar-project.properties"
1992 sonar-properties: ""
1994 sonar-additional-args: ""
1996 gerrit_trigger_file_paths:
1997 - compare-type: REG_EXP
2000 # github_included_regions MUST match gerrit_trigger_file_paths
2001 github_included_regions:
2004 #####################
2005 # Job Configuration #
2006 #####################
2008 project-type: freestyle
2009 node: "{build-node}"
2012 - lf-infra-properties:
2013 build-days-to-keep: "{build-days-to-keep}"
2016 - lf-infra-wrappers:
2017 build-timeout: "{build-timeout}"
2018 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2020 disabled: "{disable-job}"
2023 - lf-infra-parameters:
2024 project: "{project}"
2028 name: ARCHIVE_ARTIFACTS
2029 default: "{archive-artifacts}"
2030 description: Artifacts to archive to the logs server.
2035 - lf_sonar_builders: &lf_sonar_builders
2036 name: lf-sonar-builders
2038 - lf-infra-pre-build
2040 sonar-task: "{sonar-task}"
2041 sonar-project-file: "{sonar-project-file}"
2042 sonar-properties: "{sonar-properties}"
2043 sonar-java-opts: "{sonar-java-opts}"
2044 sonar-additional-args: "{sonar-additional-args}"
2046 - lf_sonar_builders_prescan: &lf_sonar_builders_prescan
2047 name: lf-sonar-builders-prescan
2049 - lf-infra-pre-build
2050 - lf-infra-sonar-with-prescan:
2051 sonar-task: "{sonar-task}"
2052 sonar-project-file: "{sonar-project-file}"
2053 sonar-properties: "{sonar-properties}"
2054 sonar-java-opts: "{sonar-java-opts}"
2055 sonar-additional-args: "{sonar-additional-args}"
2057 - lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script
2058 name: lf-sonar-builders-prescan-script
2060 - lf-infra-pre-build
2061 - shell: "{sonar-prescan-script}"
2063 sonar-task: "{sonar-task}"
2064 sonar-project-file: "{sonar-project-file}"
2065 sonar-properties: "{sonar-properties}"
2066 sonar-java-opts: "{sonar-java-opts}"
2067 sonar-additional-args: "{sonar-additional-args}"
2069 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2070 name: lf-sonar-gerrit-common
2071 gerrit_sonar_triggers:
2072 - comment-added-contains-event:
2073 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2076 - lf-infra-gerrit-scm:
2077 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2078 git-url: "{git-url}"
2079 refspec: $GERRIT_REFSPEC
2080 branch: $GERRIT_BRANCH
2081 submodule-recursive: "{submodule-recursive}"
2082 submodule-timeout: "{submodule-timeout}"
2083 submodule-disable: "{submodule-disable}"
2084 choosing-strategy: default
2087 - timed: "{obj:cron}"
2089 server-name: "{gerrit-server-name}"
2090 trigger-on: "{obj:gerrit_sonar_triggers}"
2092 - project-compare-type: "ANT"
2093 project-pattern: "{project}"
2095 - branch-compare-type: "ANT"
2096 branch-pattern: "**/{branch}"
2097 file-paths: "{obj:gerrit_trigger_file_paths}"
2104 - lf_sonar_github_common: &lf_sonar_github_common
2105 name: lf-sonar-github-common
2107 - lf-infra-properties:
2108 build-days-to-keep: "{build-days-to-keep}"
2110 url: "{github-url}/{github-org}/{project}"
2113 - lf-infra-github-scm:
2114 url: "{git-clone-url}{github-org}/{project}"
2115 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2117 submodule-recursive: "{submodule-recursive}"
2118 submodule-timeout: "{submodule-timeout}"
2119 submodule-disable: "{submodule-disable}"
2120 choosing-strategy: default
2121 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2124 - github-pull-request:
2125 trigger-phrase: "^run-sonar$"
2126 only-trigger-phrase: false
2127 status-context: "Python Sonar"
2130 white-list-target-branches:
2132 included-regions: "{obj:github_included_regions}"
2135 name: "{project-name}-sonar"
2137 <<: *lf_sonar_common
2138 # yamllint disable-line rule:key-duplicates
2139 <<: *lf_sonar_builders
2140 # yamllint disable-line rule:key-duplicates
2141 <<: *lf_sonar_gerrit_common
2144 name: "{project-name}-sonar"
2146 <<: *lf_sonar_common
2147 # yamllint disable-line rule:key-duplicates
2148 <<: *lf_sonar_builders
2149 # yamllint disable-line rule:key-duplicates
2150 <<: *lf_sonar_github_common
2153 name: "{project-name}-sonar-prescan"
2154 id: gerrit-sonar-prescan
2155 <<: *lf_sonar_common
2156 # yamllint disable-line rule:key-duplicates
2157 <<: *lf_sonar_builders_prescan
2158 # yamllint disable-line rule:key-duplicates
2159 <<: *lf_sonar_gerrit_common
2162 name: "{project-name}-sonar-prescan"
2163 id: github-sonar-prescan
2164 <<: *lf_sonar_common
2165 # yamllint disable-line rule:key-duplicates
2166 <<: *lf_sonar_builders_prescan
2167 # yamllint disable-line rule:key-duplicates
2168 <<: *lf_sonar_github_common
2171 name: "{project-name}-sonar-prescan-script"
2172 id: gerrit-sonar-prescan-script
2173 <<: *lf_sonar_common
2174 # yamllint disable-line rule:key-duplicates
2175 <<: *lf_sonar_builders_prescan_script
2176 # yamllint disable-line rule:key-duplicates
2177 <<: *lf_sonar_gerrit_common
2180 name: "{project-name}-sonar-prescan-script"
2181 id: github-sonar-prescan-script
2182 <<: *lf_sonar_common
2183 # yamllint disable-line rule:key-duplicates
2184 <<: *lf_sonar_builders_prescan_script
2185 # yamllint disable-line rule:key-duplicates
2186 <<: *lf_sonar_github_common