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-builder: openstack
32 packer-cloud-settings: packer-cloud-env
39 project-type: freestyle
41 disabled: "{disable-job}"
44 - lf-infra-properties:
49 - lf-infra-parameters:
53 - lf-packer-parameters:
54 packer-version: "{packer-version}"
58 build-timeout: "{build-timeout}"
59 jenkins-ssh-credential: "{jenkins-ssh-credential}"
65 name: lf-infra-jjb-parameters
69 default: "{jjb-version}"
70 description: Jenkins Job Builder version to download and install.
73 default: "{jjb-cache}"
74 description: Jenkins Job Builder cache location.
77 name: lf-packer-parameters
81 default: "{packer-version}"
82 description: Packer version to download and install.
85 name: lf-puppet-parameters
88 name: PUPPET_LINT_VERSION
89 default: "{puppet-lint-version}"
90 description: Puppet-lint version to download and install.
92 - lf_jjb_common: &lf_jjb_common
95 ######################
96 # Default parameters #
97 ######################
102 github-url: "https://github.com"
103 jjb-cache: "$HOME/.cache/jenkins_jobs"
106 submodule-recursive: true
107 submodule-timeout: 10
108 submodule-disable: false
109 throttle_categories: []
110 throttle-enabled: false
111 throttle-max-per-node: 1
112 throttle-max-total: 0
113 throttle-option: "project"
115 gerrit_trigger_file_paths:
116 - compare-type: REG_EXP
118 - compare-type: REG_EXP
119 pattern: "global-jjb"
120 - compare-type: REG_EXP
123 # github_included_regions MUST match gerrit_trigger_file_paths
124 github_included_regions:
129 #####################
130 # Job Configuration #
131 #####################
133 project-type: freestyle
135 disabled: "{disable-job}"
138 - lf-infra-properties:
140 build-days-to-keep: 7
142 categories: "{obj:throttle_categories}"
143 enabled: "{throttle-enabled}"
144 max-per-node: "{throttle-max-per-node}"
145 max-total: "{throttle-max-total}"
146 option: "{throttle-option}"
149 - lf-infra-parameters:
153 - lf-infra-jjb-parameters:
154 jjb-cache: "{jjb-cache}"
155 jjb-version: "{jjb-version}"
159 build-timeout: "{build-timeout}"
160 jenkins-ssh-credential: "{jenkins-ssh-credential}"
165 ######################
166 # Gerrit Branch Lock #
167 ######################
170 name: "{project-name}-gerrit-branch-lock"
171 id: gerrit-branch-lock
173 ######################
174 # Default parameters #
175 ######################
179 git-url: "$GIT_URL/$GERRIT_PROJECT"
180 submodule-timeout: 10
181 submodule-disable: true
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:
214 branch: "$GERRIT_BRANCH"
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: "**"
229 - branch-compare-type: ANT
230 branch-pattern: "**/{branch}"
231 comment-text-parameter-mode: PLAIN
234 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
239 ##########################################
240 # Jenkins Configuration Management Merge #
241 ##########################################
244 name: lf-jenkins-cfg-clouds
248 properties-content: "jenkins_silos={jenkins-silos}"
249 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
250 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
253 name: lf-jenkins-cfg-global-vars
257 properties-content: "jenkins_silos={jenkins-silos}"
258 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
259 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
261 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
262 name: lf-jenkins-cfg-merge
264 ######################
265 # Default parameters #
266 ######################
271 git-url: "$GIT_URL/$GERRIT_PROJECT"
272 github-url: "https://github.com"
273 jenkins-silos: production sandbox
274 submodule-timeout: 10
275 submodule-disable: false
277 gerrit_merge_triggers:
278 - change-merged-event
279 - comment-added-contains-event:
280 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
282 gerrit_trigger_file_paths:
283 - compare-type: REG_EXP
284 pattern: 'jenkins-config\/.*'
286 # github_included_regions MUST match gerrit_trigger_file_paths
287 github_included_regions:
288 - 'jenkins-config\/.*'
290 #####################
291 # Job Configuration #
292 #####################
294 project-type: freestyle
297 disabled: "{disable-job}"
300 - lf-infra-properties:
302 build-days-to-keep: 1
305 - lf-infra-parameters:
313 jenkins-ssh-credential: "{jenkins-ssh-credential}"
317 - lf-jenkins-cfg-global-vars:
318 jenkins-silos: "{jenkins-silos}"
319 - lf-jenkins-cfg-clouds:
320 jenkins-silos: "{jenkins-silos}"
326 name: "{project-name}-jenkins-cfg-merge"
327 id: gerrit-jenkins-cfg-merge
328 <<: *lf_jenkins_cfg_merge
331 - lf-infra-gerrit-scm:
333 refspec: "refs/heads/{branch}"
335 submodule-recursive: true
336 submodule-timeout: "{submodule-timeout}"
337 submodule-disable: "{submodule-disable}"
338 choosing-strategy: default
339 jenkins-ssh-credential: "{jenkins-ssh-credential}"
342 - timed: "{obj:cron}"
344 server-name: "{gerrit-server-name}"
345 trigger-on: "{obj:gerrit_merge_triggers}"
347 - project-compare-type: ANT
348 project-pattern: "{project}"
350 - branch-compare-type: ANT
351 branch-pattern: "**/{branch}"
352 file-paths: "{obj:gerrit_trigger_file_paths}"
355 name: "{project-name}-jenkins-cfg-merge"
356 id: github-jenkins-cfg-merge
357 <<: *lf_jenkins_cfg_merge
360 - lf-infra-properties:
362 build-days-to-keep: 1
364 url: "{github-url}/{github-org}/{project}"
367 - lf-infra-github-scm:
368 url: "{git-clone-url}{github-org}/{project}"
370 branch: "refs/heads/{branch}"
371 submodule-recursive: true
372 submodule-timeout: "{submodule-timeout}"
373 submodule-disable: "{submodule-disable}"
374 choosing-strategy: default
375 jenkins-ssh-credential: "{jenkins-ssh-credential}"
378 - timed: "{obj:cron}"
382 - github-pull-request:
383 trigger-phrase: "^remerge$"
384 only-trigger-phrase: true
385 status-context: "Jenkins CFG Merge"
390 white-list: "{obj:github_pr_whitelist}"
391 admin-list: "{obj:github_pr_admin_list}"
392 included-regions: "{obj:github_included_regions}"
393 white-list-target-branches:
396 ###########################################
397 # Jenkins Configuration Management Verify #
398 ###########################################
400 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
401 name: lf-jenkins-cfg-verify
403 ######################
404 # Default parameters #
405 ######################
408 build-days-to-keep: 7
410 git-url: "$GIT_URL/$GERRIT_PROJECT"
411 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"
469 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
475 name: "{project-name}-jenkins-cfg-verify"
476 id: gerrit-jenkins-cfg-verify
477 <<: *lf_jenkins_cfg_verify
480 - lf-infra-gerrit-scm:
482 refspec: "$GERRIT_REFSPEC"
483 branch: "$GERRIT_BRANCH"
484 submodule-recursive: true
485 submodule-timeout: "{submodule-timeout}"
486 submodule-disable: "{submodule-disable}"
487 choosing-strategy: gerrit
488 jenkins-ssh-credential: "{jenkins-ssh-credential}"
492 server-name: "{gerrit-server-name}"
493 trigger-on: "{obj:gerrit_verify_triggers}"
495 - project-compare-type: ANT
496 project-pattern: "{project}"
498 - branch-compare-type: ANT
499 branch-pattern: "**/{branch}"
500 file-paths: "{obj:gerrit_trigger_file_paths}"
503 name: "{project-name}-jenkins-cfg-verify"
504 id: github-jenkins-cfg-verify
505 <<: *lf_jenkins_cfg_verify
509 url: "{github-url}/{github-org}/{project}"
512 - lf-infra-github-scm:
513 url: "{git-clone-url}{github-org}/{project}"
514 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
516 submodule-recursive: true
517 submodule-timeout: "{submodule-timeout}"
518 submodule-disable: "{submodule-disable}"
519 choosing-strategy: default
520 jenkins-ssh-credential: "{jenkins-ssh-credential}"
523 - github-pull-request:
524 trigger-phrase: "^(recheck|reverify)$"
525 only-trigger-phrase: false
526 status-context: "Jenkins CFG Verify"
529 included-regions: "{obj:github_included_regions}"
530 white-list-target-branches:
533 ###########################
534 # JENKINS SANDBOX CLEANUP #
535 ###########################
537 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
538 name: lf-jenkins-sandbox-cleanup
540 ######################
541 # Default parameters #
542 ######################
545 # Run every Saturday at 08:00 UTC
549 #####################
550 # Job Configuration #
551 #####################
553 project-type: freestyle
556 disabled: "{disable-job}"
559 - lf-infra-jjb-parameters:
560 jjb-cache: "{jjb-cache}"
561 jjb-version: "{jjb-version}"
564 - timed: "{obj:cron}"
568 - shell: !include-raw-escape:
569 - ../shell/jenkins-sandbox-cleanup.sh
572 name: "{project-name}-jenkins-sandbox-cleanup"
573 id: gerrit-jenkins-sandbox-cleanup
575 # yamllint disable-line rule:key-duplicates
576 <<: *lf_jenkins_sandbox_cleanup
579 name: "{project-name}-jenkins-sandbox-cleanup"
580 id: github-jenkins-sandbox-cleanup
582 # yamllint disable-line rule:key-duplicates
583 <<: *lf_jenkins_sandbox_cleanup
589 - lf_jjb_deploy_job: &lf_jjb_deploy_job
590 name: lf-jjb-deploy-job
592 ######################
593 # Default parameters #
594 ######################
598 # jjb-deploy should always clone $PROJECT regardless of what
599 # $GERRIT_PROJECT triggered the job.
600 git-url: "$GIT_URL/$PROJECT"
601 github-url: "https://github.com"
603 submodule-timeout: 10
604 submodule-disable: false
605 gerrit_jjb_deploy_job_triggers:
606 - comment-added-contains-event:
607 comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
609 #####################
610 # Job Configuration #
611 #####################
613 project-type: freestyle
616 disabled: "{disable-job}"
619 - lf-infra-properties:
621 build-days-to-keep: 1
624 - lf-infra-parameters:
628 - lf-infra-jjb-parameters:
629 jjb-cache: "{jjb-cache}"
630 jjb-version: "{jjb-version}"
635 jenkins-ssh-credential: "{jenkins-ssh-credential}"
639 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
645 name: "{project-name}-jjb-deploy-job"
646 id: gerrit-jjb-deploy-job
648 # yamllint disable-line rule:key-duplicates
649 <<: *lf_jjb_deploy_job
652 - lf-infra-gerrit-scm:
654 refspec: "refs/heads/{branch}"
656 submodule-recursive: true
657 submodule-timeout: "{submodule-timeout}"
658 submodule-disable: "{submodule-disable}"
659 choosing-strategy: default
660 jenkins-ssh-credential: "{jenkins-ssh-credential}"
664 server-name: "{gerrit-server-name}"
665 trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
667 - project-compare-type: ANT
668 project-pattern: "**"
670 - branch-compare-type: ANT
677 comment-text-parameter-mode: PLAIN
680 name: "{project-name}-jjb-deploy-job"
681 id: github-jjb-deploy-job
683 # yamllint disable-line rule:key-duplicates
684 <<: *lf_jjb_deploy_job
687 - lf-infra-properties:
689 build-days-to-keep: 1
691 url: "{github-url}/{github-org}/{project}"
694 - lf-infra-github-scm:
695 url: "{git-clone-url}{github-org}/{project}"
696 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
698 submodule-recursive: true
699 submodule-timeout: "{submodule-timeout}"
700 submodule-disable: "{submodule-disable}"
701 choosing-strategy: default
702 jenkins-ssh-credential: "{jenkins-ssh-credential}"
705 - github-pull-request:
706 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
707 only-trigger-phrase: true
708 status-context: "JJB Deploy Job"
711 white-list-target-branches:
718 - lf_jjb_merge: &lf_jjb_merge
721 ######################
722 # Default parameters #
723 ######################
727 gerrit_merge_triggers:
728 - change-merged-event
729 - comment-added-contains-event:
730 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
732 #####################
733 # Job Configuration #
734 #####################
740 properties-content: JJB_WORKERS={jjb-workers}
741 - shell: !include-raw-escape:
742 - ../shell/jjb-merge-job.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
835 build-node-label-check: false
836 build-node-label-list: ""
838 gerrit_verify_triggers:
839 - patchset-created-event:
841 exclude-trivial-rebase: false
842 exclude-no-code-change: false
843 - draft-published-event
844 - comment-added-contains-event:
845 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
847 #####################
848 # Job Configuration #
849 #####################
851 concurrent: "{build-concurrent}"
856 - shell: !include-raw-escape:
857 - ../shell/jjb-verify-job.sh
859 condition-kind: boolean-expression
860 condition-expression: "{build-node-label-check}"
861 on-evaluation-failure: dont-run
864 properties-content: EXTERNAL_LABELS="{build-node-label-list}"
865 - shell: !include-raw-escape:
866 - ../shell/jjb-verify-build-nodes.sh
867 - lf-infra-gpg-verify-git-signature
870 name: "{project-name}-jjb-verify"
871 id: gerrit-jjb-verify
873 # yamllint disable-line rule:key-duplicates
876 ######################
877 # Default parameters #
878 ######################
880 git-url: "$GIT_URL/$GERRIT_PROJECT"
882 #####################
883 # Job Configuration #
884 #####################
887 - lf-infra-gerrit-scm:
889 refspec: "$GERRIT_REFSPEC"
890 branch: "$GERRIT_BRANCH"
891 submodule-recursive: "{submodule-recursive}"
892 submodule-timeout: "{submodule-timeout}"
893 submodule-disable: "{submodule-disable}"
894 choosing-strategy: gerrit
895 jenkins-ssh-credential: "{jenkins-ssh-credential}"
899 server-name: "{gerrit-server-name}"
900 trigger-on: "{obj:gerrit_verify_triggers}"
902 - project-compare-type: ANT
903 project-pattern: "{project}"
905 - branch-compare-type: ANT
906 branch-pattern: "**/{branch}"
907 file-paths: "{obj:gerrit_trigger_file_paths}"
910 name: "{project-name}-jjb-verify"
911 id: github-jjb-verify
913 # yamllint disable-line rule:key-duplicates
916 #####################
917 # Job Configuration #
918 #####################
921 - lf-infra-properties:
923 build-days-to-keep: 7
925 url: "{github-url}/{github-org}/{project}"
928 - lf-infra-github-scm:
929 url: "{git-clone-url}{github-org}/{project}"
930 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
932 submodule-recursive: "{submodule-recursive}"
933 submodule-timeout: "{submodule-timeout}"
934 submodule-disable: "{submodule-disable}"
935 choosing-strategy: default
936 jenkins-ssh-credential: "{jenkins-ssh-credential}"
939 - github-pull-request:
940 trigger-phrase: "^(recheck|reverify)$"
941 only-trigger-phrase: false
942 status-context: "JJB Verify"
945 included-regions: "{obj:github_included_regions}"
946 white-list-target-branches:
949 ############################
950 # JJB Verify Upstream GJJB #
951 ############################
953 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
954 name: lf-jjb-verify-upstream-gjjb
956 #####################
957 # Job Configuration #
958 #####################
965 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
966 git cherry-pick FETCH_HEAD
968 - shell: !include-raw-escape:
969 - ../shell/jjb-verify-job.sh
971 # All jobs are triggering from the same source
974 server-name: "lf-releng"
976 - patchset-created-event:
978 exclude-trivial-rebase: false
979 exclude-no-code-change: false
980 - draft-published-event
981 - comment-added-contains-event:
982 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
984 - project-compare-type: ANT
985 project-pattern: "releng/global-jjb"
987 - branch-compare-type: ANT
988 branch-pattern: "**/master"
990 gerrit-build-failed-codereview-value: -1
991 gerrit-build-failed-verified-value: 0
992 gerrit-build-successful-codereview-value: 1
993 gerrit-build-successful-verified-value: 0
996 name: "{project-name}-jjb-verify-upstream-gjjb"
997 id: gerrit-jjb-verify-upstream-gjjb
999 # yamllint disable-line rule:key-duplicates
1000 <<: *lf_jjb_verify_upstream_gjjb
1002 ######################
1003 # Default parameters #
1004 ######################
1006 git-url: "$GIT_URL/$PROJECT"
1007 submodule-timeout: 10
1008 submodule-disable: false
1010 #####################
1011 # Job Configuration #
1012 #####################
1015 - lf-infra-gerrit-scm:
1016 git-url: "{git-url}"
1019 submodule-recursive: true
1020 submodule-timeout: "{submodule-timeout}"
1021 submodule-disable: "{submodule-disable}"
1022 choosing-strategy: default
1023 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1026 name: "{project-name}-jjb-verify-upstream-gjjb"
1027 id: github-jjb-verify-upstream-gjjb
1029 # yamllint disable-line rule:key-duplicates
1030 <<: *lf_jjb_verify_upstream_gjjb
1032 ######################
1033 # Default parameters #
1034 ######################
1036 git-url: "$GIT_URL/$PROJECT"
1037 submodule-timeout: 10
1038 submodule-disable: false
1040 #####################
1041 # Job Configuration #
1042 #####################
1045 - lf-infra-properties:
1046 project: "{project}"
1047 build-days-to-keep: 7
1049 url: "{github-url}/{github-org}/{project}"
1052 - lf-infra-github-scm:
1053 url: "{git-clone-url}{github-org}/{project}"
1054 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1056 submodule-recursive: "{submodule-recursive}"
1057 submodule-timeout: "{submodule-timeout}"
1058 submodule-disable: "{submodule-disable}"
1059 choosing-strategy: default
1060 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1066 - lf_license_check: &lf_license_check
1067 name: lf-license-check
1069 ######################
1070 # Default parameters #
1071 ######################
1074 build-days-to-keep: 7
1083 git-url: "$GIT_URL/$PROJECT"
1084 github-url: "https://github.com"
1086 license-exclude-paths: ""
1087 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1088 project-pattern: "**"
1091 submodule-timeout: 10
1092 submodule-disable: false
1094 #####################
1095 # Job Configuration #
1096 #####################
1098 project-type: freestyle
1099 node: "{build-node}"
1101 disabled: "{disable-job}"
1104 - lf-infra-properties:
1105 build-days-to-keep: "{build-days-to-keep}"
1108 - lf-infra-parameters:
1109 project: "{project}"
1114 - lf-infra-wrappers:
1115 build-timeout: "{build-timeout}"
1116 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1120 file-patterns: "{file-patterns}"
1121 spdx-disable: "{spdx-disable}"
1122 lhc-version: "{lhc-version}"
1123 license-exclude-paths: "{license-exclude-paths}"
1124 licenses-allowed: "{licenses-allowed}"
1130 name: "{project-name}-license-check"
1131 id: gerrit-license-check
1132 <<: *lf_license_check
1134 git-url: "$GIT_URL/$GERRIT_PROJECT"
1137 - lf-infra-gerrit-scm:
1138 git-url: "{git-url}"
1139 refspec: "$GERRIT_REFSPEC"
1140 branch: "$GERRIT_BRANCH"
1141 # Submodules are out of the project's control
1142 submodule-recursive: false
1143 submodule-timeout: "{submodule-timeout}"
1144 submodule-disable: "{submodule-disable}"
1145 choosing-strategy: gerrit
1146 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1150 server-name: "{gerrit-server-name}"
1151 # Trigger should not be overridable as we want to always run
1153 - patchset-created-event:
1154 exclude-drafts: false
1155 exclude-trivial-rebase: false
1156 exclude-no-code-change: false
1157 - draft-published-event
1158 - comment-added-contains-event:
1159 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1161 - project-compare-type: ANT
1162 project-pattern: "{project-pattern}"
1164 - branch-compare-type: ANT
1165 branch-pattern: "**"
1168 name: "{project-name}-license-check"
1169 id: github-license-check
1170 <<: *lf_license_check
1173 - lf-infra-properties:
1174 build-days-to-keep: "{build-days-to-keep}"
1176 url: "{github-url}/{github-org}/{project}"
1179 - lf-infra-github-scm:
1180 url: "{git-clone-url}{github-org}/{project}"
1181 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1183 # Submodules are out of the project's control
1184 submodule-recursive: false
1185 submodule-timeout: "{submodule-timeout}"
1186 submodule-disable: "{submodule-disable}"
1187 choosing-strategy: default
1188 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1191 - github-pull-request:
1192 trigger-phrase: "^recheck$"
1193 only-trigger-phrase: false
1194 status-context: "License Check"
1197 white-list-target-branches:
1200 ####################
1201 # Info YAML Verify #
1202 ####################
1204 - lf_info_yaml_verify: &lf_info_yaml_verify
1205 name: lf-info-yaml-verify
1207 ######################
1208 # Default parameters #
1209 ######################
1211 gerrit_verify_triggers:
1212 - patchset-created-event:
1213 exclude-drafts: true
1214 exclude-trivial-rebase: false
1215 exclude-no-code-change: false
1216 - draft-published-event
1217 - comment-added-contains-event:
1218 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1220 #####################
1221 # Job Configuration #
1222 #####################
1227 - shell: !include-raw-escape:
1228 - ../shell/git-validate-info-yaml.sh
1229 - ../shell/info-file-validate.sh
1232 name: "{project-name}-info-yaml-verify"
1233 id: gerrit-info-yaml-verify
1235 # yamllint disable-line rule:key-duplicates
1236 <<: *lf_info_yaml_verify
1238 git-url: "$GIT_URL/$GERRIT_PROJECT"
1241 - lf-infra-gerrit-scm:
1242 git-url: "{git-url}"
1243 refspec: "$GERRIT_REFSPEC"
1244 branch: "$GERRIT_BRANCH"
1245 submodule-recursive: "{submodule-recursive}"
1246 submodule-timeout: "{submodule-timeout}"
1247 submodule-disable: "{submodule-disable}"
1248 choosing-strategy: gerrit
1249 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1253 server-name: "{gerrit-server-name}"
1254 trigger-on: "{obj:gerrit_verify_triggers}"
1256 - project-compare-type: ANT
1257 project-pattern: "{project}"
1259 - branch-compare-type: ANT
1260 branch-pattern: "**/{branch}"
1262 - compare-type: REG_EXP
1263 pattern: "INFO.yaml"
1266 name: "{project-name}-info-yaml-verify"
1267 id: github-info-yaml-verify
1269 # yamllint disable-line rule:key-duplicates
1270 <<: *lf_info_yaml_verify
1272 github-url: "https://github.com"
1275 url: "{github-url}/{github-org}/{project}"
1278 - lf-infra-github-scm:
1279 url: "{git-clone-url}{github-org}/{project}"
1280 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1282 submodule-recursive: "{submodule-recursive}"
1283 submodule-timeout: "{submodule-timeout}"
1284 submodule-disable: "{submodule-disable}"
1285 choosing-strategy: default
1286 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1289 - github-pull-request:
1290 trigger-phrase: "^(recheck|reverify)$"
1291 only-trigger-phrase: false
1292 status-context: "INFO File Verify"
1295 # included-regions MUST match gerrit file-paths
1296 included-regions: "INFO.yaml"
1297 white-list-target-branches:
1304 - lf_openstack_cron: &lf_openstack_cron
1305 name: lf-openstack-cron
1307 ######################
1308 # Default parameters #
1309 ######################
1312 build-days-to-keep: 7
1316 git-url: "$GIT_URL/$PROJECT"
1317 github-url: "https://github.com"
1318 openstack-cloud: vex
1319 openstack-image-cleanup: true
1320 openstack-image-cleanup-age: 30
1321 openstack-image-protect: true
1322 openstack-port-cleanup: true
1323 openstack-server-cleanup: true
1324 openstack-stack-cleanup: true
1325 openstack-volume-cleanup: true
1327 submodule-timeout: 10
1328 submodule-disable: false
1330 #####################
1331 # Job Configuration #
1332 #####################
1334 project-type: freestyle
1335 node: "{build-node}"
1337 disabled: "{disable-job}"
1340 - lf-infra-properties:
1341 build-days-to-keep: "{build-days-to-keep}"
1344 - lf-infra-parameters:
1345 project: "{project}"
1350 default: "{jenkins-urls}"
1352 Space separated list of Jenkins URLs to check for active builds.
1355 - lf-infra-wrappers:
1356 build-timeout: "{build-timeout}"
1357 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1358 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1359 - config-file-provider:
1361 - file-id: clouds-yaml
1362 target: "$HOME/.config/openstack/clouds.yaml"
1364 target: "$HOME/.npmrc"
1366 target: "$HOME/.config/pip/pip.conf"
1369 - timed: "{obj:cron}"
1372 - lf-infra-pre-build
1374 properties-content: OS_CLOUD={openstack-cloud}
1377 condition-kind: boolean-expression
1378 condition-expression: "{openstack-stack-cleanup}"
1380 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1383 condition-kind: boolean-expression
1384 condition-expression: "{openstack-server-cleanup}"
1386 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1389 condition-kind: boolean-expression
1390 condition-expression: "{openstack-port-cleanup}"
1392 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1395 condition-kind: boolean-expression
1396 condition-expression: "{openstack-volume-cleanup}"
1398 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1401 condition-kind: boolean-expression
1402 condition-expression: "{openstack-image-protect}"
1404 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1406 condition-kind: boolean-expression
1407 condition-expression: "{openstack-image-cleanup}"
1410 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1411 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1415 - global-jjb-email-notification:
1416 email-recipients: "{failure-notification}"
1417 email-prefix: "{failure-notification-prefix}"
1420 name: "{project-name}-openstack-cron"
1421 id: gerrit-openstack-cron
1422 <<: *lf_openstack_cron
1425 - lf-infra-gerrit-scm:
1426 git-url: "{git-url}"
1427 refspec: "refs/heads/{branch}"
1429 submodule-recursive: true
1430 submodule-timeout: "{submodule-timeout}"
1431 submodule-disable: "{submodule-disable}"
1432 choosing-strategy: default
1433 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1436 name: "{project-name}-openstack-cron"
1437 id: github-openstack-cron
1438 <<: *lf_openstack_cron
1441 - lf-infra-github-scm:
1442 url: "{git-clone-url}{github-org}/{project}"
1444 branch: "refs/heads/{branch}"
1445 submodule-recursive: true
1446 submodule-timeout: "{submodule-timeout}"
1447 submodule-disable: "{submodule-disable}"
1448 choosing-strategy: default
1449 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1455 - lf_packer_merge: &lf_packer_merge
1456 name: lf-packer-merge
1458 ######################
1459 # Default parameters #
1460 ######################
1463 openstack-cloud: vex
1464 update-cloud-image: false
1466 #####################
1467 # Job Configuration #
1468 #####################
1471 - lf-infra-parameters:
1472 project: "{project}"
1475 - lf-packer-parameters:
1476 packer-version: "{packer-version}"
1478 name: UPDATE_CLOUD_IMAGE
1479 default: "{update-cloud-image}"
1480 description: "Update new built image on the cloud."
1483 - lf-infra-packer-build:
1484 openstack: "{openstack}"
1485 openstack-cloud: "{openstack-cloud}"
1486 packer-builder: "{packer-builder}"
1487 packer-cloud-settings: "{packer-cloud-settings}"
1488 packer-version: "{packer-version}"
1489 platform: "{platforms}"
1490 template: "{templates}"
1491 update-cloud-image: "{update-cloud-image}"
1492 - description-setter:
1493 regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1494 description: 'Image: \2'
1496 # - project: '{project-name}-openstack-update-cloud-image'
1498 # predefined-parameters: |
1499 # GERRIT_BRANCH=$GERRIT_BRANCH
1500 # GERRIT_PROJECT=$GERRIT_PROJECT
1501 # GERRIT_REFSPEC=$GERRIT_REFSPEC
1502 # NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1503 # property-file: variables.jenkins-trigger
1504 # property-file-fail-on-missing: true
1508 - trigger-parameterized-builds:
1509 - project: "{project-name}-openstack-update-cloud-image"
1510 condition: UNSTABLE_OR_BETTER
1511 predefined-parameters: |
1512 NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1513 property-file: variables.jenkins-trigger
1514 fail-on-missing: true
1517 name: "{project-name}-packer-merge-{platforms}-{templates}"
1518 id: gerrit-packer-merge
1519 <<: *lf_packer_common
1520 # yamllint disable-line rule:key-duplicates
1521 <<: *lf_packer_merge
1523 ######################
1524 # Default parameters #
1525 ######################
1527 git-url: "$GIT_URL/$GERRIT_PROJECT"
1529 gerrit_merge_triggers:
1530 - change-merged-event
1531 - comment-added-contains-event:
1532 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1534 #####################
1535 # Job Configuration #
1536 #####################
1539 - lf-infra-gerrit-scm:
1540 git-url: "{git-url}"
1541 refspec: "$GERRIT_REFSPEC"
1542 branch: "$GERRIT_BRANCH"
1543 submodule-recursive: "{submodule-recursive}"
1544 submodule-timeout: "{submodule-timeout}"
1545 submodule-disable: "{submodule-disable}"
1546 choosing-strategy: default
1547 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1550 - timed: "{obj:cron}"
1552 server-name: "{gerrit-server-name}"
1553 trigger-on: "{obj:gerrit_merge_triggers}"
1555 - project-compare-type: ANT
1556 project-pattern: "{project}"
1558 - branch-compare-type: ANT
1559 branch-pattern: "**/{branch}"
1561 - compare-type: REG_EXP
1562 pattern: 'packer\/provision\/.*\.sh'
1563 - compare-type: REG_EXP
1564 pattern: 'packer\/provision\/.*\.bat'
1565 - compare-type: REG_EXP
1566 pattern: 'packer\/provision\/.*\.ps1'
1567 - compare-type: REG_EXP
1568 pattern: 'packer\/provision\/{templates}\.yaml'
1569 - compare-type: REG_EXP
1570 pattern: 'packer\/provision\/local-{templates}\.yaml'
1571 - compare-type: REG_EXP
1572 pattern: 'packer\/templates\/{templates}\.json'
1573 - compare-type: REG_EXP
1574 pattern: 'packer\/vars\/{platforms}\.json'
1575 - compare-type: REG_EXP
1576 pattern: 'packer\/common-packer\/provision\/{templates}\.yaml'
1577 - compare-type: REG_EXP
1578 pattern: 'packer\/common-packer\/provision\/local-{templates}\.yaml'
1579 - compare-type: REG_EXP
1580 pattern: 'packer\/common-packer\/templates\/{templates}\.json'
1581 - compare-type: REG_EXP
1582 pattern: 'packer\/common-packer\/vars\/{platforms}\.json'
1585 name: "{project-name}-packer-merge-{platforms}-{templates}"
1586 id: github-packer-merge
1587 <<: *lf_packer_common
1588 # yamllint disable-line rule:key-duplicates
1589 <<: *lf_packer_merge
1591 #####################
1592 # Job Configuration #
1593 #####################
1596 - lf-infra-properties:
1597 project: "{project}"
1598 build-days-to-keep: 7
1600 url: "{github-url}/{github-org}/{project}"
1603 - lf-infra-github-scm:
1604 url: "{git-clone-url}{github-org}/{project}"
1606 +refs/heads/*:refs/remotes/origin/*
1607 +refs/pull/*:refs/remotes/origin/pr/*
1608 branch: "$GERRIT_REFSPEC"
1609 submodule-recursive: "{submodule-recursive}"
1610 submodule-timeout: "{submodule-timeout}"
1611 submodule-disable: "{submodule-disable}"
1612 choosing-strategy: default
1613 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1616 - timed: "{obj:cron}"
1621 - github-pull-request:
1622 trigger-phrase: "^remerge$"
1623 only-trigger-phrase: true
1624 status-context: "Packer {platforms}-{templates} Merge"
1629 white-list: "{obj:github_pr_whitelist}"
1630 admin-list: "{obj:github_pr_admin_list}"
1631 # included-regions MUST match Gerrit Trigger file-paths
1633 - 'packer\/provision\/.*\.sh'
1634 - 'packer\/provision\/.*\.bat'
1635 - 'packer\/provision\/.*\.ps1'
1636 - 'packer\/provision\/{templates}\.yaml'
1637 - 'packer\/provision\/local-{templates}\.yaml'
1638 - 'packer\/templates\/{templates}\.json'
1639 - 'packer\/vars\/{platforms}\.json'
1640 - 'packer\/common-packer\/provision\/{templates}\.yaml'
1641 - 'packer\/common-packer\/provision\/local-{templates}\.yaml'
1642 - 'packer\/common-packer\/templates\/{templates}\.json'
1643 - 'packer\/common-packer\/vars\/{platforms}\.json'
1645 white-list-target-branches:
1649 name: "{project-name}-packer-verify-build-{platforms}-{templates}"
1650 id: gerrit-packer-verify-build
1651 <<: *lf_packer_common
1652 # yamllint disable-line rule:key-duplicates
1653 <<: *lf_packer_merge
1655 ######################
1656 # Default parameters #
1657 ######################
1659 git-url: "$GIT_URL/$GERRIT_PROJECT"
1661 gerrit_verify_triggers:
1662 - comment-added-contains-event:
1663 comment-contains-value: '^Patch Set\s+\d+:\s+(verify-build|packer-build)\s*$'
1665 #####################
1666 # Job Configuration #
1667 #####################
1670 - lf-infra-gerrit-scm:
1671 git-url: "{git-url}"
1672 refspec: "$GERRIT_REFSPEC"
1673 branch: "$GERRIT_BRANCH"
1674 submodule-recursive: "{submodule-recursive}"
1675 submodule-timeout: "{submodule-timeout}"
1676 submodule-disable: "{submodule-disable}"
1677 choosing-strategy: gerrit
1678 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1682 server-name: "{gerrit-server-name}"
1683 trigger-on: "{obj:gerrit_verify_triggers}"
1685 - project-compare-type: ANT
1686 project-pattern: "{project}"
1688 - branch-compare-type: ANT
1689 branch-pattern: "**/{branch}"
1691 - compare-type: REG_EXP
1692 pattern: 'packer\/provision\/.*\.sh'
1693 - compare-type: REG_EXP
1694 pattern: 'packer\/provision\/.*\.bat'
1695 - compare-type: REG_EXP
1696 pattern: 'packer\/provision\/.*\.ps1'
1697 - compare-type: REG_EXP
1698 pattern: 'packer\/provision\/{templates}\.yaml'
1699 - compare-type: REG_EXP
1700 pattern: 'packer\/provision\/local-{templates}\.yaml'
1701 - compare-type: REG_EXP
1702 pattern: 'packer\/templates\/{templates}\.json'
1703 - compare-type: REG_EXP
1704 pattern: 'packer\/vars\/{platforms}\.json'
1705 - compare-type: REG_EXP
1706 pattern: 'packer\/common-packer\/provision\/{templates}\.yaml'
1707 - compare-type: REG_EXP
1708 pattern: 'packer\/common-packer\/provision\/local-{templates}\.yaml'
1709 - compare-type: REG_EXP
1710 pattern: 'packer\/common-packer\/templates\/{templates}\.json'
1711 - compare-type: REG_EXP
1712 pattern: 'packer\/common-packer\/vars\/{platforms}\.json'
1715 name: "{project-name}-packer-verify-build-{platforms}-{templates}"
1716 id: github-packer-verify-build
1717 <<: *lf_packer_common
1718 # yamllint disable-line rule:key-duplicates
1719 <<: *lf_packer_merge
1721 #####################
1722 # Job Configuration #
1723 #####################
1726 - lf-infra-properties:
1727 project: "{project}"
1728 build-days-to-keep: 7
1730 url: "{github-url}/{github-org}/{project}"
1733 - lf-infra-github-scm:
1734 url: "{git-clone-url}{github-org}/{project}"
1735 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1737 submodule-recursive: "{submodule-recursive}"
1738 submodule-timeout: "{submodule-timeout}"
1739 submodule-disable: "{submodule-disable}"
1740 choosing-strategy: default
1741 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1744 - github-pull-request:
1745 trigger-phrase: "^(verify-build|packer-build)$"
1746 only-trigger-phrase: true
1747 status-context: "Packer {platforms}-{templates} Verify Build"
1750 white-list-target-branches:
1752 # included-regions MUST match Gerrit Trigger file-paths
1754 - 'packer\/provision\/.*\.sh'
1755 - 'packer\/provision\/.*\.bat'
1756 - 'packer\/provision\/.*\.ps1'
1757 - 'packer\/provision\/{templates}\.yaml'
1758 - 'packer\/provision\/local-{templates}\.yaml'
1759 - 'packer\/templates\/{templates}\.json'
1760 - 'packer\/vars\/{platforms}\.json'
1761 - 'packer\/common-packer\/vars\/{platforms}\.json'
1762 - 'packer\/common-packer\/provision\/{templates}\.yaml'
1763 - 'packer\/common-packer\/provision\/local-{templates}\.yaml'
1764 - 'packer\/common-packer\/templates\/{templates}\.json'
1770 - lf_packer_verify: &lf_packer_verify
1771 name: lf-packer-verify
1773 ######################
1774 # Default parameters #
1775 ######################
1779 openstack-cloud: vex
1781 gerrit_verify_triggers:
1782 - patchset-created-event:
1783 exclude-drafts: true
1784 exclude-trivial-rebase: false
1785 exclude-no-code-change: false
1786 - draft-published-event
1787 - comment-added-contains-event:
1788 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1790 gerrit_trigger_file_paths:
1791 - compare-type: REG_EXP
1792 pattern: 'packer\/.*'
1794 # github_included_regions MUST match gerrit_trigger_file_paths
1795 github_included_regions:
1798 #####################
1799 # Job Configuration #
1800 #####################
1805 - lf-infra-packer-validate:
1806 openstack: "{openstack}"
1807 openstack-cloud: "{openstack-cloud}"
1808 packer-cloud-settings: "{packer-cloud-settings}"
1809 packer-version: "{packer-version}"
1812 name: "{project-name}-packer-verify"
1813 id: gerrit-packer-verify
1814 <<: *lf_packer_common
1815 # yamllint disable-line rule:key-duplicates
1816 <<: *lf_packer_verify
1818 ######################
1819 # Default parameters #
1820 ######################
1822 git-url: "$GIT_URL/$GERRIT_PROJECT"
1824 #####################
1825 # Job Configuration #
1826 #####################
1829 - lf-infra-gerrit-scm:
1830 git-url: "{git-url}"
1831 refspec: "$GERRIT_REFSPEC"
1832 branch: "$GERRIT_BRANCH"
1833 submodule-recursive: "{submodule-recursive}"
1834 submodule-timeout: "{submodule-timeout}"
1835 submodule-disable: "{submodule-disable}"
1836 choosing-strategy: gerrit
1837 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1841 server-name: "{gerrit-server-name}"
1842 trigger-on: "{obj:gerrit_verify_triggers}"
1844 - project-compare-type: ANT
1845 project-pattern: "{project}"
1847 - branch-compare-type: ANT
1848 branch-pattern: "**/{branch}"
1849 file-paths: "{obj:gerrit_trigger_file_paths}"
1852 name: "{project-name}-packer-verify"
1853 id: github-packer-verify
1854 <<: *lf_packer_common
1855 # yamllint disable-line rule:key-duplicates
1856 <<: *lf_packer_verify
1858 #####################
1859 # Job Configuration #
1860 #####################
1863 - lf-infra-properties:
1864 project: "{project}"
1865 build-days-to-keep: 7
1867 url: "{github-url}/{github-org}/{project}"
1870 - lf-infra-github-scm:
1871 url: "{git-clone-url}{github-org}/{project}"
1872 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1874 submodule-recursive: "{submodule-recursive}"
1875 submodule-timeout: "{submodule-timeout}"
1876 submodule-disable: "{submodule-disable}"
1877 choosing-strategy: default
1878 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1881 - github-pull-request:
1882 trigger-phrase: "^(recheck|reverify)$"
1883 only-trigger-phrase: false
1884 status-context: "Packer Verify"
1887 included-regions: "{obj:github_included_regions}"
1888 white-list-target-branches:
1891 ################################
1892 # Openstack Update Cloud Image #
1893 ################################
1895 - lf_openstack_cron: &lf_openstack_update_cloud_image
1896 name: lf-openstack-update-cloud-image
1898 ######################
1899 # Default parameters #
1900 ######################
1903 build-days-to-keep: 7
1907 git-url: "$GIT_URL/$PROJECT"
1908 github-url: "https://github.com"
1909 new-image-name: "all"
1910 openstack-cloud: vex
1912 submodule-timeout: 10
1913 submodule-disable: false
1914 update-cloud-image: false
1916 #####################
1917 # Job Configuration #
1918 #####################
1920 project-type: freestyle
1921 node: "{build-node}"
1923 disabled: "{disable-job}"
1926 - lf-infra-properties:
1927 build-days-to-keep: "{build-days-to-keep}"
1930 - lf-infra-parameters:
1931 project: "{project}"
1935 name: NEW_IMAGE_NAME
1936 default: "{new-image-name}"
1937 description: "Name of cloud image to update in Jenkins"
1940 - lf-infra-wrappers:
1941 build-timeout: "{build-timeout}"
1942 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1943 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1944 - config-file-provider:
1946 - file-id: clouds-yaml
1947 target: "$HOME/.config/openstack/clouds.yaml"
1949 target: "$HOME/.npmrc"
1951 target: "$HOME/.config/pip/pip.conf"
1954 - lf-infra-pre-build
1956 properties-content: |
1957 OS_CLOUD={openstack-cloud}
1960 echo "Extract the image type for commit message"
1961 # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1962 IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1963 echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1966 properties-file: "image-type.txt"
1967 - lf-infra-update-packer-images
1968 - lf-infra-push-gerrit-patch:
1969 project: "{project}"
1970 gerrit-user: "{gerrit-user}"
1971 gerrit-host: "{gerrit-host}"
1972 gerrit-topic: "{gerrit-topic}"
1973 gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1974 reviewers-email: "{reviewers-email}"
1980 name: "{project-name}-openstack-update-cloud-image"
1981 id: gerrit-openstack-update-cloud-image
1982 <<: *lf_openstack_update_cloud_image
1984 ######################
1985 # Default parameters #
1986 ######################
1988 git-url: "$GIT_URL/$GERRIT_PROJECT"
1990 #####################
1991 # Job Configuration #
1992 #####################
1995 - lf-infra-gerrit-scm:
1996 git-url: "{git-url}"
1997 refspec: "$GERRIT_REFSPEC"
1998 branch: "$GERRIT_BRANCH"
1999 submodule-recursive: false
2000 submodule-timeout: "{submodule-timeout}"
2001 submodule-disable: "{submodule-disable}"
2002 choosing-strategy: gerrit
2003 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2006 - timed: "{obj:cron}"
2012 - lf_puppet_verify: &lf_puppet_verify
2013 name: lf-puppet-verify
2015 ######################
2016 # Default parameters #
2017 ######################
2020 build-days-to-keep: 7
2023 git-url: "$GIT_URL/$GERRIT_PROJECT"
2024 github-url: "https://github.com"
2027 puppet-lint-version: 2.3.6
2029 submodule-recursive: true
2030 submodule-timeout: 10
2031 submodule-disable: false
2033 gerrit_trigger_file_paths:
2034 - compare-type: REG_EXP
2037 # github_included_regions MUST match gerrit_trigger_file_paths
2038 github_included_regions:
2041 #####################
2042 # Job Configuration #
2043 #####################
2045 project-type: freestyle
2046 node: "{build-node}"
2048 disabled: "{disable-job}"
2051 - lf-infra-properties:
2052 build-days-to-keep: "{build-days-to-keep}"
2055 - lf-infra-parameters:
2056 project: "{project}"
2059 - lf-puppet-parameters:
2060 puppet-lint-version: "{puppet-lint-version}"
2063 - lf-infra-wrappers:
2064 build-timeout: "{build-timeout}"
2065 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2068 - shell: !include-raw-escape: ../shell/puppet-lint.sh
2074 name: "{project-name}-puppet-verify"
2075 id: gerrit-puppet-verify
2076 <<: *lf_puppet_verify
2078 ######################
2079 # Default parameters #
2080 ######################
2082 gerrit_verify_triggers:
2083 - patchset-created-event:
2084 exclude-drafts: true
2085 exclude-trivial-rebase: false
2086 exclude-no-code-change: false
2087 - draft-published-event
2088 - comment-added-contains-event:
2089 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
2091 #####################
2092 # Job Configuration #
2093 #####################
2096 - lf-infra-gerrit-scm:
2097 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2098 git-url: "{git-url}"
2099 refspec: "$GERRIT_REFSPEC"
2100 branch: "$GERRIT_BRANCH"
2101 submodule-recursive: "{submodule-recursive}"
2102 submodule-timeout: "{submodule-timeout}"
2103 submodule-disable: "{submodule-disable}"
2104 choosing-strategy: gerrit
2108 server-name: "{gerrit-server-name}"
2109 trigger-on: "{obj:gerrit_verify_triggers}"
2111 - project-compare-type: ANT
2112 project-pattern: "{project}"
2114 - branch-compare-type: ANT
2115 branch-pattern: "**/{branch}"
2116 file-paths: "{obj:gerrit_trigger_file_paths}"
2119 name: "{project-name}-puppet-verify"
2120 id: github-puppet-verify
2121 <<: *lf_puppet_verify
2123 #####################
2124 # Job Configuration #
2125 #####################
2128 - lf-infra-properties:
2129 project: "{project}"
2130 build-days-to-keep: 7
2132 url: "{github-url}/{github-org}/{project}"
2135 - lf-infra-github-scm:
2136 url: "{git-clone-url}{github-org}/{project}"
2137 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2139 submodule-recursive: "{submodule-recursive}"
2140 submodule-timeout: "{submodule-timeout}"
2141 submodule-disable: "{submodule-disable}"
2142 choosing-strategy: default
2143 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2146 - github-pull-request:
2147 trigger-phrase: "^(recheck|reverify)$"
2148 only-trigger-phrase: false
2149 status-context: "Puppet Verify"
2152 included-regions: "{obj:github_included_regions}"
2153 white-list-target-branches:
2160 - lf_sonar_common: &lf_sonar_common
2161 name: lf-sonar-common
2163 ######################
2164 # Default parameters #
2165 ######################
2167 archive-artifacts: >
2170 branch: master # Sonar should always be run on master branch
2171 build-days-to-keep: 7
2173 cron: "H H * * *" # run daily
2175 git-url: "$GIT_URL/$PROJECT"
2176 github-url: "https://github.com"
2178 submodule-recursive: true
2179 submodule-timeout: 10
2180 submodule-disable: false
2184 sonar-project-file: "sonar-project.properties"
2185 sonar-properties: ""
2187 sonar-additional-args: ""
2189 gerrit_trigger_file_paths:
2190 - compare-type: REG_EXP
2193 # github_included_regions MUST match gerrit_trigger_file_paths
2194 github_included_regions:
2197 #####################
2198 # Job Configuration #
2199 #####################
2201 project-type: freestyle
2202 node: "{build-node}"
2205 - lf-infra-properties:
2206 build-days-to-keep: "{build-days-to-keep}"
2209 - lf-infra-wrappers:
2210 build-timeout: "{build-timeout}"
2211 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2213 disabled: "{disable-job}"
2216 - lf-infra-parameters:
2217 project: "{project}"
2221 name: ARCHIVE_ARTIFACTS
2222 default: "{archive-artifacts}"
2223 description: Artifacts to archive to the logs server.
2228 - lf_sonar_builders: &lf_sonar_builders
2229 name: lf-sonar-builders
2231 - lf-infra-pre-build
2233 sonar-task: "{sonar-task}"
2234 sonar-project-file: "{sonar-project-file}"
2235 sonar-properties: "{sonar-properties}"
2236 sonar-java-opts: "{sonar-java-opts}"
2237 sonar-additional-args: "{sonar-additional-args}"
2239 - lf_sonar_builders_prescan: &lf_sonar_builders_prescan
2240 name: lf-sonar-builders-prescan
2242 - lf-infra-pre-build
2243 - lf-infra-sonar-with-prescan:
2244 sonar-task: "{sonar-task}"
2245 sonar-project-file: "{sonar-project-file}"
2246 sonar-properties: "{sonar-properties}"
2247 sonar-java-opts: "{sonar-java-opts}"
2248 sonar-additional-args: "{sonar-additional-args}"
2250 - lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script
2251 name: lf-sonar-builders-prescan-script
2253 - lf-infra-pre-build
2254 - shell: "{sonar-prescan-script}"
2256 sonar-task: "{sonar-task}"
2257 sonar-project-file: "{sonar-project-file}"
2258 sonar-properties: "{sonar-properties}"
2259 sonar-java-opts: "{sonar-java-opts}"
2260 sonar-additional-args: "{sonar-additional-args}"
2262 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2263 name: lf-sonar-gerrit-common
2264 gerrit_sonar_triggers:
2265 - comment-added-contains-event:
2266 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2269 - lf-infra-gerrit-scm:
2270 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2271 git-url: "{git-url}"
2272 refspec: $GERRIT_REFSPEC
2273 branch: $GERRIT_BRANCH
2274 submodule-recursive: "{submodule-recursive}"
2275 submodule-timeout: "{submodule-timeout}"
2276 submodule-disable: "{submodule-disable}"
2277 choosing-strategy: default
2280 - timed: "{obj:cron}"
2282 server-name: "{gerrit-server-name}"
2283 trigger-on: "{obj:gerrit_sonar_triggers}"
2285 - project-compare-type: "ANT"
2286 project-pattern: "{project}"
2288 - branch-compare-type: "ANT"
2289 branch-pattern: "**/{branch}"
2290 file-paths: "{obj:gerrit_trigger_file_paths}"
2297 - lf_sonar_github_common: &lf_sonar_github_common
2298 name: lf-sonar-github-common
2300 - lf-infra-properties:
2301 build-days-to-keep: "{build-days-to-keep}"
2303 url: "{github-url}/{github-org}/{project}"
2306 - lf-infra-github-scm:
2307 url: "{git-clone-url}{github-org}/{project}"
2308 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2310 submodule-recursive: "{submodule-recursive}"
2311 submodule-timeout: "{submodule-timeout}"
2312 submodule-disable: "{submodule-disable}"
2313 choosing-strategy: default
2314 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2317 - github-pull-request:
2318 trigger-phrase: "^run-sonar$"
2319 only-trigger-phrase: false
2320 status-context: "Python Sonar"
2323 white-list-target-branches:
2325 included-regions: "{obj:github_included_regions}"
2328 name: "{project-name}-sonar"
2330 <<: *lf_sonar_common
2331 # yamllint disable-line rule:key-duplicates
2332 <<: *lf_sonar_builders
2333 # yamllint disable-line rule:key-duplicates
2334 <<: *lf_sonar_gerrit_common
2337 name: "{project-name}-sonar"
2339 <<: *lf_sonar_common
2340 # yamllint disable-line rule:key-duplicates
2341 <<: *lf_sonar_builders
2342 # yamllint disable-line rule:key-duplicates
2343 <<: *lf_sonar_github_common
2346 name: "{project-name}-sonar-prescan"
2347 id: gerrit-sonar-prescan
2348 <<: *lf_sonar_common
2349 # yamllint disable-line rule:key-duplicates
2350 <<: *lf_sonar_builders_prescan
2351 # yamllint disable-line rule:key-duplicates
2352 <<: *lf_sonar_gerrit_common
2355 name: "{project-name}-sonar-prescan"
2356 id: github-sonar-prescan
2357 <<: *lf_sonar_common
2358 # yamllint disable-line rule:key-duplicates
2359 <<: *lf_sonar_builders_prescan
2360 # yamllint disable-line rule:key-duplicates
2361 <<: *lf_sonar_github_common
2364 name: "{project-name}-sonar-prescan-script"
2365 id: gerrit-sonar-prescan-script
2366 <<: *lf_sonar_common
2367 # yamllint disable-line rule:key-duplicates
2368 <<: *lf_sonar_builders_prescan_script
2369 # yamllint disable-line rule:key-duplicates
2370 <<: *lf_sonar_gerrit_common
2373 name: "{project-name}-sonar-prescan-script"
2374 id: github-sonar-prescan-script
2375 <<: *lf_sonar_common
2376 # yamllint disable-line rule:key-duplicates
2377 <<: *lf_sonar_builders_prescan_script
2378 # yamllint disable-line rule:key-duplicates
2379 <<: *lf_sonar_github_common
2385 - lf_pipelines_common: &lf_pipelines_common
2386 name: lf-pipelines-common
2388 ######################
2389 # Default parameters #
2390 ######################
2396 submodule-recursive: true
2397 submodule-timeout: 10
2398 submodule-disable: false
2400 - lf_global_pipelines_common: &lf_global_pipelines_common
2401 name: lf-global-pipelines-common
2403 # All jobs are triggering from the same source
2404 git-url: https://gerrit.linuxfoundation.org/infra/releng/pipelines
2407 server-name: "lf-releng"
2409 - patchset-created-event:
2410 exclude-drafts: true
2411 exclude-trivial-rebase: false
2412 exclude-no-code-change: false
2413 - draft-published-event
2414 - comment-added-contains-event:
2415 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
2417 - project-compare-type: ANT
2418 project-pattern: "releng/pipelines"
2420 - branch-compare-type: ANT
2421 branch-pattern: "**/master"
2424 name: "lf-pipelines-verify"
2425 id: lf-pipelines-verify
2426 <<: *lf_pipelines_common
2427 <<: *lf_global_pipelines_common
2429 project-type: pipeline
2432 - lf-infra-gerrit-scm:
2433 git-url: "{git-url}"
2434 refspec: "$GERRIT_REFSPEC"
2435 branch: "$GERRIT_BRANCH"
2436 submodule-recursive: "{submodule-recursive}"
2437 submodule-timeout: "{submodule-timeout}"
2438 submodule-disable: "{submodule-disable}"
2439 choosing-strategy: gerrit
2440 jenkins-ssh-credential: "{jenkins-ssh-credential}"