9 - config-file-provider:
12 target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
14 - lf_packer: &lf_packer_common
15 name: lf-packer-common
16 # Provide configuration common in packer jobs.
18 ######################
19 # Default parameters #
20 ######################
26 github-url: "https://github.com"
28 submodule-recursive: true
30 submodule-disable: false
31 packer-cloud-settings: packer-cloud-env
38 project-type: freestyle
40 disabled: "{disable-job}"
43 - lf-infra-properties:
48 - lf-infra-parameters:
52 - lf-packer-parameters:
53 packer-version: "{packer-version}"
57 build-timeout: "{build-timeout}"
58 jenkins-ssh-credential: "{jenkins-ssh-credential}"
64 name: lf-infra-jjb-parameters
68 default: "{jjb-version}"
69 description: Jenkins Job Builder version to download and install.
72 default: "{jjb-cache}"
73 description: Jenkins Job Builder cache location.
76 name: lf-packer-parameters
80 default: "{packer-version}"
81 description: Packer version to download and install.
84 name: lf-puppet-parameters
87 name: PUPPET_LINT_VERSION
88 default: "{puppet-lint-version}"
89 description: Puppet-lint version to download and install.
91 - lf_jjb_common: &lf_jjb_common
94 ######################
95 # Default parameters #
96 ######################
101 github-url: "https://github.com"
102 jjb-cache: "$HOME/.cache/jenkins_jobs"
105 submodule-recursive: true
106 submodule-timeout: 10
107 submodule-disable: false
108 throttle_categories: []
109 throttle-enabled: false
110 throttle-max-per-node: 1
111 throttle-max-total: 0
112 throttle-option: "project"
114 gerrit_trigger_file_paths:
115 - compare-type: REG_EXP
117 - compare-type: REG_EXP
118 pattern: "global-jjb"
119 - compare-type: REG_EXP
122 # github_included_regions MUST match gerrit_trigger_file_paths
123 github_included_regions:
128 #####################
129 # Job Configuration #
130 #####################
132 project-type: freestyle
134 disabled: "{disable-job}"
137 - lf-infra-properties:
139 build-days-to-keep: 7
141 categories: "{obj:throttle_categories}"
142 enabled: "{throttle-enabled}"
143 max-per-node: "{throttle-max-per-node}"
144 max-total: "{throttle-max-total}"
145 option: "{throttle-option}"
148 - lf-infra-parameters:
152 - lf-infra-jjb-parameters:
153 jjb-cache: "{jjb-cache}"
154 jjb-version: "{jjb-version}"
158 build-timeout: "{build-timeout}"
159 jenkins-ssh-credential: "{jenkins-ssh-credential}"
164 ######################
165 # Gerrit Branch Lock #
166 ######################
169 name: "{project-name}-gerrit-branch-lock"
170 id: gerrit-branch-lock
172 ######################
173 # Default parameters #
174 ######################
178 git-url: "$GIT_URL/$GERRIT_PROJECT"
179 submodule-timeout: 10
180 submodule-disable: true
181 gerrit_merge_triggers:
182 - comment-added-contains-event:
183 comment-contains-value: (un)?lock branch$
185 #####################
186 # Job Configuration #
187 #####################
189 project-type: freestyle
191 disabled: "{disable-job}"
194 - lf-infra-properties:
196 build-days-to-keep: 1
199 - lf-infra-parameters:
207 jenkins-ssh-credential: "{jenkins-ssh-credential}"
210 - lf-infra-gerrit-scm:
213 branch: "$GERRIT_BRANCH"
214 submodule-recursive: false
215 submodule-timeout: "{submodule-timeout}"
216 submodule-disable: "{submodule-disable}"
217 choosing-strategy: default
218 jenkins-ssh-credential: "{jenkins-ssh-credential}"
222 server-name: "{gerrit-server-name}"
223 trigger-on: "{obj:gerrit_merge_triggers}"
225 - project-compare-type: ANT
226 project-pattern: "**"
228 - branch-compare-type: ANT
229 branch-pattern: "**/{branch}"
232 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
237 ##########################################
238 # Jenkins Configuration Management Merge #
239 ##########################################
242 name: lf-jenkins-cfg-clouds
246 properties-content: "jenkins_silos={jenkins-silos}"
247 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
248 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
251 name: lf-jenkins-cfg-global-vars
255 properties-content: "jenkins_silos={jenkins-silos}"
256 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
257 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
259 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
260 name: lf-jenkins-cfg-merge
262 ######################
263 # Default parameters #
264 ######################
269 git-url: "$GIT_URL/$GERRIT_PROJECT"
270 github-url: "https://github.com"
271 jenkins-silos: production sandbox
272 submodule-timeout: 10
273 submodule-disable: false
275 gerrit_merge_triggers:
276 - change-merged-event
277 - comment-added-contains-event:
278 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
280 gerrit_trigger_file_paths:
281 - compare-type: REG_EXP
282 pattern: 'jenkins-config\/.*'
284 # github_included_regions MUST match gerrit_trigger_file_paths
285 github_included_regions:
286 - 'jenkins-config\/.*'
288 #####################
289 # Job Configuration #
290 #####################
292 project-type: freestyle
295 disabled: "{disable-job}"
298 - lf-infra-properties:
300 build-days-to-keep: 1
303 - lf-infra-parameters:
311 jenkins-ssh-credential: "{jenkins-ssh-credential}"
315 - lf-jenkins-cfg-global-vars:
316 jenkins-silos: "{jenkins-silos}"
317 - lf-jenkins-cfg-clouds:
318 jenkins-silos: "{jenkins-silos}"
324 name: "{project-name}-jenkins-cfg-merge"
325 id: gerrit-jenkins-cfg-merge
326 <<: *lf_jenkins_cfg_merge
329 - lf-infra-gerrit-scm:
331 refspec: "refs/heads/{branch}"
333 submodule-recursive: true
334 submodule-timeout: "{submodule-timeout}"
335 submodule-disable: "{submodule-disable}"
336 choosing-strategy: default
337 jenkins-ssh-credential: "{jenkins-ssh-credential}"
340 - timed: "{obj:cron}"
342 server-name: "{gerrit-server-name}"
343 trigger-on: "{obj:gerrit_merge_triggers}"
345 - project-compare-type: ANT
346 project-pattern: "{project}"
348 - branch-compare-type: ANT
349 branch-pattern: "**/{branch}"
350 file-paths: "{obj:gerrit_trigger_file_paths}"
353 name: "{project-name}-jenkins-cfg-merge"
354 id: github-jenkins-cfg-merge
355 <<: *lf_jenkins_cfg_merge
358 - lf-infra-properties:
360 build-days-to-keep: 1
362 url: "{github-url}/{github-org}/{project}"
365 - lf-infra-github-scm:
366 url: "{git-clone-url}{github-org}/{project}"
368 branch: "refs/heads/{branch}"
369 submodule-recursive: true
370 submodule-timeout: "{submodule-timeout}"
371 submodule-disable: "{submodule-disable}"
372 choosing-strategy: default
373 jenkins-ssh-credential: "{jenkins-ssh-credential}"
376 - timed: "{obj:cron}"
380 - github-pull-request:
381 trigger-phrase: "^remerge$"
382 only-trigger-phrase: true
383 status-context: "Jenkins CFG Merge"
388 white-list: "{obj:github_pr_whitelist}"
389 admin-list: "{obj:github_pr_admin_list}"
390 included-regions: "{obj:github_included_regions}"
391 white-list-target-branches:
394 ###########################################
395 # Jenkins Configuration Management Verify #
396 ###########################################
398 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
399 name: lf-jenkins-cfg-verify
401 ######################
402 # Default parameters #
403 ######################
406 build-days-to-keep: 7
408 git-url: "$GIT_URL/$GERRIT_PROJECT"
409 github-url: "https://github.com"
410 submodule-timeout: 10
411 submodule-disable: false
413 gerrit_verify_triggers:
414 - patchset-created-event:
416 exclude-trivial-rebase: false
417 exclude-no-code-change: false
418 - draft-published-event
419 - comment-added-contains-event:
420 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
422 gerrit_trigger_file_paths:
423 - compare-type: REG_EXP
424 pattern: 'jenkins-config\/.*'
426 # github_included_regions MUST match gerrit_trigger_file_paths
427 github_included_regions:
428 - 'jenkins-config\/.*'
430 #####################
431 # Job Configuration #
432 #####################
434 project-type: freestyle
437 disabled: "{disable-job}"
440 - lf-infra-properties:
442 build-days-to-keep: 1
445 - lf-infra-parameters:
453 jenkins-ssh-credential: "{jenkins-ssh-credential}"
454 - config-file-provider:
455 # Listed after to override openstack-infra-wrappers clouds.yaml
458 - file-id: clouds-yaml
459 target: "$HOME/.config/openstack/clouds.yaml"
461 target: "$HOME/.npmrc"
463 target: "$HOME/.config/pip/pip.conf"
467 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
473 name: "{project-name}-jenkins-cfg-verify"
474 id: gerrit-jenkins-cfg-verify
475 <<: *lf_jenkins_cfg_verify
478 - lf-infra-gerrit-scm:
480 refspec: "$GERRIT_REFSPEC"
481 branch: "$GERRIT_BRANCH"
482 submodule-recursive: true
483 submodule-timeout: "{submodule-timeout}"
484 submodule-disable: "{submodule-disable}"
485 choosing-strategy: gerrit
486 jenkins-ssh-credential: "{jenkins-ssh-credential}"
490 server-name: "{gerrit-server-name}"
491 trigger-on: "{obj:gerrit_verify_triggers}"
493 - project-compare-type: ANT
494 project-pattern: "{project}"
496 - branch-compare-type: ANT
497 branch-pattern: "**/{branch}"
498 file-paths: "{obj:gerrit_trigger_file_paths}"
501 name: "{project-name}-jenkins-cfg-verify"
502 id: github-jenkins-cfg-verify
503 <<: *lf_jenkins_cfg_verify
507 url: "{github-url}/{github-org}/{project}"
510 - lf-infra-github-scm:
511 url: "{git-clone-url}{github-org}/{project}"
512 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
514 submodule-recursive: true
515 submodule-timeout: "{submodule-timeout}"
516 submodule-disable: "{submodule-disable}"
517 choosing-strategy: default
518 jenkins-ssh-credential: "{jenkins-ssh-credential}"
521 - github-pull-request:
522 trigger-phrase: "^(recheck|reverify)$"
523 only-trigger-phrase: false
524 status-context: "Jenkins CFG Verify"
527 included-regions: "{obj:github_included_regions}"
528 white-list-target-branches:
531 ###########################
532 # JENKINS SANDBOX CLEANUP #
533 ###########################
535 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
536 name: lf-jenkins-sandbox-cleanup
538 ######################
539 # Default parameters #
540 ######################
543 # Run every Saturday at 08:00 UTC
547 #####################
548 # Job Configuration #
549 #####################
551 project-type: freestyle
554 disabled: "{disable-job}"
557 - lf-infra-jjb-parameters:
558 jjb-cache: "{jjb-cache}"
559 jjb-version: "{jjb-version}"
562 - timed: "{obj:cron}"
566 - shell: !include-raw-escape:
567 - ../shell/jenkins-sandbox-cleanup.sh
570 name: "{project-name}-jenkins-sandbox-cleanup"
571 id: gerrit-jenkins-sandbox-cleanup
573 # yamllint disable-line rule:key-duplicates
574 <<: *lf_jenkins_sandbox_cleanup
577 name: "{project-name}-jenkins-sandbox-cleanup"
578 id: github-jenkins-sandbox-cleanup
580 # yamllint disable-line rule:key-duplicates
581 <<: *lf_jenkins_sandbox_cleanup
587 - lf_jjb_deploy_job: &lf_jjb_deploy_job
588 name: lf-jjb-deploy-job
590 ######################
591 # Default parameters #
592 ######################
596 # jjb-deploy should always clone $PROJECT regardless of what
597 # $GERRIT_PROJECT triggered the job.
598 git-url: "$GIT_URL/$PROJECT"
599 github-url: "https://github.com"
601 submodule-timeout: 10
602 submodule-disable: false
603 gerrit_jjb_deploy_job_triggers:
604 - comment-added-contains-event:
605 comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
607 #####################
608 # Job Configuration #
609 #####################
611 project-type: freestyle
614 disabled: "{disable-job}"
617 - lf-infra-properties:
619 build-days-to-keep: 1
622 - lf-infra-parameters:
630 jenkins-ssh-credential: "{jenkins-ssh-credential}"
634 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
640 name: "{project-name}-jjb-deploy-job"
641 id: gerrit-jjb-deploy-job
642 <<: *lf_jjb_deploy_job
645 - lf-infra-gerrit-scm:
647 refspec: "refs/heads/{branch}"
649 submodule-recursive: true
650 submodule-timeout: "{submodule-timeout}"
651 submodule-disable: "{submodule-disable}"
652 choosing-strategy: default
653 jenkins-ssh-credential: "{jenkins-ssh-credential}"
657 server-name: "{gerrit-server-name}"
658 trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
660 - project-compare-type: ANT
661 project-pattern: "**"
663 - branch-compare-type: ANT
672 name: "{project-name}-jjb-deploy-job"
673 id: github-jjb-deploy-job
674 <<: *lf_jjb_deploy_job
677 - lf-infra-properties:
679 build-days-to-keep: 1
681 url: "{github-url}/{github-org}/{project}"
684 - lf-infra-github-scm:
685 url: "{git-clone-url}{github-org}/{project}"
686 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
688 submodule-recursive: true
689 submodule-timeout: "{submodule-timeout}"
690 submodule-disable: "{submodule-disable}"
691 choosing-strategy: default
692 jenkins-ssh-credential: "{jenkins-ssh-credential}"
695 - github-pull-request:
696 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
697 only-trigger-phrase: true
698 status-context: "JJB Deploy Job"
701 white-list-target-branches:
708 - lf_jjb_merge: &lf_jjb_merge
711 ######################
712 # Default parameters #
713 ######################
717 gerrit_merge_triggers:
718 - change-merged-event
719 - comment-added-contains-event:
720 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
722 #####################
723 # Job Configuration #
724 #####################
730 properties-content: JJB_WORKERS={jjb-workers}
731 - shell: !include-raw-escape:
732 - ../shell/jjb-merge-job.sh
735 name: "{project-name}-jjb-merge"
738 # yamllint disable-line rule:key-duplicates
741 git-url: "$GIT_URL/$GERRIT_PROJECT"
744 - lf-infra-gerrit-scm:
748 submodule-recursive: "{submodule-recursive}"
749 submodule-timeout: "{submodule-timeout}"
750 submodule-disable: "{submodule-disable}"
751 choosing-strategy: default
752 jenkins-ssh-credential: "{jenkins-ssh-credential}"
756 server-name: "{gerrit-server-name}"
757 trigger-on: "{obj:gerrit_merge_triggers}"
759 - project-compare-type: ANT
760 project-pattern: "{project}"
762 - branch-compare-type: ANT
763 branch-pattern: "**/{branch}"
764 file-paths: "{obj:gerrit_trigger_file_paths}"
767 name: "{project-name}-jjb-merge"
770 # yamllint disable-line rule:key-duplicates
773 #####################
774 # Job Configuration #
775 #####################
778 - lf-infra-properties:
780 build-days-to-keep: 7
782 url: "{github-url}/{github-org}/{project}"
785 - lf-infra-github-scm:
786 url: "{git-clone-url}{github-org}/{project}"
788 branch: "refs/heads/{branch}"
789 submodule-recursive: "{submodule-recursive}"
790 submodule-timeout: "{submodule-timeout}"
791 submodule-disable: "{submodule-disable}"
792 choosing-strategy: default
793 jenkins-ssh-credential: "{jenkins-ssh-credential}"
799 - github-pull-request:
800 trigger-phrase: "^remerge$"
801 only-trigger-phrase: true
802 status-context: "JJB Merge"
807 white-list: "{obj:github_pr_whitelist}"
808 admin-list: "{obj:github_pr_admin_list}"
809 included-regions: "{obj:github_included_regions}"
810 white-list-target-branches:
817 - lf_jjb_verify: &lf_jjb_verify
820 ######################
821 # Default parameters #
822 ######################
824 build-concurrent: true
825 check-build-node-labels: false
826 external-build-node-labels: ""
828 gerrit_verify_triggers:
829 - patchset-created-event:
831 exclude-trivial-rebase: false
832 exclude-no-code-change: false
833 - draft-published-event
834 - comment-added-contains-event:
835 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
837 #####################
838 # Job Configuration #
839 #####################
841 concurrent: "{build-concurrent}"
846 - shell: !include-raw-escape:
847 - ../shell/jjb-verify-job.sh
849 condition-kind: boolean-expression
850 condition-expression: "{check-build-node-labels}"
851 on-evaluation-failure: dont-run
854 properties-content: EXTERNAL_LABELS="{external-build-node-labels}"
855 - shell: !include-raw-escape:
856 - ../shell/jjb-verify-build-nodes.sh
857 - lf-infra-gpg-verify-git-signature
860 name: "{project-name}-jjb-verify"
861 id: gerrit-jjb-verify
863 # yamllint disable-line rule:key-duplicates
866 ######################
867 # Default parameters #
868 ######################
870 git-url: "$GIT_URL/$GERRIT_PROJECT"
872 #####################
873 # Job Configuration #
874 #####################
877 - lf-infra-gerrit-scm:
879 refspec: "$GERRIT_REFSPEC"
880 branch: "$GERRIT_BRANCH"
881 submodule-recursive: "{submodule-recursive}"
882 submodule-timeout: "{submodule-timeout}"
883 submodule-disable: "{submodule-disable}"
884 choosing-strategy: gerrit
885 jenkins-ssh-credential: "{jenkins-ssh-credential}"
889 server-name: "{gerrit-server-name}"
890 trigger-on: "{obj:gerrit_verify_triggers}"
892 - project-compare-type: ANT
893 project-pattern: "{project}"
895 - branch-compare-type: ANT
896 branch-pattern: "**/{branch}"
897 file-paths: "{obj:gerrit_trigger_file_paths}"
900 name: "{project-name}-jjb-verify"
901 id: github-jjb-verify
903 # yamllint disable-line rule:key-duplicates
906 #####################
907 # Job Configuration #
908 #####################
911 - lf-infra-properties:
913 build-days-to-keep: 7
915 url: "{github-url}/{github-org}/{project}"
918 - lf-infra-github-scm:
919 url: "{git-clone-url}{github-org}/{project}"
920 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
922 submodule-recursive: "{submodule-recursive}"
923 submodule-timeout: "{submodule-timeout}"
924 submodule-disable: "{submodule-disable}"
925 choosing-strategy: default
926 jenkins-ssh-credential: "{jenkins-ssh-credential}"
929 - github-pull-request:
930 trigger-phrase: "^(recheck|reverify)$"
931 only-trigger-phrase: false
932 status-context: "JJB Verify"
935 included-regions: "{obj:github_included_regions}"
936 white-list-target-branches:
939 ############################
940 # JJB Verify Upstream GJJB #
941 ############################
943 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
944 name: lf-jjb-verify-upstream-gjjb
946 #####################
947 # Job Configuration #
948 #####################
955 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
956 git cherry-pick FETCH_HEAD
958 - shell: !include-raw-escape:
959 - ../shell/jjb-verify-job.sh
960 - lf-infra-gpg-verify-git-signature
963 name: "{project-name}-jjb-verify-upstream-gjjb"
964 id: gerrit-jjb-verify-upstream-gjjb
966 # yamllint disable-line rule:key-duplicates
967 <<: *lf_jjb_verify_upstream_gjjb
969 ######################
970 # Default parameters #
971 ######################
973 git-url: "$GIT_URL/$PROJECT"
974 submodule-timeout: 10
975 submodule-disable: false
977 #####################
978 # Job Configuration #
979 #####################
982 - lf-infra-gerrit-scm:
986 submodule-recursive: true
987 submodule-timeout: "{submodule-timeout}"
988 submodule-disable: "{submodule-disable}"
989 choosing-strategy: default
990 jenkins-ssh-credential: "{jenkins-ssh-credential}"
994 server-name: "LinuxFoundation"
996 - patchset-created-event:
998 exclude-trivial-rebase: false
999 exclude-no-code-change: false
1000 - draft-published-event
1001 - comment-added-contains-event:
1002 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1004 - project-compare-type: ANT
1005 project-pattern: "releng/global-jjb"
1007 - branch-compare-type: ANT
1008 branch-pattern: "**/master"
1009 override-votes: true
1010 gerrit-build-failed-codereview-value: -1
1011 gerrit-build-failed-verified-value: 0
1012 gerrit-build-successful-codereview-value: 1
1013 gerrit-build-successful-verified-value: 0
1019 - lf_license_check: &lf_license_check
1020 name: lf-license-check
1022 ######################
1023 # Default parameters #
1024 ######################
1027 build-days-to-keep: 7
1036 git-url: "$GIT_URL/$PROJECT"
1037 github-url: "https://github.com"
1039 license-exclude-paths: ""
1040 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1041 project-pattern: "**"
1044 submodule-timeout: 10
1045 submodule-disable: false
1047 #####################
1048 # Job Configuration #
1049 #####################
1051 project-type: freestyle
1052 node: "{build-node}"
1054 disabled: "{disable-job}"
1057 - lf-infra-properties:
1058 build-days-to-keep: "{build-days-to-keep}"
1061 - lf-infra-parameters:
1062 project: "{project}"
1067 - lf-infra-wrappers:
1068 build-timeout: "{build-timeout}"
1069 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1073 file-patterns: "{file-patterns}"
1074 spdx-disable: "{spdx-disable}"
1075 lhc-version: "{lhc-version}"
1076 license-exclude-paths: "{license-exclude-paths}"
1077 licenses-allowed: "{licenses-allowed}"
1083 name: "{project-name}-license-check"
1084 id: gerrit-license-check
1085 <<: *lf_license_check
1087 git-url: "$GIT_URL/$GERRIT_PROJECT"
1090 - lf-infra-gerrit-scm:
1091 git-url: "{git-url}"
1092 refspec: "$GERRIT_REFSPEC"
1093 branch: "$GERRIT_BRANCH"
1094 # Submodules are out of the project's control
1095 submodule-recursive: false
1096 submodule-timeout: "{submodule-timeout}"
1097 submodule-disable: "{submodule-disable}"
1098 choosing-strategy: gerrit
1099 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1103 server-name: "{gerrit-server-name}"
1104 # Trigger should not be overridable as we want to always run
1106 - patchset-created-event:
1107 exclude-drafts: false
1108 exclude-trivial-rebase: false
1109 exclude-no-code-change: false
1110 - draft-published-event
1111 - comment-added-contains-event:
1112 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1114 - project-compare-type: ANT
1115 project-pattern: "{project-pattern}"
1117 - branch-compare-type: ANT
1118 branch-pattern: "**"
1121 name: "{project-name}-license-check"
1122 id: github-license-check
1123 <<: *lf_license_check
1126 - lf-infra-properties:
1127 build-days-to-keep: "{build-days-to-keep}"
1129 url: "{github-url}/{github-org}/{project}"
1132 - lf-infra-github-scm:
1133 url: "{git-clone-url}{github-org}/{project}"
1134 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1136 # Submodules are out of the project's control
1137 submodule-recursive: false
1138 submodule-timeout: "{submodule-timeout}"
1139 submodule-disable: "{submodule-disable}"
1140 choosing-strategy: default
1141 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1144 - github-pull-request:
1145 trigger-phrase: "^recheck$"
1146 only-trigger-phrase: false
1147 status-context: "License Check"
1150 white-list-target-branches:
1153 ####################
1154 # Info YAML Verify #
1155 ####################
1157 - lf_info_yaml_verify: &lf_info_yaml_verify
1158 name: lf-info-yaml-verify
1160 ######################
1161 # Default parameters #
1162 ######################
1164 gerrit_verify_triggers:
1165 - patchset-created-event:
1166 exclude-drafts: true
1167 exclude-trivial-rebase: false
1168 exclude-no-code-change: false
1169 - draft-published-event
1170 - comment-added-contains-event:
1171 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1173 #####################
1174 # Job Configuration #
1175 #####################
1180 - shell: !include-raw-escape:
1181 - ../shell/git-validate-info-yaml.sh
1182 - ../shell/info-file-validate.sh
1185 name: "{project-name}-info-yaml-verify"
1186 id: gerrit-info-yaml-verify
1188 # yamllint disable-line rule:key-duplicates
1189 <<: *lf_info_yaml_verify
1191 git-url: "$GIT_URL/$GERRIT_PROJECT"
1194 - lf-infra-gerrit-scm:
1195 git-url: "{git-url}"
1196 refspec: "$GERRIT_REFSPEC"
1197 branch: "$GERRIT_BRANCH"
1198 submodule-recursive: "{submodule-recursive}"
1199 submodule-timeout: "{submodule-timeout}"
1200 submodule-disable: "{submodule-disable}"
1201 choosing-strategy: gerrit
1202 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1206 server-name: "{gerrit-server-name}"
1207 trigger-on: "{obj:gerrit_verify_triggers}"
1209 - project-compare-type: ANT
1210 project-pattern: "{project}"
1212 - branch-compare-type: ANT
1213 branch-pattern: "**/{branch}"
1215 - compare-type: REG_EXP
1216 pattern: "INFO.yaml"
1219 name: "{project-name}-info-yaml-verify"
1220 id: github-info-yaml-verify
1222 # yamllint disable-line rule:key-duplicates
1223 <<: *lf_info_yaml_verify
1225 github-url: "https://github.com"
1228 url: "{github-url}/{github-org}/{project}"
1231 - lf-infra-github-scm:
1232 url: "{git-clone-url}{github-org}/{project}"
1233 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1235 submodule-recursive: "{submodule-recursive}"
1236 submodule-timeout: "{submodule-timeout}"
1237 submodule-disable: "{submodule-disable}"
1238 choosing-strategy: default
1239 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1242 - github-pull-request:
1243 trigger-phrase: "^(recheck|reverify)$"
1244 only-trigger-phrase: false
1245 status-context: "INFO File Verify"
1248 # included-regions MUST match gerrit file-paths
1249 included-regions: "INFO.yaml"
1250 white-list-target-branches:
1257 - lf_openstack_cron: &lf_openstack_cron
1258 name: lf-openstack-cron
1260 ######################
1261 # Default parameters #
1262 ######################
1265 build-days-to-keep: 7
1269 git-url: "$GIT_URL/$PROJECT"
1270 github-url: "https://github.com"
1271 openstack-cloud: vex
1272 openstack-image-cleanup: true
1273 openstack-image-cleanup-age: 30
1274 openstack-image-protect: true
1275 openstack-port-cleanup: true
1276 openstack-server-cleanup: true
1277 openstack-stack-cleanup: true
1278 openstack-volume-cleanup: true
1280 submodule-timeout: 10
1281 submodule-disable: false
1283 #####################
1284 # Job Configuration #
1285 #####################
1287 project-type: freestyle
1288 node: "{build-node}"
1290 disabled: "{disable-job}"
1293 - lf-infra-properties:
1294 build-days-to-keep: "{build-days-to-keep}"
1297 - lf-infra-parameters:
1298 project: "{project}"
1303 default: "{jenkins-urls}"
1305 Space separated list of Jenkins URLs to check for active builds.
1308 - lf-infra-wrappers:
1309 build-timeout: "{build-timeout}"
1310 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1311 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1312 - config-file-provider:
1314 - file-id: clouds-yaml
1315 target: "$HOME/.config/openstack/clouds.yaml"
1317 target: "$HOME/.npmrc"
1319 target: "$HOME/.config/pip/pip.conf"
1322 - timed: "{obj:cron}"
1325 - lf-infra-pre-build
1327 properties-content: OS_CLOUD={openstack-cloud}
1330 condition-kind: boolean-expression
1331 condition-expression: "{openstack-stack-cleanup}"
1333 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1336 condition-kind: boolean-expression
1337 condition-expression: "{openstack-server-cleanup}"
1339 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1342 condition-kind: boolean-expression
1343 condition-expression: "{openstack-port-cleanup}"
1345 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1348 condition-kind: boolean-expression
1349 condition-expression: "{openstack-volume-cleanup}"
1351 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1354 condition-kind: boolean-expression
1355 condition-expression: "{openstack-image-protect}"
1357 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1359 condition-kind: boolean-expression
1360 condition-expression: "{openstack-image-cleanup}"
1363 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1364 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1370 name: "{project-name}-openstack-cron"
1371 id: gerrit-openstack-cron
1372 <<: *lf_openstack_cron
1375 - lf-infra-gerrit-scm:
1376 git-url: "{git-url}"
1377 refspec: "refs/heads/{branch}"
1379 submodule-recursive: true
1380 submodule-timeout: "{submodule-timeout}"
1381 submodule-disable: "{submodule-disable}"
1382 choosing-strategy: default
1383 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1386 name: "{project-name}-openstack-cron"
1387 id: github-openstack-cron
1388 <<: *lf_openstack_cron
1391 - lf-infra-github-scm:
1392 url: "{git-clone-url}{github-org}/{project}"
1394 branch: "refs/heads/{branch}"
1395 submodule-recursive: true
1396 submodule-timeout: "{submodule-timeout}"
1397 submodule-disable: "{submodule-disable}"
1398 choosing-strategy: default
1399 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1405 - lf_packer_merge: &lf_packer_merge
1406 name: lf-packer-merge
1408 ######################
1409 # Default parameters #
1410 ######################
1413 openstack-cloud: vex
1414 update-cloud-image: false
1416 #####################
1417 # Job Configuration #
1418 #####################
1421 - lf-infra-parameters:
1422 project: "{project}"
1425 - lf-packer-parameters:
1426 packer-version: "{packer-version}"
1428 name: UPDATE_CLOUD_IMAGE
1429 default: "{update-cloud-image}"
1430 description: "Update new built image on the cloud."
1433 - lf-infra-packer-build:
1434 openstack: "{openstack}"
1435 openstack-cloud: "{openstack-cloud}"
1436 packer-cloud-settings: "{packer-cloud-settings}"
1437 packer-version: "{packer-version}"
1438 platform: "{platforms}"
1439 template: "{templates}"
1440 update-cloud-image: "{update-cloud-image}"
1441 - description-setter:
1442 regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1443 description: 'Image: \2'
1445 # - project: '{project-name}-openstack-update-cloud-image'
1447 # predefined-parameters: |
1448 # GERRIT_BRANCH=$GERRIT_BRANCH
1449 # GERRIT_PROJECT=$GERRIT_PROJECT
1450 # GERRIT_REFSPEC=$GERRIT_REFSPEC
1451 # NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1452 # property-file: variables.jenkins-trigger
1453 # property-file-fail-on-missing: true
1457 - trigger-parameterized-builds:
1458 - project: "{project-name}-openstack-update-cloud-image"
1459 condition: UNSTABLE_OR_BETTER
1460 predefined-parameters: |
1461 NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1462 property-file: variables.jenkins-trigger
1463 fail-on-missing: true
1466 name: "{project-name}-packer-merge-{platforms}-{templates}"
1467 id: gerrit-packer-merge
1468 <<: *lf_packer_common
1469 # yamllint disable-line rule:key-duplicates
1470 <<: *lf_packer_merge
1472 ######################
1473 # Default parameters #
1474 ######################
1476 git-url: "$GIT_URL/$GERRIT_PROJECT"
1478 gerrit_merge_triggers:
1479 - change-merged-event
1480 - comment-added-contains-event:
1481 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1483 #####################
1484 # Job Configuration #
1485 #####################
1488 - lf-infra-gerrit-scm:
1489 git-url: "{git-url}"
1490 refspec: "$GERRIT_REFSPEC"
1491 branch: "$GERRIT_BRANCH"
1492 submodule-recursive: "{submodule-recursive}"
1493 submodule-timeout: "{submodule-timeout}"
1494 submodule-disable: "{submodule-disable}"
1495 choosing-strategy: default
1496 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1499 - timed: "{obj:cron}"
1501 server-name: "{gerrit-server-name}"
1502 trigger-on: "{obj:gerrit_merge_triggers}"
1504 - project-compare-type: ANT
1505 project-pattern: "{project}"
1507 - branch-compare-type: ANT
1508 branch-pattern: "**/{branch}"
1510 - compare-type: REG_EXP
1511 pattern: 'packer\/provision\/.*\.sh'
1512 - compare-type: REG_EXP
1513 pattern: 'packer\/provision\/.*\.bat'
1514 - compare-type: REG_EXP
1515 pattern: 'packer\/provision\/.*\.ps1'
1516 - compare-type: REG_EXP
1517 pattern: 'packer\/provision\/{templates}\.yaml'
1518 - compare-type: REG_EXP
1519 pattern: 'packer\/provision\/local-{templates}\.yaml'
1520 - compare-type: REG_EXP
1521 pattern: 'packer\/templates\/{templates}\.json'
1522 - compare-type: REG_EXP
1523 pattern: 'packer\/vars\/{platforms}\.json'
1526 name: "{project-name}-packer-merge-{platforms}-{templates}"
1527 id: github-packer-merge
1528 <<: *lf_packer_common
1529 # yamllint disable-line rule:key-duplicates
1530 <<: *lf_packer_merge
1532 #####################
1533 # Job Configuration #
1534 #####################
1537 - lf-infra-properties:
1538 project: "{project}"
1539 build-days-to-keep: 7
1541 url: "{github-url}/{github-org}/{project}"
1544 - lf-infra-github-scm:
1545 url: "{git-clone-url}{github-org}/{project}"
1547 +refs/heads/*:refs/remotes/origin/*
1548 +refs/pull/*:refs/remotes/origin/pr/*
1549 branch: "$GERRIT_REFSPEC"
1550 submodule-recursive: "{submodule-recursive}"
1551 submodule-timeout: "{submodule-timeout}"
1552 submodule-disable: "{submodule-disable}"
1553 choosing-strategy: default
1554 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1557 - timed: "{obj:cron}"
1562 - github-pull-request:
1563 trigger-phrase: "^remerge$"
1564 only-trigger-phrase: true
1565 status-context: "Packer {platforms}-{templates} Merge"
1570 white-list: "{obj:github_pr_whitelist}"
1571 admin-list: "{obj:github_pr_admin_list}"
1572 # included-regions MUST match Gerrit Trigger file-paths
1574 - 'packer\/provision\/.*\.sh'
1575 - 'packer\/provision\/.*\.bat'
1576 - 'packer\/provision\/.*\.ps1'
1577 - 'packer\/provision\/{templates}\.yaml'
1578 - 'packer\/provision\/local-{templates}\.yaml'
1579 - 'packer\/templates\/{templates}\.json'
1580 - 'packer\/vars\/{platforms}\.json'
1581 white-list-target-branches:
1588 - lf_packer_verify: &lf_packer_verify
1589 name: lf-packer-verify
1591 ######################
1592 # Default parameters #
1593 ######################
1597 openstack-cloud: vex
1599 gerrit_verify_triggers:
1600 - patchset-created-event:
1601 exclude-drafts: true
1602 exclude-trivial-rebase: false
1603 exclude-no-code-change: false
1604 - draft-published-event
1605 - comment-added-contains-event:
1606 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1608 gerrit_trigger_file_paths:
1609 - compare-type: REG_EXP
1610 pattern: 'packer\/.*'
1612 # github_included_regions MUST match gerrit_trigger_file_paths
1613 github_included_regions:
1616 #####################
1617 # Job Configuration #
1618 #####################
1623 - lf-infra-packer-validate:
1624 openstack: "{openstack}"
1625 openstack-cloud: "{openstack-cloud}"
1626 packer-cloud-settings: "{packer-cloud-settings}"
1627 packer-version: "{packer-version}"
1630 name: "{project-name}-packer-verify"
1631 id: gerrit-packer-verify
1632 <<: *lf_packer_common
1633 # yamllint disable-line rule:key-duplicates
1634 <<: *lf_packer_verify
1636 ######################
1637 # Default parameters #
1638 ######################
1640 git-url: "$GIT_URL/$GERRIT_PROJECT"
1642 #####################
1643 # Job Configuration #
1644 #####################
1647 - lf-infra-gerrit-scm:
1648 git-url: "{git-url}"
1649 refspec: "$GERRIT_REFSPEC"
1650 branch: "$GERRIT_BRANCH"
1651 submodule-recursive: "{submodule-recursive}"
1652 submodule-timeout: "{submodule-timeout}"
1653 submodule-disable: "{submodule-disable}"
1654 choosing-strategy: gerrit
1655 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1659 server-name: "{gerrit-server-name}"
1660 trigger-on: "{obj:gerrit_verify_triggers}"
1662 - project-compare-type: ANT
1663 project-pattern: "{project}"
1665 - branch-compare-type: ANT
1666 branch-pattern: "**/{branch}"
1667 file-paths: "{obj:gerrit_trigger_file_paths}"
1670 name: "{project-name}-packer-verify"
1671 id: github-packer-verify
1672 <<: *lf_packer_common
1673 # yamllint disable-line rule:key-duplicates
1674 <<: *lf_packer_verify
1676 #####################
1677 # Job Configuration #
1678 #####################
1681 - lf-infra-properties:
1682 project: "{project}"
1683 build-days-to-keep: 7
1685 url: "{github-url}/{github-org}/{project}"
1688 - lf-infra-github-scm:
1689 url: "{git-clone-url}{github-org}/{project}"
1690 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1692 submodule-recursive: "{submodule-recursive}"
1693 submodule-timeout: "{submodule-timeout}"
1694 submodule-disable: "{submodule-disable}"
1695 choosing-strategy: default
1696 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1699 - github-pull-request:
1700 trigger-phrase: "^(recheck|reverify)$"
1701 only-trigger-phrase: false
1702 status-context: "Packer Verify"
1705 included-regions: "{obj:github_included_regions}"
1706 white-list-target-branches:
1709 ################################
1710 # Openstack Update Cloud Image #
1711 ################################
1713 - lf_openstack_cron: &lf_openstack_update_cloud_image
1714 name: lf-openstack-update-cloud-image
1716 ######################
1717 # Default parameters #
1718 ######################
1721 build-days-to-keep: 7
1725 git-url: "$GIT_URL/$PROJECT"
1726 github-url: "https://github.com"
1727 new-image-name: "all"
1728 openstack-cloud: vex
1730 submodule-timeout: 10
1731 submodule-disable: false
1732 update-cloud-image: false
1734 #####################
1735 # Job Configuration #
1736 #####################
1738 project-type: freestyle
1739 node: "{build-node}"
1741 disabled: "{disable-job}"
1744 - lf-infra-properties:
1745 build-days-to-keep: "{build-days-to-keep}"
1748 - lf-infra-parameters:
1749 project: "{project}"
1753 name: NEW_IMAGE_NAME
1754 default: "{new-image-name}"
1755 description: "Name of cloud image to update in Jenkins"
1758 - lf-infra-wrappers:
1759 build-timeout: "{build-timeout}"
1760 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1761 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1762 - config-file-provider:
1764 - file-id: clouds-yaml
1765 target: "$HOME/.config/openstack/clouds.yaml"
1767 target: "$HOME/.npmrc"
1769 target: "$HOME/.config/pip/pip.conf"
1772 - lf-infra-pre-build
1774 properties-content: |
1775 OS_CLOUD={openstack-cloud}
1778 echo "Extract the image type for commit message"
1779 # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1780 IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1781 echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1784 properties-file: "image-type.txt"
1785 - lf-infra-update-packer-images
1786 - lf-infra-push-gerrit-patch:
1787 project: "{project}"
1788 gerrit-user: "{gerrit-user}"
1789 gerrit-host: "{gerrit-host}"
1790 gerrit-topic: "{gerrit-topic}"
1791 gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1792 reviewers-email: "{reviewers-email}"
1798 name: "{project-name}-openstack-update-cloud-image"
1799 id: gerrit-openstack-update-cloud-image
1800 <<: *lf_openstack_update_cloud_image
1802 ######################
1803 # Default parameters #
1804 ######################
1806 git-url: "$GIT_URL/$GERRIT_PROJECT"
1808 #####################
1809 # Job Configuration #
1810 #####################
1813 - lf-infra-gerrit-scm:
1814 git-url: "{git-url}"
1815 refspec: "$GERRIT_REFSPEC"
1816 branch: "$GERRIT_BRANCH"
1817 submodule-recursive: false
1818 submodule-timeout: "{submodule-timeout}"
1819 submodule-disable: "{submodule-disable}"
1820 choosing-strategy: gerrit
1821 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1824 - timed: "{obj:cron}"
1830 - lf_puppet_verify: &lf_puppet_verify
1831 name: lf-puppet-verify
1833 ######################
1834 # Default parameters #
1835 ######################
1838 build-days-to-keep: 7
1841 git-url: "$GIT_URL/$GERRIT_PROJECT"
1842 github-url: "https://github.com"
1845 puppet-lint-version: 2.3.6
1847 submodule-recursive: true
1848 submodule-timeout: 10
1849 submodule-disable: false
1851 gerrit_trigger_file_paths:
1852 - compare-type: REG_EXP
1855 # github_included_regions MUST match gerrit_trigger_file_paths
1856 github_included_regions:
1859 #####################
1860 # Job Configuration #
1861 #####################
1863 project-type: freestyle
1864 node: "{build-node}"
1866 disabled: "{disable-job}"
1869 - lf-infra-properties:
1870 build-days-to-keep: "{build-days-to-keep}"
1873 - lf-infra-parameters:
1874 project: "{project}"
1877 - lf-puppet-parameters:
1878 puppet-lint-version: "{puppet-lint-version}"
1881 - lf-infra-wrappers:
1882 build-timeout: "{build-timeout}"
1883 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1886 - shell: !include-raw-escape: ../shell/puppet-lint.sh
1892 name: "{project-name}-puppet-verify"
1893 id: gerrit-puppet-verify
1894 <<: *lf_puppet_verify
1896 ######################
1897 # Default parameters #
1898 ######################
1900 gerrit_verify_triggers:
1901 - patchset-created-event:
1902 exclude-drafts: true
1903 exclude-trivial-rebase: false
1904 exclude-no-code-change: false
1905 - draft-published-event
1906 - comment-added-contains-event:
1907 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1909 #####################
1910 # Job Configuration #
1911 #####################
1914 - lf-infra-gerrit-scm:
1915 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1916 git-url: "{git-url}"
1917 refspec: "$GERRIT_REFSPEC"
1918 branch: "$GERRIT_BRANCH"
1919 submodule-recursive: "{submodule-recursive}"
1920 submodule-timeout: "{submodule-timeout}"
1921 submodule-disable: "{submodule-disable}"
1922 choosing-strategy: gerrit
1926 server-name: "{gerrit-server-name}"
1927 trigger-on: "{obj:gerrit_verify_triggers}"
1929 - project-compare-type: ANT
1930 project-pattern: "{project}"
1932 - branch-compare-type: ANT
1933 branch-pattern: "**/{branch}"
1934 file-paths: "{obj:gerrit_trigger_file_paths}"
1937 name: "{project-name}-puppet-verify"
1938 id: github-puppet-verify
1939 <<: *lf_puppet_verify
1941 #####################
1942 # Job Configuration #
1943 #####################
1946 - lf-infra-properties:
1947 project: "{project}"
1948 build-days-to-keep: 7
1950 url: "{github-url}/{github-org}/{project}"
1953 - lf-infra-github-scm:
1954 url: "{git-clone-url}{github-org}/{project}"
1955 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1957 submodule-recursive: "{submodule-recursive}"
1958 submodule-timeout: "{submodule-timeout}"
1959 submodule-disable: "{submodule-disable}"
1960 choosing-strategy: default
1961 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1964 - github-pull-request:
1965 trigger-phrase: "^(recheck|reverify)$"
1966 only-trigger-phrase: false
1967 status-context: "Puppet Verify"
1970 included-regions: "{obj:github_included_regions}"
1971 white-list-target-branches:
1978 - lf_sonar_common: &lf_sonar_common
1979 name: lf-sonar-common
1981 ######################
1982 # Default parameters #
1983 ######################
1985 archive-artifacts: >
1988 branch: master # Sonar should always be run on master branch
1989 build-days-to-keep: 7
1991 cron: "H H * * *" # run daily
1993 git-url: "$GIT_URL/$PROJECT"
1994 github-url: "https://github.com"
1996 submodule-recursive: true
1997 submodule-timeout: 10
1998 submodule-disable: false
2002 sonar-project-file: "sonar-project.properties"
2003 sonar-properties: ""
2005 sonar-additional-args: ""
2007 gerrit_trigger_file_paths:
2008 - compare-type: REG_EXP
2011 # github_included_regions MUST match gerrit_trigger_file_paths
2012 github_included_regions:
2015 #####################
2016 # Job Configuration #
2017 #####################
2019 project-type: freestyle
2020 node: "{build-node}"
2023 - lf-infra-properties:
2024 build-days-to-keep: "{build-days-to-keep}"
2027 - lf-infra-wrappers:
2028 build-timeout: "{build-timeout}"
2029 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2031 disabled: "{disable-job}"
2034 - lf-infra-parameters:
2035 project: "{project}"
2039 name: ARCHIVE_ARTIFACTS
2040 default: "{archive-artifacts}"
2041 description: Artifacts to archive to the logs server.
2046 - lf_sonar_builders: &lf_sonar_builders
2047 name: lf-sonar-builders
2049 - lf-infra-pre-build
2051 sonar-task: "{sonar-task}"
2052 sonar-project-file: "{sonar-project-file}"
2053 sonar-properties: "{sonar-properties}"
2054 sonar-java-opts: "{sonar-java-opts}"
2055 sonar-additional-args: "{sonar-additional-args}"
2057 - lf_sonar_builders_prescan: &lf_sonar_builders_prescan
2058 name: lf-sonar-builders-prescan
2060 - lf-infra-pre-build
2061 - lf-infra-sonar-with-prescan:
2062 sonar-task: "{sonar-task}"
2063 sonar-project-file: "{sonar-project-file}"
2064 sonar-properties: "{sonar-properties}"
2065 sonar-java-opts: "{sonar-java-opts}"
2066 sonar-additional-args: "{sonar-additional-args}"
2068 - lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script
2069 name: lf-sonar-builders-prescan-script
2071 - lf-infra-pre-build
2072 - shell: "{sonar-prescan-script}"
2074 sonar-task: "{sonar-task}"
2075 sonar-project-file: "{sonar-project-file}"
2076 sonar-properties: "{sonar-properties}"
2077 sonar-java-opts: "{sonar-java-opts}"
2078 sonar-additional-args: "{sonar-additional-args}"
2080 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2081 name: lf-sonar-gerrit-common
2082 gerrit_sonar_triggers:
2083 - comment-added-contains-event:
2084 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2087 - lf-infra-gerrit-scm:
2088 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2089 git-url: "{git-url}"
2090 refspec: $GERRIT_REFSPEC
2091 branch: $GERRIT_BRANCH
2092 submodule-recursive: "{submodule-recursive}"
2093 submodule-timeout: "{submodule-timeout}"
2094 submodule-disable: "{submodule-disable}"
2095 choosing-strategy: default
2098 - timed: "{obj:cron}"
2100 server-name: "{gerrit-server-name}"
2101 trigger-on: "{obj:gerrit_sonar_triggers}"
2103 - project-compare-type: "ANT"
2104 project-pattern: "{project}"
2106 - branch-compare-type: "ANT"
2107 branch-pattern: "**/{branch}"
2108 file-paths: "{obj:gerrit_trigger_file_paths}"
2115 - lf_sonar_github_common: &lf_sonar_github_common
2116 name: lf-sonar-github-common
2118 - lf-infra-properties:
2119 build-days-to-keep: "{build-days-to-keep}"
2121 url: "{github-url}/{github-org}/{project}"
2124 - lf-infra-github-scm:
2125 url: "{git-clone-url}{github-org}/{project}"
2126 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2128 submodule-recursive: "{submodule-recursive}"
2129 submodule-timeout: "{submodule-timeout}"
2130 submodule-disable: "{submodule-disable}"
2131 choosing-strategy: default
2132 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2135 - github-pull-request:
2136 trigger-phrase: "^run-sonar$"
2137 only-trigger-phrase: false
2138 status-context: "Python Sonar"
2141 white-list-target-branches:
2143 included-regions: "{obj:github_included_regions}"
2146 name: "{project-name}-sonar"
2148 <<: *lf_sonar_common
2149 # yamllint disable-line rule:key-duplicates
2150 <<: *lf_sonar_builders
2151 # yamllint disable-line rule:key-duplicates
2152 <<: *lf_sonar_gerrit_common
2155 name: "{project-name}-sonar"
2157 <<: *lf_sonar_common
2158 # yamllint disable-line rule:key-duplicates
2159 <<: *lf_sonar_builders
2160 # yamllint disable-line rule:key-duplicates
2161 <<: *lf_sonar_github_common
2164 name: "{project-name}-sonar-prescan"
2165 id: gerrit-sonar-prescan
2166 <<: *lf_sonar_common
2167 # yamllint disable-line rule:key-duplicates
2168 <<: *lf_sonar_builders_prescan
2169 # yamllint disable-line rule:key-duplicates
2170 <<: *lf_sonar_gerrit_common
2173 name: "{project-name}-sonar-prescan"
2174 id: github-sonar-prescan
2175 <<: *lf_sonar_common
2176 # yamllint disable-line rule:key-duplicates
2177 <<: *lf_sonar_builders_prescan
2178 # yamllint disable-line rule:key-duplicates
2179 <<: *lf_sonar_github_common
2182 name: "{project-name}-sonar-prescan-script"
2183 id: gerrit-sonar-prescan-script
2184 <<: *lf_sonar_common
2185 # yamllint disable-line rule:key-duplicates
2186 <<: *lf_sonar_builders_prescan_script
2187 # yamllint disable-line rule:key-duplicates
2188 <<: *lf_sonar_gerrit_common
2191 name: "{project-name}-sonar-prescan-script"
2192 id: github-sonar-prescan-script
2193 <<: *lf_sonar_common
2194 # yamllint disable-line rule:key-duplicates
2195 <<: *lf_sonar_builders_prescan_script
2196 # yamllint disable-line rule:key-duplicates
2197 <<: *lf_sonar_github_common