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-{stream}"
170 id: gerrit-branch-lock
172 ######################
173 # Default parameters #
174 ######################
178 git-url: "$GIT_URL/$GERRIT_PROJECT"
180 submodule-timeout: 10
181 submodule-disable: false
182 gerrit_merge_triggers:
183 - comment-added-contains-event:
184 comment-contains-value: (un)?lock branch$
186 #####################
187 # Job Configuration #
188 #####################
190 project-type: freestyle
192 disabled: "{disable-job}"
195 - lf-infra-properties:
197 build-days-to-keep: 1
200 - lf-infra-parameters:
208 jenkins-ssh-credential: "{jenkins-ssh-credential}"
211 - lf-infra-gerrit-scm:
215 submodule-recursive: false
216 submodule-timeout: "{submodule-timeout}"
217 submodule-disable: "{submodule-disable}"
218 choosing-strategy: default
219 jenkins-ssh-credential: "{jenkins-ssh-credential}"
223 server-name: "{gerrit-server-name}"
224 trigger-on: "{obj:gerrit_merge_triggers}"
226 - project-compare-type: ANT
227 project-pattern: "{project}"
229 - branch-compare-type: ANT
230 branch-pattern: "**/{branch}"
233 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
238 ##########################################
239 # Jenkins Configuration Management Merge #
240 ##########################################
243 name: lf-jenkins-cfg-clouds
247 properties-content: "jenkins_silos={jenkins-silos}"
248 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
249 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
252 name: lf-jenkins-cfg-global-vars
256 properties-content: "jenkins_silos={jenkins-silos}"
257 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
258 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
260 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
261 name: lf-jenkins-cfg-merge
263 ######################
264 # Default parameters #
265 ######################
270 git-url: "$GIT_URL/$GERRIT_PROJECT"
271 github-url: "https://github.com"
272 jenkins-silos: production sandbox
273 submodule-timeout: 10
274 submodule-disable: false
276 gerrit_merge_triggers:
277 - change-merged-event
278 - comment-added-contains-event:
279 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
281 gerrit_trigger_file_paths:
282 - compare-type: REG_EXP
283 pattern: 'jenkins-config\/.*'
285 # github_included_regions MUST match gerrit_trigger_file_paths
286 github_included_regions:
287 - 'jenkins-config\/.*'
289 #####################
290 # Job Configuration #
291 #####################
293 project-type: freestyle
296 disabled: "{disable-job}"
299 - lf-infra-properties:
301 build-days-to-keep: 1
304 - lf-infra-parameters:
312 jenkins-ssh-credential: "{jenkins-ssh-credential}"
316 - lf-jenkins-cfg-global-vars:
317 jenkins-silos: "{jenkins-silos}"
318 - lf-jenkins-cfg-clouds:
319 jenkins-silos: "{jenkins-silos}"
325 name: "{project-name}-jenkins-cfg-merge"
326 id: gerrit-jenkins-cfg-merge
327 <<: *lf_jenkins_cfg_merge
330 - lf-infra-gerrit-scm:
332 refspec: "refs/heads/{branch}"
334 submodule-recursive: true
335 submodule-timeout: "{submodule-timeout}"
336 submodule-disable: "{submodule-disable}"
337 choosing-strategy: default
338 jenkins-ssh-credential: "{jenkins-ssh-credential}"
341 - timed: "{obj:cron}"
343 server-name: "{gerrit-server-name}"
344 trigger-on: "{obj:gerrit_merge_triggers}"
346 - project-compare-type: ANT
347 project-pattern: "{project}"
349 - branch-compare-type: ANT
350 branch-pattern: "**/{branch}"
351 file-paths: "{obj:gerrit_trigger_file_paths}"
354 name: "{project-name}-jenkins-cfg-merge"
355 id: github-jenkins-cfg-merge
356 <<: *lf_jenkins_cfg_merge
359 - lf-infra-properties:
361 build-days-to-keep: 1
363 url: "{github-url}/{github-org}/{project}"
366 - lf-infra-github-scm:
367 url: "{git-clone-url}{github-org}/{project}"
369 branch: "refs/heads/{branch}"
370 submodule-recursive: true
371 submodule-timeout: "{submodule-timeout}"
372 submodule-disable: "{submodule-disable}"
373 choosing-strategy: default
374 jenkins-ssh-credential: "{jenkins-ssh-credential}"
377 - timed: "{obj:cron}"
381 - github-pull-request:
382 trigger-phrase: "^remerge$"
383 only-trigger-phrase: true
384 status-context: "Jenkins CFG Merge"
389 white-list: "{obj:github_pr_whitelist}"
390 admin-list: "{obj:github_pr_admin_list}"
391 included-regions: "{obj:github_included_regions}"
392 white-list-target-branches:
395 ###########################################
396 # Jenkins Configuration Management Verify #
397 ###########################################
399 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
400 name: lf-jenkins-cfg-verify
402 ######################
403 # Default parameters #
404 ######################
407 build-days-to-keep: 7
409 git-url: "$GIT_URL/$GERRIT_PROJECT"
410 github-url: "https://github.com"
411 submodule-timeout: 10
412 submodule-disable: false
414 gerrit_verify_triggers:
415 - patchset-created-event:
417 exclude-trivial-rebase: false
418 exclude-no-code-change: false
419 - draft-published-event
420 - comment-added-contains-event:
421 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
423 gerrit_trigger_file_paths:
424 - compare-type: REG_EXP
425 pattern: 'jenkins-config\/.*'
427 # github_included_regions MUST match gerrit_trigger_file_paths
428 github_included_regions:
429 - 'jenkins-config\/.*'
431 #####################
432 # Job Configuration #
433 #####################
435 project-type: freestyle
438 disabled: "{disable-job}"
441 - lf-infra-properties:
443 build-days-to-keep: 1
446 - lf-infra-parameters:
454 jenkins-ssh-credential: "{jenkins-ssh-credential}"
455 - config-file-provider:
456 # Listed after to override openstack-infra-wrappers clouds.yaml
459 - file-id: clouds-yaml
460 target: "$HOME/.config/openstack/clouds.yaml"
462 target: "$HOME/.npmrc"
464 target: "$HOME/.config/pip/pip.conf"
468 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
474 name: "{project-name}-jenkins-cfg-verify"
475 id: gerrit-jenkins-cfg-verify
476 <<: *lf_jenkins_cfg_verify
479 - lf-infra-gerrit-scm:
481 refspec: "$GERRIT_REFSPEC"
482 branch: "$GERRIT_BRANCH"
483 submodule-recursive: true
484 submodule-timeout: "{submodule-timeout}"
485 submodule-disable: "{submodule-disable}"
486 choosing-strategy: gerrit
487 jenkins-ssh-credential: "{jenkins-ssh-credential}"
491 server-name: "{gerrit-server-name}"
492 trigger-on: "{obj:gerrit_verify_triggers}"
494 - project-compare-type: ANT
495 project-pattern: "{project}"
497 - branch-compare-type: ANT
498 branch-pattern: "**/{branch}"
499 file-paths: "{obj:gerrit_trigger_file_paths}"
502 name: "{project-name}-jenkins-cfg-verify"
503 id: github-jenkins-cfg-verify
504 <<: *lf_jenkins_cfg_verify
508 url: "{github-url}/{github-org}/{project}"
511 - lf-infra-github-scm:
512 url: "{git-clone-url}{github-org}/{project}"
513 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
515 submodule-recursive: true
516 submodule-timeout: "{submodule-timeout}"
517 submodule-disable: "{submodule-disable}"
518 choosing-strategy: default
519 jenkins-ssh-credential: "{jenkins-ssh-credential}"
522 - github-pull-request:
523 trigger-phrase: "^(recheck|reverify)$"
524 only-trigger-phrase: false
525 status-context: "Jenkins CFG Verify"
528 included-regions: "{obj:github_included_regions}"
529 white-list-target-branches:
532 ###########################
533 # JENKINS SANDBOX CLEANUP #
534 ###########################
536 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
537 name: lf-jenkins-sandbox-cleanup
539 ######################
540 # Default parameters #
541 ######################
544 # Run every Saturday at 08:00 UTC
548 #####################
549 # Job Configuration #
550 #####################
552 project-type: freestyle
555 disabled: "{disable-job}"
558 - lf-infra-jjb-parameters:
559 jjb-cache: "{jjb-cache}"
560 jjb-version: "{jjb-version}"
563 - timed: "{obj:cron}"
567 - shell: !include-raw-escape:
568 - ../shell/jjb-install.sh
569 - ../shell/jenkins-sandbox-cleanup.sh
570 - ../shell/jjb-cleanup.sh
573 name: "{project-name}-jenkins-sandbox-cleanup"
574 id: gerrit-jenkins-sandbox-cleanup
576 # yamllint disable-line rule:key-duplicates
577 <<: *lf_jenkins_sandbox_cleanup
580 name: "{project-name}-jenkins-sandbox-cleanup"
581 id: github-jenkins-sandbox-cleanup
583 # yamllint disable-line rule:key-duplicates
584 <<: *lf_jenkins_sandbox_cleanup
590 - lf_jjb_deploy_job: &lf_jjb_deploy_job
591 name: lf-jjb-deploy-job
593 ######################
594 # Default parameters #
595 ######################
599 # jjb-deploy should always clone $PROJECT regardless of what
600 # $GERRIT_PROJECT triggered the job.
601 git-url: "$GIT_URL/$PROJECT"
602 github-url: "https://github.com"
604 submodule-timeout: 10
605 submodule-disable: false
606 gerrit_jjb_deploy_job_triggers:
607 - comment-added-contains-event:
608 comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
610 #####################
611 # Job Configuration #
612 #####################
614 project-type: freestyle
617 disabled: "{disable-job}"
620 - lf-infra-properties:
622 build-days-to-keep: 1
625 - lf-infra-parameters:
633 jenkins-ssh-credential: "{jenkins-ssh-credential}"
637 pip-packages: jenkins-job-builder
639 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
645 name: "{project-name}-jjb-deploy-job"
646 id: gerrit-jjb-deploy-job
647 <<: *lf_jjb_deploy_job
650 - lf-infra-gerrit-scm:
652 refspec: "refs/heads/{branch}"
654 submodule-recursive: true
655 submodule-timeout: "{submodule-timeout}"
656 submodule-disable: "{submodule-disable}"
657 choosing-strategy: default
658 jenkins-ssh-credential: "{jenkins-ssh-credential}"
662 server-name: "{gerrit-server-name}"
663 trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
665 - project-compare-type: ANT
666 project-pattern: "**"
668 - branch-compare-type: ANT
677 name: "{project-name}-jjb-deploy-job"
678 id: github-jjb-deploy-job
679 <<: *lf_jjb_deploy_job
682 - lf-infra-properties:
684 build-days-to-keep: 1
686 url: "{github-url}/{github-org}/{project}"
689 - lf-infra-github-scm:
690 url: "{git-clone-url}{github-org}/{project}"
691 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
693 submodule-recursive: true
694 submodule-timeout: "{submodule-timeout}"
695 submodule-disable: "{submodule-disable}"
696 choosing-strategy: default
697 jenkins-ssh-credential: "{jenkins-ssh-credential}"
700 - github-pull-request:
701 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
702 only-trigger-phrase: true
703 status-context: "JJB Deploy Job"
706 white-list-target-branches:
713 - lf_jjb_merge: &lf_jjb_merge
716 ######################
717 # Default parameters #
718 ######################
722 gerrit_merge_triggers:
723 - change-merged-event
724 - comment-added-contains-event:
725 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
727 #####################
728 # Job Configuration #
729 #####################
735 properties-content: JJB_WORKERS={jjb-workers}
736 - shell: !include-raw-escape:
737 - ../shell/jjb-install.sh
738 - ../shell/jjb-merge-job.sh
739 - ../shell/jjb-cleanup.sh
742 name: "{project-name}-jjb-merge"
745 # yamllint disable-line rule:key-duplicates
748 git-url: "$GIT_URL/$GERRIT_PROJECT"
751 - lf-infra-gerrit-scm:
755 submodule-recursive: "{submodule-recursive}"
756 submodule-timeout: "{submodule-timeout}"
757 submodule-disable: "{submodule-disable}"
758 choosing-strategy: default
759 jenkins-ssh-credential: "{jenkins-ssh-credential}"
763 server-name: "{gerrit-server-name}"
764 trigger-on: "{obj:gerrit_merge_triggers}"
766 - project-compare-type: ANT
767 project-pattern: "{project}"
769 - branch-compare-type: ANT
770 branch-pattern: "**/{branch}"
771 file-paths: "{obj:gerrit_trigger_file_paths}"
774 name: "{project-name}-jjb-merge"
777 # yamllint disable-line rule:key-duplicates
780 #####################
781 # Job Configuration #
782 #####################
785 - lf-infra-properties:
787 build-days-to-keep: 7
789 url: "{github-url}/{github-org}/{project}"
792 - lf-infra-github-scm:
793 url: "{git-clone-url}{github-org}/{project}"
795 branch: "refs/heads/{branch}"
796 submodule-recursive: "{submodule-recursive}"
797 submodule-timeout: "{submodule-timeout}"
798 submodule-disable: "{submodule-disable}"
799 choosing-strategy: default
800 jenkins-ssh-credential: "{jenkins-ssh-credential}"
806 - github-pull-request:
807 trigger-phrase: "^remerge$"
808 only-trigger-phrase: true
809 status-context: "JJB Merge"
814 white-list: "{obj:github_pr_whitelist}"
815 admin-list: "{obj:github_pr_admin_list}"
816 included-regions: "{obj:github_included_regions}"
817 white-list-target-branches:
824 - lf_jjb_verify: &lf_jjb_verify
827 ######################
828 # Default parameters #
829 ######################
831 build-concurrent: true
833 gerrit_verify_triggers:
834 - patchset-created-event:
836 exclude-trivial-rebase: false
837 exclude-no-code-change: false
838 - draft-published-event
839 - comment-added-contains-event:
840 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
842 #####################
843 # Job Configuration #
844 #####################
846 concurrent: "{build-concurrent}"
851 - shell: !include-raw-escape:
852 - ../shell/jjb-verify-job.sh
853 - lf-infra-gpg-verify-git-signature
856 name: "{project-name}-jjb-verify"
857 id: gerrit-jjb-verify
859 # yamllint disable-line rule:key-duplicates
862 ######################
863 # Default parameters #
864 ######################
866 git-url: "$GIT_URL/$GERRIT_PROJECT"
868 #####################
869 # Job Configuration #
870 #####################
873 - lf-infra-gerrit-scm:
875 refspec: "$GERRIT_REFSPEC"
876 branch: "$GERRIT_BRANCH"
877 submodule-recursive: "{submodule-recursive}"
878 submodule-timeout: "{submodule-timeout}"
879 submodule-disable: "{submodule-disable}"
880 choosing-strategy: gerrit
881 jenkins-ssh-credential: "{jenkins-ssh-credential}"
885 server-name: "{gerrit-server-name}"
886 trigger-on: "{obj:gerrit_verify_triggers}"
888 - project-compare-type: ANT
889 project-pattern: "{project}"
891 - branch-compare-type: ANT
892 branch-pattern: "**/{branch}"
893 file-paths: "{obj:gerrit_trigger_file_paths}"
896 name: "{project-name}-jjb-verify"
897 id: github-jjb-verify
899 # yamllint disable-line rule:key-duplicates
902 #####################
903 # Job Configuration #
904 #####################
907 - lf-infra-properties:
909 build-days-to-keep: 7
911 url: "{github-url}/{github-org}/{project}"
914 - lf-infra-github-scm:
915 url: "{git-clone-url}{github-org}/{project}"
916 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
918 submodule-recursive: "{submodule-recursive}"
919 submodule-timeout: "{submodule-timeout}"
920 submodule-disable: "{submodule-disable}"
921 choosing-strategy: default
922 jenkins-ssh-credential: "{jenkins-ssh-credential}"
925 - github-pull-request:
926 trigger-phrase: "^(recheck|reverify)$"
927 only-trigger-phrase: false
928 status-context: "JJB Verify"
931 included-regions: "{obj:github_included_regions}"
932 white-list-target-branches:
935 ############################
936 # JJB Verify Upstream GJJB #
937 ############################
939 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
940 name: lf-jjb-verify-upstream-gjjb
942 #####################
943 # Job Configuration #
944 #####################
951 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
952 git cherry-pick FETCH_HEAD
954 - shell: !include-raw-escape:
955 - ../shell/jjb-verify-job.sh
956 - lf-infra-gpg-verify-git-signature
959 name: "{project-name}-jjb-verify-upstream-gjjb"
960 id: gerrit-jjb-verify-upstream-gjjb
962 # yamllint disable-line rule:key-duplicates
963 <<: *lf_jjb_verify_upstream_gjjb
965 ######################
966 # Default parameters #
967 ######################
969 git-url: "$GIT_URL/$PROJECT"
970 submodule-timeout: 10
971 submodule-disable: false
973 #####################
974 # Job Configuration #
975 #####################
978 - lf-infra-gerrit-scm:
982 submodule-recursive: true
983 submodule-timeout: "{submodule-timeout}"
984 submodule-disable: "{submodule-disable}"
985 choosing-strategy: default
986 jenkins-ssh-credential: "{jenkins-ssh-credential}"
990 server-name: "LinuxFoundation"
992 - patchset-created-event:
994 exclude-trivial-rebase: false
995 exclude-no-code-change: false
996 - draft-published-event
997 - comment-added-contains-event:
998 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1000 - project-compare-type: ANT
1001 project-pattern: "releng/global-jjb"
1003 - branch-compare-type: ANT
1004 branch-pattern: "**/master"
1005 override-votes: true
1006 gerrit-build-failed-codereview-value: -1
1007 gerrit-build-failed-verified-value: 0
1008 gerrit-build-successful-codereview-value: 1
1009 gerrit-build-successful-verified-value: 0
1015 - lf_license_check: &lf_license_check
1016 name: lf-license-check
1018 ######################
1019 # Default parameters #
1020 ######################
1023 build-days-to-keep: 7
1032 git-url: "$GIT_URL/$PROJECT"
1033 github-url: "https://github.com"
1035 license-exclude-paths: ""
1036 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1037 project-pattern: "**"
1040 submodule-timeout: 10
1041 submodule-disable: false
1043 #####################
1044 # Job Configuration #
1045 #####################
1047 project-type: freestyle
1048 node: "{build-node}"
1050 disabled: "{disable-job}"
1053 - lf-infra-properties:
1054 build-days-to-keep: "{build-days-to-keep}"
1057 - lf-infra-parameters:
1058 project: "{project}"
1063 - lf-infra-wrappers:
1064 build-timeout: "{build-timeout}"
1065 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1069 file-patterns: "{file-patterns}"
1070 spdx-disable: "{spdx-disable}"
1071 lhc-version: "{lhc-version}"
1072 license-exclude-paths: "{license-exclude-paths}"
1073 licenses-allowed: "{licenses-allowed}"
1079 name: "{project-name}-license-check"
1080 id: gerrit-license-check
1081 <<: *lf_license_check
1083 git-url: "$GIT_URL/$GERRIT_PROJECT"
1086 - lf-infra-gerrit-scm:
1087 git-url: "{git-url}"
1088 refspec: "$GERRIT_REFSPEC"
1089 branch: "$GERRIT_BRANCH"
1090 # Submodules are out of the project's control
1091 submodule-recursive: false
1092 submodule-timeout: "{submodule-timeout}"
1093 submodule-disable: "{submodule-disable}"
1094 choosing-strategy: gerrit
1095 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1099 server-name: "{gerrit-server-name}"
1100 # Trigger should not be overridable as we want to always run
1102 - patchset-created-event:
1103 exclude-drafts: false
1104 exclude-trivial-rebase: false
1105 exclude-no-code-change: false
1106 - draft-published-event
1107 - comment-added-contains-event:
1108 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1110 - project-compare-type: ANT
1111 project-pattern: "{project-pattern}"
1113 - branch-compare-type: ANT
1114 branch-pattern: "**"
1117 name: "{project-name}-license-check"
1118 id: github-license-check
1119 <<: *lf_license_check
1122 - lf-infra-properties:
1123 build-days-to-keep: "{build-days-to-keep}"
1125 url: "{github-url}/{github-org}/{project}"
1128 - lf-infra-github-scm:
1129 url: "{git-clone-url}{github-org}/{project}"
1130 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1132 # Submodules are out of the project's control
1133 submodule-recursive: false
1134 submodule-timeout: "{submodule-timeout}"
1135 submodule-disable: "{submodule-disable}"
1136 choosing-strategy: default
1137 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1140 - github-pull-request:
1141 trigger-phrase: "^recheck$"
1142 only-trigger-phrase: false
1143 status-context: "License Check"
1146 white-list-target-branches:
1149 ####################
1150 # Info YAML Verify #
1151 ####################
1153 - lf_info_yaml_verify: &lf_info_yaml_verify
1154 name: lf-info-yaml-verify
1156 ######################
1157 # Default parameters #
1158 ######################
1160 gerrit_verify_triggers:
1161 - patchset-created-event:
1162 exclude-drafts: true
1163 exclude-trivial-rebase: false
1164 exclude-no-code-change: false
1165 - draft-published-event
1166 - comment-added-contains-event:
1167 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1169 #####################
1170 # Job Configuration #
1171 #####################
1176 - shell: !include-raw-escape:
1177 - ../shell/git-validate-info-yaml.sh
1178 - ../shell/info-file-validate.sh
1181 name: "{project-name}-info-yaml-verify"
1182 id: gerrit-info-yaml-verify
1184 # yamllint disable-line rule:key-duplicates
1185 <<: *lf_info_yaml_verify
1187 git-url: "$GIT_URL/$GERRIT_PROJECT"
1190 - lf-infra-gerrit-scm:
1191 git-url: "{git-url}"
1192 refspec: "$GERRIT_REFSPEC"
1193 branch: "$GERRIT_BRANCH"
1194 submodule-recursive: "{submodule-recursive}"
1195 submodule-timeout: "{submodule-timeout}"
1196 submodule-disable: "{submodule-disable}"
1197 choosing-strategy: gerrit
1198 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1202 server-name: "{gerrit-server-name}"
1203 trigger-on: "{obj:gerrit_verify_triggers}"
1205 - project-compare-type: ANT
1206 project-pattern: "{project}"
1208 - branch-compare-type: ANT
1209 branch-pattern: "**/{branch}"
1211 - compare-type: REG_EXP
1212 pattern: "INFO.yaml"
1215 name: "{project-name}-info-yaml-verify"
1216 id: github-info-yaml-verify
1218 # yamllint disable-line rule:key-duplicates
1219 <<: *lf_info_yaml_verify
1221 github-url: "https://github.com"
1224 url: "{github-url}/{github-org}/{project}"
1227 - lf-infra-github-scm:
1228 url: "{git-clone-url}{github-org}/{project}"
1229 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1231 submodule-recursive: "{submodule-recursive}"
1232 submodule-timeout: "{submodule-timeout}"
1233 submodule-disable: "{submodule-disable}"
1234 choosing-strategy: default
1235 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1238 - github-pull-request:
1239 trigger-phrase: "^(recheck|reverify)$"
1240 only-trigger-phrase: false
1241 status-context: "INFO File Verify"
1244 # included-regions MUST match gerrit file-paths
1245 included-regions: "INFO.yaml"
1246 white-list-target-branches:
1253 - lf_openstack_cron: &lf_openstack_cron
1254 name: lf-openstack-cron
1256 ######################
1257 # Default parameters #
1258 ######################
1261 build-days-to-keep: 7
1265 git-url: "$GIT_URL/$PROJECT"
1266 github-url: "https://github.com"
1267 openstack-cloud: vex
1268 openstack-image-cleanup: true
1269 openstack-image-cleanup-age: 30
1270 openstack-image-protect: true
1271 openstack-port-cleanup: true
1272 openstack-server-cleanup: true
1273 openstack-stack-cleanup: true
1274 openstack-volume-cleanup: true
1276 submodule-timeout: 10
1277 submodule-disable: false
1279 #####################
1280 # Job Configuration #
1281 #####################
1283 project-type: freestyle
1284 node: "{build-node}"
1286 disabled: "{disable-job}"
1289 - lf-infra-properties:
1290 build-days-to-keep: "{build-days-to-keep}"
1293 - lf-infra-parameters:
1294 project: "{project}"
1299 default: "{jenkins-urls}"
1301 Space separated list of Jenkins URLs to check for active builds.
1304 - lf-infra-wrappers:
1305 build-timeout: "{build-timeout}"
1306 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1307 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1308 - config-file-provider:
1310 - file-id: clouds-yaml
1311 target: "$HOME/.config/openstack/clouds.yaml"
1313 target: "$HOME/.npmrc"
1315 target: "$HOME/.config/pip/pip.conf"
1318 - timed: "{obj:cron}"
1321 - lf-infra-pre-build
1323 properties-content: OS_CLOUD={openstack-cloud}
1326 condition-kind: boolean-expression
1327 condition-expression: "{openstack-stack-cleanup}"
1329 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1332 condition-kind: boolean-expression
1333 condition-expression: "{openstack-server-cleanup}"
1335 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1338 condition-kind: boolean-expression
1339 condition-expression: "{openstack-port-cleanup}"
1341 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1344 condition-kind: boolean-expression
1345 condition-expression: "{openstack-volume-cleanup}"
1347 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1350 condition-kind: boolean-expression
1351 condition-expression: "{openstack-image-protect}"
1353 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1355 condition-kind: boolean-expression
1356 condition-expression: "{openstack-image-cleanup}"
1359 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1360 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1366 name: "{project-name}-openstack-cron"
1367 id: gerrit-openstack-cron
1368 <<: *lf_openstack_cron
1371 - lf-infra-gerrit-scm:
1372 git-url: "{git-url}"
1373 refspec: "refs/heads/{branch}"
1375 submodule-recursive: true
1376 submodule-timeout: "{submodule-timeout}"
1377 submodule-disable: "{submodule-disable}"
1378 choosing-strategy: default
1379 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1382 name: "{project-name}-openstack-cron"
1383 id: github-openstack-cron
1384 <<: *lf_openstack_cron
1387 - lf-infra-github-scm:
1388 url: "{git-clone-url}{github-org}/{project}"
1390 branch: "refs/heads/{branch}"
1391 submodule-recursive: true
1392 submodule-timeout: "{submodule-timeout}"
1393 submodule-disable: "{submodule-disable}"
1394 choosing-strategy: default
1395 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1401 - lf_packer_merge: &lf_packer_merge
1402 name: lf-packer-merge
1404 ######################
1405 # Default parameters #
1406 ######################
1409 openstack-cloud: vex
1410 update-cloud-image: false
1412 #####################
1413 # Job Configuration #
1414 #####################
1417 - lf-infra-parameters:
1418 project: "{project}"
1421 - lf-packer-parameters:
1422 packer-version: "{packer-version}"
1424 name: UPDATE_CLOUD_IMAGE
1425 default: "{update-cloud-image}"
1426 description: "Update new built image on the cloud."
1429 - lf-infra-packer-build:
1430 openstack: "{openstack}"
1431 openstack-cloud: "{openstack-cloud}"
1432 packer-cloud-settings: "{packer-cloud-settings}"
1433 packer-version: "{packer-version}"
1434 platform: "{platforms}"
1435 template: "{templates}"
1436 update-cloud-image: "{update-cloud-image}"
1437 - description-setter:
1438 regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1439 description: 'Image: \2'
1441 # - project: '{project-name}-openstack-update-cloud-image'
1443 # predefined-parameters: |
1444 # GERRIT_BRANCH=$GERRIT_BRANCH
1445 # GERRIT_PROJECT=$GERRIT_PROJECT
1446 # GERRIT_REFSPEC=$GERRIT_REFSPEC
1447 # NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1448 # property-file: variables.jenkins-trigger
1449 # property-file-fail-on-missing: true
1453 - trigger-parameterized-builds:
1454 - project: "{project-name}-openstack-update-cloud-image"
1455 condition: UNSTABLE_OR_BETTER
1456 predefined-parameters: |
1457 NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1458 property-file: variables.jenkins-trigger
1459 fail-on-missing: true
1462 name: "{project-name}-packer-merge-{platforms}-{templates}"
1463 id: gerrit-packer-merge
1464 <<: *lf_packer_common
1465 # yamllint disable-line rule:key-duplicates
1466 <<: *lf_packer_merge
1468 ######################
1469 # Default parameters #
1470 ######################
1472 git-url: "$GIT_URL/$GERRIT_PROJECT"
1474 gerrit_merge_triggers:
1475 - change-merged-event
1476 - comment-added-contains-event:
1477 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1479 #####################
1480 # Job Configuration #
1481 #####################
1484 - lf-infra-gerrit-scm:
1485 git-url: "{git-url}"
1486 refspec: "$GERRIT_REFSPEC"
1487 branch: "$GERRIT_BRANCH"
1488 submodule-recursive: "{submodule-recursive}"
1489 submodule-timeout: "{submodule-timeout}"
1490 submodule-disable: "{submodule-disable}"
1491 choosing-strategy: default
1492 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1495 - timed: "{obj:cron}"
1497 server-name: "{gerrit-server-name}"
1498 trigger-on: "{obj:gerrit_merge_triggers}"
1500 - project-compare-type: ANT
1501 project-pattern: "{project}"
1503 - branch-compare-type: ANT
1504 branch-pattern: "**/{branch}"
1506 - compare-type: REG_EXP
1507 pattern: 'packer\/provision\/.*\.sh'
1508 - compare-type: REG_EXP
1509 pattern: 'packer\/provision\/.*\.bat'
1510 - compare-type: REG_EXP
1511 pattern: 'packer\/provision\/.*\.ps1'
1512 - compare-type: REG_EXP
1513 pattern: 'packer\/provision\/{templates}\.yaml'
1514 - compare-type: REG_EXP
1515 pattern: 'packer\/provision\/local-{templates}\.yaml'
1516 - compare-type: REG_EXP
1517 pattern: 'packer\/templates\/{templates}\.json'
1518 - compare-type: REG_EXP
1519 pattern: 'packer\/vars\/{platforms}\.json'
1522 name: "{project-name}-packer-merge-{platforms}-{templates}"
1523 id: github-packer-merge
1524 <<: *lf_packer_common
1525 # yamllint disable-line rule:key-duplicates
1526 <<: *lf_packer_merge
1528 #####################
1529 # Job Configuration #
1530 #####################
1533 - lf-infra-properties:
1534 project: "{project}"
1535 build-days-to-keep: 7
1537 url: "{github-url}/{github-org}/{project}"
1540 - lf-infra-github-scm:
1541 url: "{git-clone-url}{github-org}/{project}"
1543 +refs/heads/*:refs/remotes/origin/*
1544 +refs/pull/*:refs/remotes/origin/pr/*
1545 branch: "$GERRIT_REFSPEC"
1546 submodule-recursive: "{submodule-recursive}"
1547 submodule-timeout: "{submodule-timeout}"
1548 submodule-disable: "{submodule-disable}"
1549 choosing-strategy: default
1550 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1553 - timed: "{obj:cron}"
1558 - github-pull-request:
1559 trigger-phrase: "^remerge$"
1560 only-trigger-phrase: true
1561 status-context: "Packer {platforms}-{templates} Merge"
1566 white-list: "{obj:github_pr_whitelist}"
1567 admin-list: "{obj:github_pr_admin_list}"
1568 # included-regions MUST match Gerrit Trigger file-paths
1570 - 'packer\/provision\/.*\.sh'
1571 - 'packer\/provision\/.*\.bat'
1572 - 'packer\/provision\/.*\.ps1'
1573 - 'packer\/provision\/{templates}\.yaml'
1574 - 'packer\/provision\/local-{templates}\.yaml'
1575 - 'packer\/templates\/{templates}\.json'
1576 - 'packer\/vars\/{platforms}\.json'
1577 white-list-target-branches:
1584 - lf_packer_verify: &lf_packer_verify
1585 name: lf-packer-verify
1587 ######################
1588 # Default parameters #
1589 ######################
1593 openstack-cloud: vex
1595 gerrit_verify_triggers:
1596 - patchset-created-event:
1597 exclude-drafts: true
1598 exclude-trivial-rebase: false
1599 exclude-no-code-change: false
1600 - draft-published-event
1601 - comment-added-contains-event:
1602 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1604 gerrit_trigger_file_paths:
1605 - compare-type: REG_EXP
1606 pattern: 'packer\/.*'
1608 # github_included_regions MUST match gerrit_trigger_file_paths
1609 github_included_regions:
1612 #####################
1613 # Job Configuration #
1614 #####################
1619 - lf-infra-packer-validate:
1620 openstack: "{openstack}"
1621 openstack-cloud: "{openstack-cloud}"
1622 packer-cloud-settings: "{packer-cloud-settings}"
1623 packer-version: "{packer-version}"
1626 name: "{project-name}-packer-verify"
1627 id: gerrit-packer-verify
1628 <<: *lf_packer_common
1629 # yamllint disable-line rule:key-duplicates
1630 <<: *lf_packer_verify
1632 ######################
1633 # Default parameters #
1634 ######################
1636 git-url: "$GIT_URL/$GERRIT_PROJECT"
1638 #####################
1639 # Job Configuration #
1640 #####################
1643 - lf-infra-gerrit-scm:
1644 git-url: "{git-url}"
1645 refspec: "$GERRIT_REFSPEC"
1646 branch: "$GERRIT_BRANCH"
1647 submodule-recursive: "{submodule-recursive}"
1648 submodule-timeout: "{submodule-timeout}"
1649 submodule-disable: "{submodule-disable}"
1650 choosing-strategy: gerrit
1651 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1655 server-name: "{gerrit-server-name}"
1656 trigger-on: "{obj:gerrit_verify_triggers}"
1658 - project-compare-type: ANT
1659 project-pattern: "{project}"
1661 - branch-compare-type: ANT
1662 branch-pattern: "**/{branch}"
1663 file-paths: "{obj:gerrit_trigger_file_paths}"
1666 name: "{project-name}-packer-verify"
1667 id: github-packer-verify
1668 <<: *lf_packer_common
1669 # yamllint disable-line rule:key-duplicates
1670 <<: *lf_packer_verify
1672 #####################
1673 # Job Configuration #
1674 #####################
1677 - lf-infra-properties:
1678 project: "{project}"
1679 build-days-to-keep: 7
1681 url: "{github-url}/{github-org}/{project}"
1684 - lf-infra-github-scm:
1685 url: "{git-clone-url}{github-org}/{project}"
1686 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1688 submodule-recursive: "{submodule-recursive}"
1689 submodule-timeout: "{submodule-timeout}"
1690 submodule-disable: "{submodule-disable}"
1691 choosing-strategy: default
1692 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1695 - github-pull-request:
1696 trigger-phrase: "^(recheck|reverify)$"
1697 only-trigger-phrase: false
1698 status-context: "Packer Verify"
1701 included-regions: "{obj:github_included_regions}"
1702 white-list-target-branches:
1705 ################################
1706 # Openstack Update Cloud Image #
1707 ################################
1709 - lf_openstack_cron: &lf_openstack_update_cloud_image
1710 name: lf-openstack-update-cloud-image
1712 ######################
1713 # Default parameters #
1714 ######################
1717 build-days-to-keep: 7
1721 git-url: "$GIT_URL/$PROJECT"
1722 github-url: "https://github.com"
1723 new-image-name: "all"
1724 openstack-cloud: vex
1726 submodule-timeout: 10
1727 submodule-disable: false
1728 update-cloud-image: false
1730 #####################
1731 # Job Configuration #
1732 #####################
1734 project-type: freestyle
1735 node: "{build-node}"
1737 disabled: "{disable-job}"
1740 - lf-infra-properties:
1741 build-days-to-keep: "{build-days-to-keep}"
1744 - lf-infra-parameters:
1745 project: "{project}"
1749 name: NEW_IMAGE_NAME
1750 default: "{new-image-name}"
1751 description: "Name of cloud image to update in Jenkins"
1754 - lf-infra-wrappers:
1755 build-timeout: "{build-timeout}"
1756 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1757 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1758 - config-file-provider:
1760 - file-id: clouds-yaml
1761 target: "$HOME/.config/openstack/clouds.yaml"
1763 target: "$HOME/.npmrc"
1765 target: "$HOME/.config/pip/pip.conf"
1768 - lf-infra-pre-build
1770 properties-content: |
1771 OS_CLOUD={openstack-cloud}
1774 echo "Extract the image type for commit message"
1775 # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1776 IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1777 echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1780 properties-file: "image-type.txt"
1781 - lf-infra-update-packer-images
1782 - lf-infra-push-gerrit-patch:
1783 project: "{project}"
1784 gerrit-user: "{gerrit-user}"
1785 gerrit-host: "{gerrit-host}"
1786 gerrit-topic: "{gerrit-topic}"
1787 gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1788 reviewers-email: "{reviewers-email}"
1794 name: "{project-name}-openstack-update-cloud-image"
1795 id: gerrit-openstack-update-cloud-image
1796 <<: *lf_openstack_update_cloud_image
1798 ######################
1799 # Default parameters #
1800 ######################
1802 git-url: "$GIT_URL/$GERRIT_PROJECT"
1804 #####################
1805 # Job Configuration #
1806 #####################
1809 - lf-infra-gerrit-scm:
1810 git-url: "{git-url}"
1811 refspec: "$GERRIT_REFSPEC"
1812 branch: "$GERRIT_BRANCH"
1813 submodule-recursive: false
1814 submodule-timeout: "{submodule-timeout}"
1815 submodule-disable: "{submodule-disable}"
1816 choosing-strategy: gerrit
1817 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1820 - timed: "{obj:cron}"
1826 - lf_puppet_verify: &lf_puppet_verify
1827 name: lf-puppet-verify
1829 ######################
1830 # Default parameters #
1831 ######################
1834 build-days-to-keep: 7
1837 git-url: "$GIT_URL/$GERRIT_PROJECT"
1838 github-url: "https://github.com"
1841 puppet-lint-version: 2.3.6
1843 submodule-recursive: true
1844 submodule-timeout: 10
1845 submodule-disable: false
1847 gerrit_trigger_file_paths:
1848 - compare-type: REG_EXP
1851 # github_included_regions MUST match gerrit_trigger_file_paths
1852 github_included_regions:
1855 #####################
1856 # Job Configuration #
1857 #####################
1859 project-type: freestyle
1860 node: "{build-node}"
1862 disabled: "{disable-job}"
1865 - lf-infra-properties:
1866 build-days-to-keep: "{build-days-to-keep}"
1869 - lf-infra-parameters:
1870 project: "{project}"
1873 - lf-puppet-parameters:
1874 puppet-lint-version: "{puppet-lint-version}"
1877 - lf-infra-wrappers:
1878 build-timeout: "{build-timeout}"
1879 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1882 - shell: !include-raw-escape: ../shell/puppet-lint.sh
1888 name: "{project-name}-puppet-verify"
1889 id: gerrit-puppet-verify
1890 <<: *lf_puppet_verify
1892 ######################
1893 # Default parameters #
1894 ######################
1896 gerrit_verify_triggers:
1897 - patchset-created-event:
1898 exclude-drafts: true
1899 exclude-trivial-rebase: false
1900 exclude-no-code-change: false
1901 - draft-published-event
1902 - comment-added-contains-event:
1903 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1905 #####################
1906 # Job Configuration #
1907 #####################
1910 - lf-infra-gerrit-scm:
1911 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1912 git-url: "{git-url}"
1913 refspec: "$GERRIT_REFSPEC"
1914 branch: "$GERRIT_BRANCH"
1915 submodule-recursive: "{submodule-recursive}"
1916 submodule-timeout: "{submodule-timeout}"
1917 submodule-disable: "{submodule-disable}"
1918 choosing-strategy: gerrit
1922 server-name: "{gerrit-server-name}"
1923 trigger-on: "{obj:gerrit_verify_triggers}"
1925 - project-compare-type: ANT
1926 project-pattern: "{project}"
1928 - branch-compare-type: ANT
1929 branch-pattern: "**/{branch}"
1930 file-paths: "{obj:gerrit_trigger_file_paths}"
1933 name: "{project-name}-puppet-verify"
1934 id: github-puppet-verify
1935 <<: *lf_puppet_verify
1937 #####################
1938 # Job Configuration #
1939 #####################
1942 - lf-infra-properties:
1943 project: "{project}"
1944 build-days-to-keep: 7
1946 url: "{github-url}/{github-org}/{project}"
1949 - lf-infra-github-scm:
1950 url: "{git-clone-url}{github-org}/{project}"
1951 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1953 submodule-recursive: "{submodule-recursive}"
1954 submodule-timeout: "{submodule-timeout}"
1955 submodule-disable: "{submodule-disable}"
1956 choosing-strategy: default
1957 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1960 - github-pull-request:
1961 trigger-phrase: "^(recheck|reverify)$"
1962 only-trigger-phrase: false
1963 status-context: "Puppet Verify"
1966 included-regions: "{obj:github_included_regions}"
1967 white-list-target-branches:
1974 - lf_sonar_common: &lf_sonar_common
1975 name: lf-sonar-common
1977 ######################
1978 # Default parameters #
1979 ######################
1981 archive-artifacts: >
1984 branch: master # Sonar should always be run on master branch
1985 build-days-to-keep: 7
1987 cron: "H H * * *" # run daily
1989 git-url: "$GIT_URL/$PROJECT"
1990 github-url: "https://github.com"
1992 submodule-recursive: true
1993 submodule-timeout: 10
1994 submodule-disable: false
1998 sonar-project-file: "sonar-project.properties"
1999 sonar-properties: ""
2001 sonar-additional-args: ""
2003 gerrit_trigger_file_paths:
2004 - compare-type: REG_EXP
2007 # github_included_regions MUST match gerrit_trigger_file_paths
2008 github_included_regions:
2011 #####################
2012 # Job Configuration #
2013 #####################
2015 project-type: freestyle
2016 node: "{build-node}"
2019 - lf-infra-properties:
2020 build-days-to-keep: "{build-days-to-keep}"
2023 - lf-infra-wrappers:
2024 build-timeout: "{build-timeout}"
2025 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2027 disabled: "{disable-job}"
2030 - lf-infra-parameters:
2031 project: "{project}"
2035 name: ARCHIVE_ARTIFACTS
2036 default: "{archive-artifacts}"
2037 description: Artifacts to archive to the logs server.
2042 - lf_sonar_builders: &lf_sonar_builders
2043 name: lf-sonar-builders
2045 - lf-infra-pre-build
2047 sonar-task: "{sonar-task}"
2048 sonar-project-file: "{sonar-project-file}"
2049 sonar-properties: "{sonar-properties}"
2050 sonar-java-opts: "{sonar-java-opts}"
2051 sonar-additional-args: "{sonar-additional-args}"
2053 - lf_sonar_builders_prescan: &lf_sonar_builders_prescan
2054 name: lf-sonar-builders-prescan
2056 - lf-infra-pre-build
2057 - lf-infra-sonar-with-prescan:
2058 sonar-task: "{sonar-task}"
2059 sonar-project-file: "{sonar-project-file}"
2060 sonar-properties: "{sonar-properties}"
2061 sonar-java-opts: "{sonar-java-opts}"
2062 sonar-additional-args: "{sonar-additional-args}"
2064 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2065 name: lf-sonar-gerrit-common
2066 gerrit_sonar_triggers:
2067 - comment-added-contains-event:
2068 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2071 - lf-infra-gerrit-scm:
2072 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2073 git-url: "{git-url}"
2074 refspec: $GERRIT_REFSPEC
2075 branch: $GERRIT_BRANCH
2076 submodule-recursive: "{submodule-recursive}"
2077 submodule-timeout: "{submodule-timeout}"
2078 submodule-disable: "{submodule-disable}"
2079 choosing-strategy: default
2082 - timed: "{obj:cron}"
2084 server-name: "{gerrit-server-name}"
2085 trigger-on: "{obj:gerrit_sonar_triggers}"
2087 - project-compare-type: "ANT"
2088 project-pattern: "{project}"
2090 - branch-compare-type: "ANT"
2091 branch-pattern: "**/{branch}"
2092 file-paths: "{obj:gerrit_trigger_file_paths}"
2099 - lf_sonar_github_common: &lf_sonar_github_common
2100 name: lf-sonar-github-common
2102 - lf-infra-properties:
2103 build-days-to-keep: "{build-days-to-keep}"
2105 url: "{github-url}/{github-org}/{project}"
2108 - lf-infra-github-scm:
2109 url: "{git-clone-url}{github-org}/{project}"
2110 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2112 submodule-recursive: "{submodule-recursive}"
2113 submodule-timeout: "{submodule-timeout}"
2114 submodule-disable: "{submodule-disable}"
2115 choosing-strategy: default
2116 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2119 - github-pull-request:
2120 trigger-phrase: "^run-sonar$"
2121 only-trigger-phrase: false
2122 status-context: "Python Sonar"
2125 white-list-target-branches:
2127 included-regions: "{obj:github_included_regions}"
2130 name: "{project-name}-sonar"
2132 <<: *lf_sonar_common
2133 # yamllint disable-line rule:key-duplicates
2134 <<: *lf_sonar_builders
2135 # yamllint disable-line rule:key-duplicates
2136 <<: *lf_sonar_gerrit_common
2139 name: "{project-name}-sonar"
2141 <<: *lf_sonar_common
2142 # yamllint disable-line rule:key-duplicates
2143 <<: *lf_sonar_builders
2144 # yamllint disable-line rule:key-duplicates
2145 <<: *lf_sonar_github_common
2148 name: "{project-name}-sonar-prescan"
2149 id: gerrit-sonar-prescan
2150 <<: *lf_sonar_common
2151 # yamllint disable-line rule:key-duplicates
2152 <<: *lf_sonar_builders_prescan
2153 # yamllint disable-line rule:key-duplicates
2154 <<: *lf_sonar_gerrit_common
2157 name: "{project-name}-sonar-prescan"
2158 id: github-sonar-prescan
2159 <<: *lf_sonar_common
2160 # yamllint disable-line rule:key-duplicates
2161 <<: *lf_sonar_builders_prescan
2162 # yamllint disable-line rule:key-duplicates
2163 <<: *lf_sonar_github_common