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"
412 submodule-timeout: 10
413 submodule-disable: false
415 gerrit_verify_triggers:
416 - patchset-created-event:
418 exclude-trivial-rebase: false
419 exclude-no-code-change: false
420 - draft-published-event
421 - comment-added-contains-event:
422 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
424 gerrit_trigger_file_paths:
425 - compare-type: REG_EXP
426 pattern: 'jenkins-config\/.*'
428 # github_included_regions MUST match gerrit_trigger_file_paths
429 github_included_regions:
430 - 'jenkins-config\/.*'
432 #####################
433 # Job Configuration #
434 #####################
436 project-type: freestyle
439 disabled: "{disable-job}"
442 - lf-infra-properties:
444 build-days-to-keep: 1
447 - lf-infra-parameters:
455 jenkins-ssh-credential: "{jenkins-ssh-credential}"
456 - config-file-provider:
457 # Listed after to override openstack-infra-wrappers clouds.yaml
460 - file-id: clouds-yaml
461 target: "$HOME/.config/openstack/clouds.yaml"
463 target: "$HOME/.npmrc"
465 target: "$HOME/.config/pip/pip.conf"
470 properties-content: OS_CLOUD={openstack-cloud}
471 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
477 name: "{project-name}-jenkins-cfg-verify"
478 id: gerrit-jenkins-cfg-verify
479 <<: *lf_jenkins_cfg_verify
482 - lf-infra-gerrit-scm:
484 refspec: "$GERRIT_REFSPEC"
485 branch: "$GERRIT_BRANCH"
486 submodule-recursive: true
487 submodule-timeout: "{submodule-timeout}"
488 submodule-disable: "{submodule-disable}"
489 choosing-strategy: gerrit
490 jenkins-ssh-credential: "{jenkins-ssh-credential}"
494 server-name: "{gerrit-server-name}"
495 trigger-on: "{obj:gerrit_verify_triggers}"
497 - project-compare-type: ANT
498 project-pattern: "{project}"
500 - branch-compare-type: ANT
501 branch-pattern: "**/{branch}"
502 file-paths: "{obj:gerrit_trigger_file_paths}"
505 name: "{project-name}-jenkins-cfg-verify"
506 id: github-jenkins-cfg-verify
507 <<: *lf_jenkins_cfg_verify
511 url: "{github-url}/{github-org}/{project}"
514 - lf-infra-github-scm:
515 url: "{git-clone-url}{github-org}/{project}"
516 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
518 submodule-recursive: true
519 submodule-timeout: "{submodule-timeout}"
520 submodule-disable: "{submodule-disable}"
521 choosing-strategy: default
522 jenkins-ssh-credential: "{jenkins-ssh-credential}"
525 - github-pull-request:
526 trigger-phrase: "^(recheck|reverify)$"
527 only-trigger-phrase: false
528 status-context: "Jenkins CFG Verify"
531 included-regions: "{obj:github_included_regions}"
532 white-list-target-branches:
535 ###########################
536 # JENKINS SANDBOX CLEANUP #
537 ###########################
539 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
540 name: lf-jenkins-sandbox-cleanup
542 ######################
543 # Default parameters #
544 ######################
547 # Run every Saturday at 08:00 UTC
551 #####################
552 # Job Configuration #
553 #####################
555 project-type: freestyle
558 disabled: "{disable-job}"
561 - lf-infra-jjb-parameters:
562 jjb-cache: "{jjb-cache}"
563 jjb-version: "{jjb-version}"
566 - timed: "{obj:cron}"
570 - shell: !include-raw-escape:
571 - ../shell/jjb-install.sh
572 - ../shell/jenkins-sandbox-cleanup.sh
573 - ../shell/jjb-cleanup.sh
576 name: "{project-name}-jenkins-sandbox-cleanup"
577 id: gerrit-jenkins-sandbox-cleanup
579 # yamllint disable-line rule:key-duplicates
580 <<: *lf_jenkins_sandbox_cleanup
583 name: "{project-name}-jenkins-sandbox-cleanup"
584 id: github-jenkins-sandbox-cleanup
586 # yamllint disable-line rule:key-duplicates
587 <<: *lf_jenkins_sandbox_cleanup
593 - lf_jjb_deploy_job: &lf_jjb_deploy_job
594 name: lf-jjb-deploy-job
596 ######################
597 # Default parameters #
598 ######################
602 # jjb-deploy should always clone $PROJECT regardless of what
603 # $GERRIT_PROJECT triggered the job.
604 git-url: "$GIT_URL/$PROJECT"
605 github-url: "https://github.com"
607 submodule-timeout: 10
608 submodule-disable: false
609 gerrit_jjb_deploy_job_triggers:
610 - comment-added-contains-event:
611 comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
613 #####################
614 # Job Configuration #
615 #####################
617 project-type: freestyle
620 disabled: "{disable-job}"
623 - lf-infra-properties:
625 build-days-to-keep: 1
628 - lf-infra-parameters:
636 jenkins-ssh-credential: "{jenkins-ssh-credential}"
640 pip-packages: jenkins-job-builder
642 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
648 name: "{project-name}-jjb-deploy-job"
649 id: gerrit-jjb-deploy-job
650 <<: *lf_jjb_deploy_job
653 - lf-infra-gerrit-scm:
655 refspec: "refs/heads/{branch}"
657 submodule-recursive: true
658 submodule-timeout: "{submodule-timeout}"
659 submodule-disable: "{submodule-disable}"
660 choosing-strategy: default
661 jenkins-ssh-credential: "{jenkins-ssh-credential}"
665 server-name: "{gerrit-server-name}"
666 trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
668 - project-compare-type: ANT
669 project-pattern: "**"
671 - branch-compare-type: ANT
680 name: "{project-name}-jjb-deploy-job"
681 id: github-jjb-deploy-job
682 <<: *lf_jjb_deploy_job
685 - lf-infra-properties:
687 build-days-to-keep: 1
689 url: "{github-url}/{github-org}/{project}"
692 - lf-infra-github-scm:
693 url: "{git-clone-url}{github-org}/{project}"
694 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
696 submodule-recursive: true
697 submodule-timeout: "{submodule-timeout}"
698 submodule-disable: "{submodule-disable}"
699 choosing-strategy: default
700 jenkins-ssh-credential: "{jenkins-ssh-credential}"
703 - github-pull-request:
704 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
705 only-trigger-phrase: true
706 status-context: "JJB Deploy Job"
709 white-list-target-branches:
716 - lf_jjb_merge: &lf_jjb_merge
719 ######################
720 # Default parameters #
721 ######################
725 gerrit_merge_triggers:
726 - change-merged-event
727 - comment-added-contains-event:
728 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
730 #####################
731 # Job Configuration #
732 #####################
738 properties-content: JJB_WORKERS={jjb-workers}
739 - shell: !include-raw-escape:
740 - ../shell/jjb-install.sh
741 - ../shell/jjb-merge-job.sh
742 - ../shell/jjb-cleanup.sh
745 name: "{project-name}-jjb-merge"
748 # yamllint disable-line rule:key-duplicates
751 git-url: "$GIT_URL/$GERRIT_PROJECT"
754 - lf-infra-gerrit-scm:
758 submodule-recursive: "{submodule-recursive}"
759 submodule-timeout: "{submodule-timeout}"
760 submodule-disable: "{submodule-disable}"
761 choosing-strategy: default
762 jenkins-ssh-credential: "{jenkins-ssh-credential}"
766 server-name: "{gerrit-server-name}"
767 trigger-on: "{obj:gerrit_merge_triggers}"
769 - project-compare-type: ANT
770 project-pattern: "{project}"
772 - branch-compare-type: ANT
773 branch-pattern: "**/{branch}"
774 file-paths: "{obj:gerrit_trigger_file_paths}"
777 name: "{project-name}-jjb-merge"
780 # yamllint disable-line rule:key-duplicates
783 #####################
784 # Job Configuration #
785 #####################
788 - lf-infra-properties:
790 build-days-to-keep: 7
792 url: "{github-url}/{github-org}/{project}"
795 - lf-infra-github-scm:
796 url: "{git-clone-url}{github-org}/{project}"
798 branch: "refs/heads/{branch}"
799 submodule-recursive: "{submodule-recursive}"
800 submodule-timeout: "{submodule-timeout}"
801 submodule-disable: "{submodule-disable}"
802 choosing-strategy: default
803 jenkins-ssh-credential: "{jenkins-ssh-credential}"
809 - github-pull-request:
810 trigger-phrase: "^remerge$"
811 only-trigger-phrase: true
812 status-context: "JJB Merge"
817 white-list: "{obj:github_pr_whitelist}"
818 admin-list: "{obj:github_pr_admin_list}"
819 included-regions: "{obj:github_included_regions}"
820 white-list-target-branches:
827 - lf_jjb_verify: &lf_jjb_verify
830 ######################
831 # Default parameters #
832 ######################
834 build-concurrent: true
836 gerrit_verify_triggers:
837 - patchset-created-event:
839 exclude-trivial-rebase: false
840 exclude-no-code-change: false
841 - draft-published-event
842 - comment-added-contains-event:
843 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
845 #####################
846 # Job Configuration #
847 #####################
849 concurrent: "{build-concurrent}"
854 - shell: !include-raw-escape:
855 - ../shell/git-validate-jira-urls.sh
856 - ../shell/jjb-install.sh
857 - ../shell/jjb-verify-job.sh
858 - ../shell/jjb-check-unicode.sh
859 - ../shell/jjb-cleanup.sh
860 - lf-infra-gpg-verify-git-signature
863 name: "{project-name}-jjb-verify"
864 id: gerrit-jjb-verify
866 # yamllint disable-line rule:key-duplicates
869 ######################
870 # Default parameters #
871 ######################
873 git-url: "$GIT_URL/$GERRIT_PROJECT"
875 #####################
876 # Job Configuration #
877 #####################
880 - lf-infra-gerrit-scm:
882 refspec: "$GERRIT_REFSPEC"
883 branch: "$GERRIT_BRANCH"
884 submodule-recursive: "{submodule-recursive}"
885 submodule-timeout: "{submodule-timeout}"
886 submodule-disable: "{submodule-disable}"
887 choosing-strategy: gerrit
888 jenkins-ssh-credential: "{jenkins-ssh-credential}"
892 server-name: "{gerrit-server-name}"
893 trigger-on: "{obj:gerrit_verify_triggers}"
895 - project-compare-type: ANT
896 project-pattern: "{project}"
898 - branch-compare-type: ANT
899 branch-pattern: "**/{branch}"
900 file-paths: "{obj:gerrit_trigger_file_paths}"
903 name: "{project-name}-jjb-verify"
904 id: github-jjb-verify
906 # yamllint disable-line rule:key-duplicates
909 #####################
910 # Job Configuration #
911 #####################
914 - lf-infra-properties:
916 build-days-to-keep: 7
918 url: "{github-url}/{github-org}/{project}"
921 - lf-infra-github-scm:
922 url: "{git-clone-url}{github-org}/{project}"
923 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
925 submodule-recursive: "{submodule-recursive}"
926 submodule-timeout: "{submodule-timeout}"
927 submodule-disable: "{submodule-disable}"
928 choosing-strategy: default
929 jenkins-ssh-credential: "{jenkins-ssh-credential}"
932 - github-pull-request:
933 trigger-phrase: "^(recheck|reverify)$"
934 only-trigger-phrase: false
935 status-context: "JJB Verify"
938 included-regions: "{obj:github_included_regions}"
939 white-list-target-branches:
942 ############################
943 # JJB Verify Upstream GJJB #
944 ############################
946 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
947 name: lf-jjb-verify-upstream-gjjb
949 #####################
950 # Job Configuration #
951 #####################
958 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
959 git cherry-pick FETCH_HEAD
961 - shell: !include-raw-escape:
962 - ../shell/git-validate-jira-urls.sh
963 - ../shell/jjb-install.sh
964 - ../shell/jjb-verify-job.sh
965 - ../shell/jjb-check-unicode.sh
966 - ../shell/jjb-cleanup.sh
967 - lf-infra-gpg-verify-git-signature
970 name: "{project-name}-jjb-verify-upstream-gjjb"
971 id: gerrit-jjb-verify-upstream-gjjb
973 # yamllint disable-line rule:key-duplicates
974 <<: *lf_jjb_verify_upstream_gjjb
976 ######################
977 # Default parameters #
978 ######################
980 git-url: "$GIT_URL/$PROJECT"
981 submodule-timeout: 10
982 submodule-disable: false
984 #####################
985 # Job Configuration #
986 #####################
989 - lf-infra-gerrit-scm:
993 submodule-recursive: true
994 submodule-timeout: "{submodule-timeout}"
995 submodule-disable: "{submodule-disable}"
996 choosing-strategy: default
997 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1001 server-name: "LinuxFoundation"
1003 - patchset-created-event:
1004 exclude-drafts: true
1005 exclude-trivial-rebase: false
1006 exclude-no-code-change: false
1007 - draft-published-event
1008 - comment-added-contains-event:
1009 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1011 - project-compare-type: ANT
1012 project-pattern: "releng/global-jjb"
1014 - branch-compare-type: ANT
1015 branch-pattern: "**/master"
1016 override-votes: true
1017 gerrit-build-failed-codereview-value: -1
1018 gerrit-build-failed-verified-value: 0
1019 gerrit-build-successful-codereview-value: 1
1020 gerrit-build-successful-verified-value: 0
1026 - lf_license_check: &lf_license_check
1027 name: lf-license-check
1029 ######################
1030 # Default parameters #
1031 ######################
1034 build-days-to-keep: 7
1043 git-url: "$GIT_URL/$PROJECT"
1044 github-url: "https://github.com"
1046 license-exclude-paths: ""
1047 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1048 project-pattern: "**"
1051 submodule-timeout: 10
1052 submodule-disable: false
1054 #####################
1055 # Job Configuration #
1056 #####################
1058 project-type: freestyle
1059 node: "{build-node}"
1061 disabled: "{disable-job}"
1064 - lf-infra-properties:
1065 build-days-to-keep: "{build-days-to-keep}"
1068 - lf-infra-parameters:
1069 project: "{project}"
1074 - lf-infra-wrappers:
1075 build-timeout: "{build-timeout}"
1076 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1080 file-patterns: "{file-patterns}"
1081 spdx-disable: "{spdx-disable}"
1082 lhc-version: "{lhc-version}"
1083 license-exclude-paths: "{license-exclude-paths}"
1084 licenses-allowed: "{licenses-allowed}"
1090 name: "{project-name}-license-check"
1091 id: gerrit-license-check
1092 <<: *lf_license_check
1094 git-url: "$GIT_URL/$GERRIT_PROJECT"
1097 - lf-infra-gerrit-scm:
1098 git-url: "{git-url}"
1099 refspec: "$GERRIT_REFSPEC"
1100 branch: "$GERRIT_BRANCH"
1101 # Submodules are out of the project's control
1102 submodule-recursive: false
1103 submodule-timeout: "{submodule-timeout}"
1104 submodule-disable: "{submodule-disable}"
1105 choosing-strategy: gerrit
1106 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1110 server-name: "{gerrit-server-name}"
1111 # Trigger should not be overridable as we want to always run
1113 - patchset-created-event:
1114 exclude-drafts: false
1115 exclude-trivial-rebase: false
1116 exclude-no-code-change: false
1117 - draft-published-event
1118 - comment-added-contains-event:
1119 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1121 - project-compare-type: ANT
1122 project-pattern: "{project-pattern}"
1124 - branch-compare-type: ANT
1125 branch-pattern: "**"
1128 name: "{project-name}-license-check"
1129 id: github-license-check
1130 <<: *lf_license_check
1133 - lf-infra-properties:
1134 build-days-to-keep: "{build-days-to-keep}"
1136 url: "{github-url}/{github-org}/{project}"
1139 - lf-infra-github-scm:
1140 url: "{git-clone-url}{github-org}/{project}"
1141 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1143 # Submodules are out of the project's control
1144 submodule-recursive: false
1145 submodule-timeout: "{submodule-timeout}"
1146 submodule-disable: "{submodule-disable}"
1147 choosing-strategy: default
1148 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1151 - github-pull-request:
1152 trigger-phrase: "^recheck$"
1153 only-trigger-phrase: false
1154 status-context: "License Check"
1157 white-list-target-branches:
1160 ####################
1161 # Info YAML Verify #
1162 ####################
1164 - lf_info_yaml_verify: &lf_info_yaml_verify
1165 name: lf-info-yaml-verify
1167 ######################
1168 # Default parameters #
1169 ######################
1171 gerrit_verify_triggers:
1172 - patchset-created-event:
1173 exclude-drafts: true
1174 exclude-trivial-rebase: false
1175 exclude-no-code-change: false
1176 - draft-published-event
1177 - comment-added-contains-event:
1178 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1180 #####################
1181 # Job Configuration #
1182 #####################
1187 - shell: !include-raw-escape:
1188 - ../shell/git-validate-info-yaml.sh
1189 - ../shell/info-file-validate.sh
1192 name: "{project-name}-info-yaml-verify"
1193 id: gerrit-info-yaml-verify
1195 # yamllint disable-line rule:key-duplicates
1196 <<: *lf_info_yaml_verify
1198 git-url: "$GIT_URL/$GERRIT_PROJECT"
1201 - lf-infra-gerrit-scm:
1202 git-url: "{git-url}"
1203 refspec: "$GERRIT_REFSPEC"
1204 branch: "$GERRIT_BRANCH"
1205 submodule-recursive: "{submodule-recursive}"
1206 submodule-timeout: "{submodule-timeout}"
1207 submodule-disable: "{submodule-disable}"
1208 choosing-strategy: gerrit
1209 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1213 server-name: "{gerrit-server-name}"
1214 trigger-on: "{obj:gerrit_verify_triggers}"
1216 - project-compare-type: ANT
1217 project-pattern: "{project}"
1219 - branch-compare-type: ANT
1220 branch-pattern: "**/{branch}"
1222 - compare-type: REG_EXP
1223 pattern: "INFO.yaml"
1226 name: "{project-name}-info-yaml-verify"
1227 id: github-info-yaml-verify
1229 # yamllint disable-line rule:key-duplicates
1230 <<: *lf_info_yaml_verify
1232 github-url: "https://github.com"
1235 url: "{github-url}/{github-org}/{project}"
1238 - lf-infra-github-scm:
1239 url: "{git-clone-url}{github-org}/{project}"
1240 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1242 submodule-recursive: "{submodule-recursive}"
1243 submodule-timeout: "{submodule-timeout}"
1244 submodule-disable: "{submodule-disable}"
1245 choosing-strategy: default
1246 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1249 - github-pull-request:
1250 trigger-phrase: "^(recheck|reverify)$"
1251 only-trigger-phrase: false
1252 status-context: "INFO File Verify"
1255 # included-regions MUST match gerrit file-paths
1256 included-regions: "INFO.yaml"
1257 white-list-target-branches:
1264 - lf_openstack_cron: &lf_openstack_cron
1265 name: lf-openstack-cron
1267 ######################
1268 # Default parameters #
1269 ######################
1272 build-days-to-keep: 7
1276 git-url: "$GIT_URL/$PROJECT"
1277 github-url: "https://github.com"
1278 openstack-cloud: vex
1279 openstack-image-cleanup: true
1280 openstack-image-cleanup-age: 30
1281 openstack-image-protect: true
1282 openstack-port-cleanup: true
1283 openstack-server-cleanup: true
1284 openstack-stack-cleanup: true
1285 openstack-volume-cleanup: true
1287 submodule-timeout: 10
1288 submodule-disable: false
1290 #####################
1291 # Job Configuration #
1292 #####################
1294 project-type: freestyle
1295 node: "{build-node}"
1297 disabled: "{disable-job}"
1300 - lf-infra-properties:
1301 build-days-to-keep: "{build-days-to-keep}"
1304 - lf-infra-parameters:
1305 project: "{project}"
1310 default: "{jenkins-urls}"
1312 Space separated list of Jenkins URLs to check for active builds.
1315 - lf-infra-wrappers:
1316 build-timeout: "{build-timeout}"
1317 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1318 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1319 - config-file-provider:
1321 - file-id: clouds-yaml
1322 target: "$HOME/.config/openstack/clouds.yaml"
1324 target: "$HOME/.npmrc"
1326 target: "$HOME/.config/pip/pip.conf"
1329 - timed: "{obj:cron}"
1332 - lf-infra-pre-build
1334 properties-content: OS_CLOUD={openstack-cloud}
1337 condition-kind: boolean-expression
1338 condition-expression: "{openstack-stack-cleanup}"
1340 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1343 condition-kind: boolean-expression
1344 condition-expression: "{openstack-server-cleanup}"
1346 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1349 condition-kind: boolean-expression
1350 condition-expression: "{openstack-port-cleanup}"
1352 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1355 condition-kind: boolean-expression
1356 condition-expression: "{openstack-volume-cleanup}"
1358 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1361 condition-kind: boolean-expression
1362 condition-expression: "{openstack-image-protect}"
1364 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1366 condition-kind: boolean-expression
1367 condition-expression: "{openstack-image-cleanup}"
1370 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1371 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1377 name: "{project-name}-openstack-cron"
1378 id: gerrit-openstack-cron
1379 <<: *lf_openstack_cron
1382 - lf-infra-gerrit-scm:
1383 git-url: "{git-url}"
1384 refspec: "refs/heads/{branch}"
1386 submodule-recursive: true
1387 submodule-timeout: "{submodule-timeout}"
1388 submodule-disable: "{submodule-disable}"
1389 choosing-strategy: default
1390 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1393 name: "{project-name}-openstack-cron"
1394 id: github-openstack-cron
1395 <<: *lf_openstack_cron
1398 - lf-infra-github-scm:
1399 url: "{git-clone-url}{github-org}/{project}"
1401 branch: "refs/heads/{branch}"
1402 submodule-recursive: true
1403 submodule-timeout: "{submodule-timeout}"
1404 submodule-disable: "{submodule-disable}"
1405 choosing-strategy: default
1406 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1412 - lf_packer_merge: &lf_packer_merge
1413 name: lf-packer-merge
1415 ######################
1416 # Default parameters #
1417 ######################
1420 openstack-cloud: vex
1421 update-cloud-image: false
1423 #####################
1424 # Job Configuration #
1425 #####################
1428 - lf-infra-parameters:
1429 project: "{project}"
1432 - lf-packer-parameters:
1433 packer-version: "{packer-version}"
1435 name: UPDATE_CLOUD_IMAGE
1436 default: "{update-cloud-image}"
1437 description: "Update new built image on the cloud."
1440 - lf-infra-packer-build:
1441 openstack: "{openstack}"
1442 openstack-cloud: "{openstack-cloud}"
1443 packer-cloud-settings: "{packer-cloud-settings}"
1444 packer-version: "{packer-version}"
1445 platform: "{platforms}"
1446 template: "{templates}"
1447 update-cloud-image: "{update-cloud-image}"
1448 - description-setter:
1449 regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1450 description: 'Image: \2'
1452 # - project: '{project-name}-openstack-update-cloud-image'
1454 # predefined-parameters: |
1455 # GERRIT_BRANCH=$GERRIT_BRANCH
1456 # GERRIT_PROJECT=$GERRIT_PROJECT
1457 # GERRIT_REFSPEC=$GERRIT_REFSPEC
1458 # NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1459 # property-file: variables.jenkins-trigger
1460 # property-file-fail-on-missing: true
1464 - trigger-parameterized-builds:
1465 - project: "{project-name}-openstack-update-cloud-image"
1466 condition: UNSTABLE_OR_BETTER
1467 predefined-parameters: |
1468 NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1469 property-file: variables.jenkins-trigger
1470 fail-on-missing: true
1473 name: "{project-name}-packer-merge-{platforms}-{templates}"
1474 id: gerrit-packer-merge
1475 <<: *lf_packer_common
1476 # yamllint disable-line rule:key-duplicates
1477 <<: *lf_packer_merge
1479 ######################
1480 # Default parameters #
1481 ######################
1483 git-url: "$GIT_URL/$GERRIT_PROJECT"
1485 gerrit_merge_triggers:
1486 - change-merged-event
1487 - comment-added-contains-event:
1488 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1490 #####################
1491 # Job Configuration #
1492 #####################
1495 - lf-infra-gerrit-scm:
1496 git-url: "{git-url}"
1497 refspec: "$GERRIT_REFSPEC"
1498 branch: "$GERRIT_BRANCH"
1499 submodule-recursive: "{submodule-recursive}"
1500 submodule-timeout: "{submodule-timeout}"
1501 submodule-disable: "{submodule-disable}"
1502 choosing-strategy: default
1503 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1506 - timed: "{obj:cron}"
1508 server-name: "{gerrit-server-name}"
1509 trigger-on: "{obj:gerrit_merge_triggers}"
1511 - project-compare-type: ANT
1512 project-pattern: "{project}"
1514 - branch-compare-type: ANT
1515 branch-pattern: "**/{branch}"
1517 - compare-type: REG_EXP
1518 pattern: 'packer\/provision\/.*\.sh'
1519 - compare-type: REG_EXP
1520 pattern: 'packer\/provision\/.*\.bat'
1521 - compare-type: REG_EXP
1522 pattern: 'packer\/provision\/.*\.ps1'
1523 - compare-type: REG_EXP
1524 pattern: 'packer\/provision\/{templates}\.yaml'
1525 - compare-type: REG_EXP
1526 pattern: 'packer\/provision\/local-{templates}\.yaml'
1527 - compare-type: REG_EXP
1528 pattern: 'packer\/templates\/{templates}\.json'
1529 - compare-type: REG_EXP
1530 pattern: 'packer\/vars\/{platforms}\.json'
1533 name: "{project-name}-packer-merge-{platforms}-{templates}"
1534 id: github-packer-merge
1535 <<: *lf_packer_common
1536 # yamllint disable-line rule:key-duplicates
1537 <<: *lf_packer_merge
1539 #####################
1540 # Job Configuration #
1541 #####################
1544 - lf-infra-properties:
1545 project: "{project}"
1546 build-days-to-keep: 7
1548 url: "{github-url}/{github-org}/{project}"
1551 - lf-infra-github-scm:
1552 url: "{git-clone-url}{github-org}/{project}"
1554 +refs/heads/*:refs/remotes/origin/*
1555 +refs/pull/*:refs/remotes/origin/pr/*
1556 branch: "$GERRIT_REFSPEC"
1557 submodule-recursive: "{submodule-recursive}"
1558 submodule-timeout: "{submodule-timeout}"
1559 submodule-disable: "{submodule-disable}"
1560 choosing-strategy: default
1561 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1564 - timed: "{obj:cron}"
1569 - github-pull-request:
1570 trigger-phrase: "^remerge$"
1571 only-trigger-phrase: true
1572 status-context: "Packer {platforms}-{templates} Merge"
1577 white-list: "{obj:github_pr_whitelist}"
1578 admin-list: "{obj:github_pr_admin_list}"
1579 # included-regions MUST match Gerrit Trigger file-paths
1581 - 'packer\/provision\/.*\.sh'
1582 - 'packer\/provision\/.*\.bat'
1583 - 'packer\/provision\/.*\.ps1'
1584 - 'packer\/provision\/{templates}\.yaml'
1585 - 'packer\/provision\/local-{templates}\.yaml'
1586 - 'packer\/templates\/{templates}\.json'
1587 - 'packer\/vars\/{platforms}\.json'
1588 white-list-target-branches:
1595 - lf_packer_verify: &lf_packer_verify
1596 name: lf-packer-verify
1598 ######################
1599 # Default parameters #
1600 ######################
1604 openstack-cloud: vex
1606 gerrit_verify_triggers:
1607 - patchset-created-event:
1608 exclude-drafts: true
1609 exclude-trivial-rebase: false
1610 exclude-no-code-change: false
1611 - draft-published-event
1612 - comment-added-contains-event:
1613 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1615 gerrit_trigger_file_paths:
1616 - compare-type: REG_EXP
1617 pattern: 'packer\/.*'
1619 # github_included_regions MUST match gerrit_trigger_file_paths
1620 github_included_regions:
1623 #####################
1624 # Job Configuration #
1625 #####################
1630 - lf-infra-packer-validate:
1631 openstack: "{openstack}"
1632 openstack-cloud: "{openstack-cloud}"
1633 packer-cloud-settings: "{packer-cloud-settings}"
1634 packer-version: "{packer-version}"
1637 name: "{project-name}-packer-verify"
1638 id: gerrit-packer-verify
1639 <<: *lf_packer_common
1640 # yamllint disable-line rule:key-duplicates
1641 <<: *lf_packer_verify
1643 ######################
1644 # Default parameters #
1645 ######################
1647 git-url: "$GIT_URL/$GERRIT_PROJECT"
1649 #####################
1650 # Job Configuration #
1651 #####################
1654 - lf-infra-gerrit-scm:
1655 git-url: "{git-url}"
1656 refspec: "$GERRIT_REFSPEC"
1657 branch: "$GERRIT_BRANCH"
1658 submodule-recursive: "{submodule-recursive}"
1659 submodule-timeout: "{submodule-timeout}"
1660 submodule-disable: "{submodule-disable}"
1661 choosing-strategy: gerrit
1662 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1666 server-name: "{gerrit-server-name}"
1667 trigger-on: "{obj:gerrit_verify_triggers}"
1669 - project-compare-type: ANT
1670 project-pattern: "{project}"
1672 - branch-compare-type: ANT
1673 branch-pattern: "**/{branch}"
1674 file-paths: "{obj:gerrit_trigger_file_paths}"
1677 name: "{project-name}-packer-verify"
1678 id: github-packer-verify
1679 <<: *lf_packer_common
1680 # yamllint disable-line rule:key-duplicates
1681 <<: *lf_packer_verify
1683 #####################
1684 # Job Configuration #
1685 #####################
1688 - lf-infra-properties:
1689 project: "{project}"
1690 build-days-to-keep: 7
1692 url: "{github-url}/{github-org}/{project}"
1695 - lf-infra-github-scm:
1696 url: "{git-clone-url}{github-org}/{project}"
1697 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1699 submodule-recursive: "{submodule-recursive}"
1700 submodule-timeout: "{submodule-timeout}"
1701 submodule-disable: "{submodule-disable}"
1702 choosing-strategy: default
1703 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1706 - github-pull-request:
1707 trigger-phrase: "^(recheck|reverify)$"
1708 only-trigger-phrase: false
1709 status-context: "Packer Verify"
1712 included-regions: "{obj:github_included_regions}"
1713 white-list-target-branches:
1716 ################################
1717 # Openstack Update Cloud Image #
1718 ################################
1720 - lf_openstack_cron: &lf_openstack_update_cloud_image
1721 name: lf-openstack-update-cloud-image
1723 ######################
1724 # Default parameters #
1725 ######################
1728 build-days-to-keep: 7
1732 git-url: "$GIT_URL/$PROJECT"
1733 github-url: "https://github.com"
1734 new-image-name: "all"
1735 openstack-cloud: vex
1737 submodule-timeout: 10
1738 submodule-disable: false
1739 update-cloud-image: false
1741 #####################
1742 # Job Configuration #
1743 #####################
1745 project-type: freestyle
1746 node: "{build-node}"
1748 disabled: "{disable-job}"
1751 - lf-infra-properties:
1752 build-days-to-keep: "{build-days-to-keep}"
1755 - lf-infra-parameters:
1756 project: "{project}"
1760 name: NEW_IMAGE_NAME
1761 default: "{new-image-name}"
1762 description: "Name of cloud image to update in Jenkins"
1765 - lf-infra-wrappers:
1766 build-timeout: "{build-timeout}"
1767 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1768 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1769 - config-file-provider:
1771 - file-id: clouds-yaml
1772 target: "$HOME/.config/openstack/clouds.yaml"
1774 target: "$HOME/.npmrc"
1776 target: "$HOME/.config/pip/pip.conf"
1779 - lf-infra-pre-build
1781 properties-content: |
1782 OS_CLOUD={openstack-cloud}
1785 echo "Extract the image type for commit message"
1786 # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1787 IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1788 echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1791 properties-file: "image-type.txt"
1792 - lf-infra-update-packer-images
1793 - lf-infra-push-gerrit-patch:
1794 project: "{project}"
1795 gerrit-user: "{gerrit-user}"
1796 gerrit-host: "{gerrit-host}"
1797 gerrit-topic: "{gerrit-topic}"
1798 gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1799 reviewers-email: "{reviewers-email}"
1805 name: "{project-name}-openstack-update-cloud-image"
1806 id: gerrit-openstack-update-cloud-image
1807 <<: *lf_openstack_update_cloud_image
1809 ######################
1810 # Default parameters #
1811 ######################
1813 git-url: "$GIT_URL/$GERRIT_PROJECT"
1815 #####################
1816 # Job Configuration #
1817 #####################
1820 - lf-infra-gerrit-scm:
1821 git-url: "{git-url}"
1822 refspec: "$GERRIT_REFSPEC"
1823 branch: "$GERRIT_BRANCH"
1824 submodule-recursive: false
1825 submodule-timeout: "{submodule-timeout}"
1826 submodule-disable: "{submodule-disable}"
1827 choosing-strategy: gerrit
1828 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1831 - timed: "{obj:cron}"
1837 - lf_puppet_verify: &lf_puppet_verify
1838 name: lf-puppet-verify
1840 ######################
1841 # Default parameters #
1842 ######################
1845 build-days-to-keep: 7
1848 git-url: "$GIT_URL/$GERRIT_PROJECT"
1849 github-url: "https://github.com"
1852 puppet-lint-version: 2.3.6
1854 submodule-recursive: true
1855 submodule-timeout: 10
1856 submodule-disable: false
1858 gerrit_trigger_file_paths:
1859 - compare-type: REG_EXP
1862 # github_included_regions MUST match gerrit_trigger_file_paths
1863 github_included_regions:
1866 #####################
1867 # Job Configuration #
1868 #####################
1870 project-type: freestyle
1871 node: "{build-node}"
1873 disabled: "{disable-job}"
1876 - lf-infra-properties:
1877 build-days-to-keep: "{build-days-to-keep}"
1880 - lf-infra-parameters:
1881 project: "{project}"
1884 - lf-puppet-parameters:
1885 puppet-lint-version: "{puppet-lint-version}"
1888 - lf-infra-wrappers:
1889 build-timeout: "{build-timeout}"
1890 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1893 - shell: !include-raw-escape: ../shell/puppet-lint.sh
1899 name: "{project-name}-puppet-verify"
1900 id: gerrit-puppet-verify
1901 <<: *lf_puppet_verify
1903 ######################
1904 # Default parameters #
1905 ######################
1907 gerrit_verify_triggers:
1908 - patchset-created-event:
1909 exclude-drafts: true
1910 exclude-trivial-rebase: false
1911 exclude-no-code-change: false
1912 - draft-published-event
1913 - comment-added-contains-event:
1914 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1916 #####################
1917 # Job Configuration #
1918 #####################
1921 - lf-infra-gerrit-scm:
1922 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1923 git-url: "{git-url}"
1924 refspec: "$GERRIT_REFSPEC"
1925 branch: "$GERRIT_BRANCH"
1926 submodule-recursive: "{submodule-recursive}"
1927 submodule-timeout: "{submodule-timeout}"
1928 submodule-disable: "{submodule-disable}"
1929 choosing-strategy: gerrit
1933 server-name: "{gerrit-server-name}"
1934 trigger-on: "{obj:gerrit_verify_triggers}"
1936 - project-compare-type: ANT
1937 project-pattern: "{project}"
1939 - branch-compare-type: ANT
1940 branch-pattern: "**/{branch}"
1941 file-paths: "{obj:gerrit_trigger_file_paths}"
1944 name: "{project-name}-puppet-verify"
1945 id: github-puppet-verify
1946 <<: *lf_puppet_verify
1948 #####################
1949 # Job Configuration #
1950 #####################
1953 - lf-infra-properties:
1954 project: "{project}"
1955 build-days-to-keep: 7
1957 url: "{github-url}/{github-org}/{project}"
1960 - lf-infra-github-scm:
1961 url: "{git-clone-url}{github-org}/{project}"
1962 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1964 submodule-recursive: "{submodule-recursive}"
1965 submodule-timeout: "{submodule-timeout}"
1966 submodule-disable: "{submodule-disable}"
1967 choosing-strategy: default
1968 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1971 - github-pull-request:
1972 trigger-phrase: "^(recheck|reverify)$"
1973 only-trigger-phrase: false
1974 status-context: "Puppet Verify"
1977 included-regions: "{obj:github_included_regions}"
1978 white-list-target-branches:
1985 - lf_sonar_common: &lf_sonar_common
1986 name: lf-sonar-common
1988 ######################
1989 # Default parameters #
1990 ######################
1992 archive-artifacts: >
1995 branch: master # Sonar should always be run on master branch
1996 build-days-to-keep: 7
1998 cron: "H H * * *" # run daily
2000 git-url: "$GIT_URL/$PROJECT"
2001 github-url: "https://github.com"
2003 submodule-recursive: true
2004 submodule-timeout: 10
2005 submodule-disable: false
2009 sonar-project-file: "sonar-project.properties"
2010 sonar-properties: ""
2012 sonar-additional-args: ""
2014 gerrit_trigger_file_paths:
2015 - compare-type: REG_EXP
2018 # github_included_regions MUST match gerrit_trigger_file_paths
2019 github_included_regions:
2022 #####################
2023 # Job Configuration #
2024 #####################
2026 project-type: freestyle
2027 node: "{build-node}"
2030 - lf-infra-properties:
2031 build-days-to-keep: "{build-days-to-keep}"
2034 - lf-infra-wrappers:
2035 build-timeout: "{build-timeout}"
2036 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2038 disabled: "{disable-job}"
2041 - lf-infra-parameters:
2042 project: "{project}"
2046 name: ARCHIVE_ARTIFACTS
2047 default: "{archive-artifacts}"
2048 description: Artifacts to archive to the logs server.
2053 - lf_sonar_builders: &lf_sonar_builders
2054 name: lf-sonar-builders
2056 - lf-infra-pre-build
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_builders_prescan: &lf_sonar_builders_prescan
2065 name: lf-sonar-builders-prescan
2067 - lf-infra-pre-build
2068 - lf-infra-sonar-with-prescan:
2069 sonar-task: "{sonar-task}"
2070 sonar-project-file: "{sonar-project-file}"
2071 sonar-properties: "{sonar-properties}"
2072 sonar-java-opts: "{sonar-java-opts}"
2073 sonar-additional-args: "{sonar-additional-args}"
2075 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2076 name: lf-sonar-gerrit-common
2077 gerrit_sonar_triggers:
2078 - comment-added-contains-event:
2079 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2082 - lf-infra-gerrit-scm:
2083 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2084 git-url: "{git-url}"
2085 refspec: $GERRIT_REFSPEC
2086 branch: $GERRIT_BRANCH
2087 submodule-recursive: "{submodule-recursive}"
2088 submodule-timeout: "{submodule-timeout}"
2089 submodule-disable: "{submodule-disable}"
2090 choosing-strategy: default
2093 - timed: "{obj:cron}"
2095 server-name: "{gerrit-server-name}"
2096 trigger-on: "{obj:gerrit_sonar_triggers}"
2098 - project-compare-type: "ANT"
2099 project-pattern: "{project}"
2101 - branch-compare-type: "ANT"
2102 branch-pattern: "**/{branch}"
2103 file-paths: "{obj:gerrit_trigger_file_paths}"
2110 - lf_sonar_github_common: &lf_sonar_github_common
2111 name: lf-sonar-github-common
2113 - lf-infra-properties:
2114 build-days-to-keep: "{build-days-to-keep}"
2116 url: "{github-url}/{github-org}/{project}"
2119 - lf-infra-github-scm:
2120 url: "{git-clone-url}{github-org}/{project}"
2121 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2123 submodule-recursive: "{submodule-recursive}"
2124 submodule-timeout: "{submodule-timeout}"
2125 submodule-disable: "{submodule-disable}"
2126 choosing-strategy: default
2127 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2130 - github-pull-request:
2131 trigger-phrase: "^run-sonar$"
2132 only-trigger-phrase: false
2133 status-context: "Python Sonar"
2136 white-list-target-branches:
2138 included-regions: "{obj:github_included_regions}"
2141 name: "{project-name}-sonar"
2143 <<: *lf_sonar_common
2144 # yamllint disable-line rule:key-duplicates
2145 <<: *lf_sonar_builders
2146 # yamllint disable-line rule:key-duplicates
2147 <<: *lf_sonar_gerrit_common
2150 name: "{project-name}-sonar"
2152 <<: *lf_sonar_common
2153 # yamllint disable-line rule:key-duplicates
2154 <<: *lf_sonar_builders
2155 # yamllint disable-line rule:key-duplicates
2156 <<: *lf_sonar_github_common
2159 name: "{project-name}-sonar-prescan"
2160 id: gerrit-sonar-prescan
2161 <<: *lf_sonar_common
2162 # yamllint disable-line rule:key-duplicates
2163 <<: *lf_sonar_builders_prescan
2164 # yamllint disable-line rule:key-duplicates
2165 <<: *lf_sonar_gerrit_common
2168 name: "{project-name}-sonar-prescan"
2169 id: github-sonar-prescan
2170 <<: *lf_sonar_common
2171 # yamllint disable-line rule:key-duplicates
2172 <<: *lf_sonar_builders_prescan
2173 # yamllint disable-line rule:key-duplicates
2174 <<: *lf_sonar_github_common