10 - config-file-provider:
13 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
16 name: lf-infra-jjbini-sandbox
17 # TODO: Consolidate this into jjbini when JJB2.0 is available.
19 - config-file-provider:
21 - file-id: jjbini-sandbox
22 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
24 - lf_packer: &lf_packer_common
25 name: lf-packer-common
26 # Provide configuration common in packer jobs.
28 ######################
29 # Default parameters #
30 ######################
36 github-url: 'https://github.com'
38 submodule-recursive: true
40 packer-cloud-settings: packer-cloud-env
47 project-type: freestyle
49 disabled: '{disable-job}'
52 - lf-infra-properties:
57 - lf-infra-parameters:
61 - lf-packer-parameters:
62 packer-version: '{packer-version}'
66 build-timeout: '{build-timeout}'
67 jenkins-ssh-credential: '{jenkins-ssh-credential}'
73 name: lf-infra-jjb-parameters
77 default: '{jjb-version}'
78 description: Jenkins Job Builder version to download and install.
81 default: '{jjb-cache}'
82 description: Jenkins Job Builder cache location.
85 name: lf-packer-parameters
89 default: '{packer-version}'
90 description: Packer 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
109 gerrit_trigger_file_paths:
110 - compare-type: REG_EXP
112 - compare-type: REG_EXP
113 pattern: 'global-jjb'
114 - compare-type: REG_EXP
117 # github_included_regions MUST match gerrit_trigger_file_paths
118 github_included_regions:
123 #####################
124 # Job Configuration #
125 #####################
127 project-type: freestyle
129 disabled: '{disable-job}'
132 - lf-infra-properties:
134 build-days-to-keep: 7
137 - lf-infra-parameters:
141 - lf-infra-jjb-parameters:
142 jjb-cache: '{jjb-cache}'
143 jjb-version: '{jjb-version}'
147 build-timeout: '{build-timeout}'
148 jenkins-ssh-credential: '{jenkins-ssh-credential}'
153 ######################
154 # Gerrit Branch Lock #
155 ######################
158 name: '{project-name}-gerrit-branch-lock-{stream}'
159 id: gerrit-branch-lock
161 ######################
162 # Default parameters #
163 ######################
167 git-url: '$GIT_URL/$GERRIT_PROJECT'
169 submodule-timeout: 10
170 gerrit_merge_triggers:
171 - comment-added-contains-event:
172 comment-contains-value: (un)?lock branch$
174 #####################
175 # Job Configuration #
176 #####################
178 project-type: freestyle
180 disabled: '{disable-job}'
183 - lf-infra-properties:
185 build-days-to-keep: 1
188 - lf-infra-parameters:
196 jenkins-ssh-credential: '{jenkins-ssh-credential}'
199 - lf-infra-gerrit-scm:
203 submodule-recursive: false
204 submodule-timeout: '{submodule-timeout}'
205 choosing-strategy: default
206 jenkins-ssh-credential: '{jenkins-ssh-credential}'
210 server-name: '{gerrit-server-name}'
211 trigger-on: '{obj:gerrit_merge_triggers}'
213 - project-compare-type: ANT
214 project-pattern: '{project}'
216 - branch-compare-type: ANT
217 branch-pattern: '**/{branch}'
220 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
226 ##########################################
227 # Jenkins Configuration Management Merge #
228 ##########################################
231 name: lf-jenkins-cfg-clouds
235 properties-content: 'jenkins_silos={jenkins-silos}'
236 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
237 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
240 name: lf-jenkins-cfg-global-vars
244 properties-content: 'jenkins_silos={jenkins-silos}'
245 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
246 - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
248 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
249 name: lf-jenkins-cfg-merge
251 ######################
252 # Default parameters #
253 ######################
258 git-url: '$GIT_URL/$GERRIT_PROJECT'
259 github-url: 'https://github.com'
260 jenkins-silos: production sandbox
261 submodule-timeout: 10
263 gerrit_merge_triggers:
264 - change-merged-event
265 - comment-added-contains-event:
266 comment-contains-value: remerge$
268 gerrit_trigger_file_paths:
269 - compare-type: REG_EXP
270 pattern: 'jenkins-config\/.*'
272 # github_included_regions MUST match gerrit_trigger_file_paths
273 github_included_regions:
274 - 'jenkins-config\/.*'
276 #####################
277 # Job Configuration #
278 #####################
280 project-type: freestyle
283 disabled: '{disable-job}'
286 - lf-infra-properties:
288 build-days-to-keep: 1
291 - lf-infra-parameters:
299 jenkins-ssh-credential: '{jenkins-ssh-credential}'
303 - lf-jenkins-cfg-global-vars:
304 jenkins-silos: '{jenkins-silos}'
305 - lf-jenkins-cfg-clouds:
306 jenkins-silos: '{jenkins-silos}'
312 name: '{project-name}-jenkins-cfg-merge'
313 id: gerrit-jenkins-cfg-merge
314 <<: *lf_jenkins_cfg_merge
317 - lf-infra-gerrit-scm:
319 refspec: 'refs/heads/{branch}'
321 submodule-recursive: true
322 submodule-timeout: '{submodule-timeout}'
323 choosing-strategy: default
324 jenkins-ssh-credential: '{jenkins-ssh-credential}'
327 - timed: '{obj:cron}'
329 server-name: '{gerrit-server-name}'
330 trigger-on: '{obj:gerrit_merge_triggers}'
332 - project-compare-type: ANT
333 project-pattern: '{project}'
335 - branch-compare-type: ANT
336 branch-pattern: '**/{branch}'
337 file-paths: '{obj:gerrit_trigger_file_paths}'
340 name: '{project-name}-jenkins-cfg-merge'
341 id: github-jenkins-cfg-merge
342 <<: *lf_jenkins_cfg_merge
345 - lf-infra-properties:
347 build-days-to-keep: 1
349 url: '{github-url}/{github-org}/{project}'
352 - lf-infra-github-scm:
353 url: '{git-clone-url}{github-org}/{project}'
355 branch: 'refs/heads/{branch}'
356 submodule-recursive: true
357 submodule-timeout: '{submodule-timeout}'
358 choosing-strategy: default
359 jenkins-ssh-credential: '{jenkins-ssh-credential}'
362 - timed: '{obj:cron}'
366 - github-pull-request:
367 trigger-phrase: '^remerge$'
368 only-trigger-phrase: true
369 status-context: 'Jenkins CFG Merge'
374 white-list: '{obj:github_pr_whitelist}'
375 admin-list: '{obj:github_pr_admin_list}'
376 included-regions: '{obj:github_included_regions}'
377 white-list-target-branches:
380 ###########################################
381 # Jenkins Configuration Management Verify #
382 ###########################################
384 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
385 name: lf-jenkins-cfg-verify
387 ######################
388 # Default parameters #
389 ######################
392 build-days-to-keep: 7
394 git-url: '$GIT_URL/$GERRIT_PROJECT'
395 github-url: 'https://github.com'
397 submodule-timeout: 10
399 gerrit_verify_triggers:
400 - patchset-created-event:
402 exclude-trivial-rebase: false
403 exclude-no-code-change: false
404 - draft-published-event
405 - comment-added-contains-event:
406 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
408 gerrit_trigger_file_paths:
409 - compare-type: REG_EXP
410 pattern: 'jenkins-config\/.*'
412 # github_included_regions MUST match gerrit_trigger_file_paths
413 github_included_regions:
414 - 'jenkins-config\/.*'
416 #####################
417 # Job Configuration #
418 #####################
420 project-type: freestyle
423 disabled: '{disable-job}'
426 - lf-infra-properties:
428 build-days-to-keep: 1
431 - lf-infra-parameters:
439 jenkins-ssh-credential: '{jenkins-ssh-credential}'
440 - config-file-provider:
441 # Listed after to override openstack-infra-wrappers clouds.yaml
444 - file-id: clouds-yaml
445 target: '$HOME/.config/openstack/clouds.yaml'
447 target: '$HOME/.npmrc'
449 target: '$HOME/.config/pip/pip.conf'
454 properties-content: OS_CLOUD={openstack-cloud}
455 - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
461 name: '{project-name}-jenkins-cfg-verify'
462 id: gerrit-jenkins-cfg-verify
463 <<: *lf_jenkins_cfg_verify
466 - lf-infra-gerrit-scm:
468 refspec: 'refs/heads/{branch}'
470 submodule-recursive: true
471 submodule-timeout: '{submodule-timeout}'
472 choosing-strategy: default
473 jenkins-ssh-credential: '{jenkins-ssh-credential}'
477 server-name: '{gerrit-server-name}'
478 trigger-on: '{obj:gerrit_verify_triggers}'
480 - project-compare-type: ANT
481 project-pattern: '{project}'
483 - branch-compare-type: ANT
484 branch-pattern: '**/{branch}'
485 file-paths: '{obj:gerrit_trigger_file_paths}'
488 name: '{project-name}-jenkins-cfg-verify'
489 id: github-jenkins-cfg-verify
490 <<: *lf_jenkins_cfg_verify
494 url: '{github-url}/{github-org}/{project}'
497 - lf-infra-github-scm:
498 url: '{git-clone-url}{github-org}/{project}'
499 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
501 submodule-recursive: '{submodule-recursive}'
502 submodule-timeout: '{submodule-timeout}'
503 choosing-strategy: default
504 jenkins-ssh-credential: '{jenkins-ssh-credential}'
507 - github-pull-request:
508 trigger-phrase: '^(recheck|reverify)$'
509 only-trigger-phrase: false
510 status-context: 'Jenkins CFG Verify'
513 included-regions: '{obj:github_included_regions}'
514 white-list-target-branches:
517 ###########################
518 # JENKINS SANDBOX CLEANUP #
519 ###########################
521 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
522 name: lf-jenkins-sandbox-cleanup
524 ######################
525 # Default parameters #
526 ######################
529 # Run every Saturday at 08:00 UTC
533 #####################
534 # Job Configuration #
535 #####################
537 project-type: freestyle
540 disabled: '{disable-job}'
543 - lf-infra-jjb-parameters:
544 jjb-cache: '{jjb-cache}'
545 jjb-version: '{jjb-version}'
548 - timed: '{obj:cron}'
552 - shell: !include-raw-escape:
553 - ../shell/jjb-install.sh
554 - ../shell/jenkins-sandbox-cleanup.sh
555 - ../shell/jjb-cleanup.sh
558 name: '{project-name}-jenkins-sandbox-cleanup'
559 id: gerrit-jenkins-sandbox-cleanup
561 # yamllint disable-line rule:key-duplicates
562 <<: *lf_jenkins_sandbox_cleanup
565 name: '{project-name}-jenkins-sandbox-cleanup'
566 id: github-jenkins-sandbox-cleanup
568 # yamllint disable-line rule:key-duplicates
569 <<: *lf_jenkins_sandbox_cleanup
576 - lf_jjb_deploy_job: &lf_jjb_deploy_job
577 name: lf-jjb-deploy-job
579 ######################
580 # Default parameters #
581 ######################
585 # jjb-deploy should always clone $PROJECT regardless of what
586 # $GERRIT_PROJECT triggered the job.
587 git-url: '$GIT_URL/$PROJECT'
588 github-url: 'https://github.com'
590 submodule-timeout: 10
591 gerrit_jjb_deploy_job_triggers:
592 - comment-added-contains-event:
593 comment-contains-value: 'jjb-deploy[:]* (?!\*+$).+$'
595 #####################
596 # Job Configuration #
597 #####################
599 project-type: freestyle
602 disabled: '{disable-job}'
605 - lf-infra-properties:
607 build-days-to-keep: 1
610 - lf-infra-parameters:
618 jenkins-ssh-credential: '{jenkins-ssh-credential}'
622 pip-packages: jenkins-job-builder
623 - lf-infra-jjbini-sandbox
624 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
630 name: '{project-name}-jjb-deploy-job'
631 id: gerrit-jjb-deploy-job
632 <<: *lf_jjb_deploy_job
635 - lf-infra-gerrit-scm:
637 refspec: 'refs/heads/{branch}'
639 submodule-recursive: true
640 submodule-timeout: '{submodule-timeout}'
641 choosing-strategy: default
642 jenkins-ssh-credential: '{jenkins-ssh-credential}'
646 server-name: '{gerrit-server-name}'
647 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
649 - project-compare-type: ANT
650 project-pattern: '**'
652 - branch-compare-type: ANT
661 name: '{project-name}-jjb-deploy-job'
662 id: github-jjb-deploy-job
663 <<: *lf_jjb_deploy_job
666 - lf-infra-properties:
668 build-days-to-keep: 1
670 url: '{github-url}/{github-org}/{project}'
673 - lf-infra-github-scm:
674 url: '{git-clone-url}{github-org}/{project}'
675 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
677 submodule-recursive: true
678 submodule-timeout: '{submodule-timeout}'
679 choosing-strategy: default
680 jenkins-ssh-credential: '{jenkins-ssh-credential}'
683 - github-pull-request:
684 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
685 only-trigger-phrase: true
686 status-context: 'JJB Deploy Job'
689 white-list-target-branches:
696 - lf_jjb_merge: &lf_jjb_merge
699 ######################
700 # Default parameters #
701 ######################
703 gerrit_merge_triggers:
704 - change-merged-event
705 - comment-added-contains-event:
706 comment-contains-value: remerge$
708 #####################
709 # Job Configuration #
710 #####################
715 - shell: !include-raw-escape:
716 - ../shell/jjb-install.sh
717 - ../shell/jjb-merge-job.sh
718 - ../shell/jjb-cleanup.sh
721 name: '{project-name}-jjb-merge'
724 # yamllint disable-line rule:key-duplicates
727 git-url: '$GIT_URL/$GERRIT_PROJECT'
730 - lf-infra-gerrit-scm:
734 submodule-recursive: '{submodule-recursive}'
735 submodule-timeout: '{submodule-timeout}'
736 choosing-strategy: default
737 jenkins-ssh-credential: '{jenkins-ssh-credential}'
741 server-name: '{gerrit-server-name}'
742 trigger-on: '{obj:gerrit_merge_triggers}'
744 - project-compare-type: ANT
745 project-pattern: '{project}'
747 - branch-compare-type: ANT
748 branch-pattern: '**/{branch}'
749 file-paths: '{obj:gerrit_trigger_file_paths}'
752 name: '{project-name}-jjb-merge'
755 # yamllint disable-line rule:key-duplicates
758 #####################
759 # Job Configuration #
760 #####################
763 - lf-infra-properties:
765 build-days-to-keep: 7
767 url: '{github-url}/{github-org}/{project}'
770 - lf-infra-github-scm:
771 url: '{git-clone-url}{github-org}/{project}'
773 branch: 'refs/heads/{branch}'
774 submodule-recursive: '{submodule-recursive}'
775 submodule-timeout: '{submodule-timeout}'
776 choosing-strategy: default
777 jenkins-ssh-credential: '{jenkins-ssh-credential}'
783 - github-pull-request:
784 trigger-phrase: '^remerge$'
785 only-trigger-phrase: true
786 status-context: 'JJB Merge'
791 white-list: '{obj:github_pr_whitelist}'
792 admin-list: '{obj:github_pr_admin_list}'
793 included-regions: '{obj:github_included_regions}'
794 white-list-target-branches:
801 - lf_jjb_verify: &lf_jjb_verify
804 ######################
805 # Default parameters #
806 ######################
808 gerrit_verify_triggers:
809 - patchset-created-event:
811 exclude-trivial-rebase: false
812 exclude-no-code-change: false
813 - draft-published-event
814 - comment-added-contains-event:
815 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
817 #####################
818 # Job Configuration #
819 #####################
826 - shell: !include-raw-escape:
827 - ../shell/git-validate-jira-urls.sh
828 - ../shell/jjb-install.sh
829 - ../shell/jjb-verify-job.sh
830 - ../shell/jjb-check-unicode.sh
831 - ../shell/jjb-cleanup.sh
832 - lf-infra-gpg-verify-git-signature
835 name: '{project-name}-jjb-verify'
836 id: gerrit-jjb-verify
838 # yamllint disable-line rule:key-duplicates
841 ######################
842 # Default parameters #
843 ######################
845 git-url: '$GIT_URL/$GERRIT_PROJECT'
847 #####################
848 # Job Configuration #
849 #####################
852 - lf-infra-gerrit-scm:
854 refspec: '$GERRIT_REFSPEC'
855 branch: '$GERRIT_BRANCH'
856 submodule-recursive: '{submodule-recursive}'
857 submodule-timeout: '{submodule-timeout}'
858 choosing-strategy: gerrit
859 jenkins-ssh-credential: '{jenkins-ssh-credential}'
863 server-name: '{gerrit-server-name}'
864 trigger-on: '{obj:gerrit_verify_triggers}'
866 - project-compare-type: ANT
867 project-pattern: '{project}'
869 - branch-compare-type: ANT
870 branch-pattern: '**/{branch}'
871 file-paths: '{obj:gerrit_trigger_file_paths}'
874 name: '{project-name}-jjb-verify'
875 id: github-jjb-verify
877 # yamllint disable-line rule:key-duplicates
880 #####################
881 # Job Configuration #
882 #####################
885 - lf-infra-properties:
887 build-days-to-keep: 7
889 url: '{github-url}/{github-org}/{project}'
892 - lf-infra-github-scm:
893 url: '{git-clone-url}{github-org}/{project}'
894 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
896 submodule-recursive: '{submodule-recursive}'
897 submodule-timeout: '{submodule-timeout}'
898 choosing-strategy: default
899 jenkins-ssh-credential: '{jenkins-ssh-credential}'
902 - github-pull-request:
903 trigger-phrase: '^(recheck|reverify)$'
904 only-trigger-phrase: false
905 status-context: 'JJB Verify'
908 included-regions: '{obj:github_included_regions}'
909 white-list-target-branches:
912 ############################
913 # JJB Verify Upstream GJJB #
914 ############################
916 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
917 name: lf-jjb-verify-upstream-gjjb
919 #####################
920 # Job Configuration #
921 #####################
928 git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
929 git cherry-pick FETCH_HEAD
931 - shell: !include-raw-escape:
932 - ../shell/git-validate-jira-urls.sh
933 - ../shell/jjb-install.sh
934 - ../shell/jjb-verify-job.sh
935 - ../shell/jjb-check-unicode.sh
936 - ../shell/jjb-cleanup.sh
937 - lf-infra-gpg-verify-git-signature
940 name: '{project-name}-jjb-verify-upstream-gjjb'
941 id: gerrit-jjb-verify-upstream-gjjb
943 # yamllint disable-line rule:key-duplicates
944 <<: *lf_jjb_verify_upstream_gjjb
946 ######################
947 # Default parameters #
948 ######################
950 git-url: '$GIT_URL/$PROJECT'
951 submodule-timeout: 10
953 #####################
954 # Job Configuration #
955 #####################
958 - lf-infra-gerrit-scm:
962 submodule-recursive: true
963 submodule-timeout: '{submodule-timeout}'
964 choosing-strategy: default
965 jenkins-ssh-credential: '{jenkins-ssh-credential}'
969 server-name: 'LinuxFoundation'
971 - patchset-created-event:
973 exclude-trivial-rebase: false
974 exclude-no-code-change: false
975 - draft-published-event
976 - comment-added-contains-event:
977 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
979 - project-compare-type: ANT
980 project-pattern: 'releng/global-jjb'
982 - branch-compare-type: ANT
983 branch-pattern: '**/master'
985 gerrit-build-failed-codereview-value: -1
986 gerrit-build-failed-verified-value: 0
987 gerrit-build-successful-codereview-value: 1
988 gerrit-build-successful-verified-value: 0
994 - lf_license_check: &lf_license_check
995 name: lf-license-check
997 ######################
998 # Default parameters #
999 ######################
1002 build-days-to-keep: 7
1011 git-url: '$GIT_URL/$PROJECT'
1012 github-url: 'https://github.com'
1014 license-exclude-paths: ''
1015 licenses-allowed: Apache-2.0,EPL-1.0,MIT
1016 project-pattern: '**'
1019 submodule-timeout: 10
1021 #####################
1022 # Job Configuration #
1023 #####################
1025 project-type: freestyle
1026 node: '{build-node}'
1028 disabled: '{disable-job}'
1031 - lf-infra-properties:
1032 build-days-to-keep: '{build-days-to-keep}'
1035 - lf-infra-parameters:
1036 project: '{project}'
1041 - lf-infra-wrappers:
1042 build-timeout: '{build-timeout}'
1043 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1047 file-patterns: '{file-patterns}'
1048 spdx-disable: '{spdx-disable}'
1049 lhc-version: '{lhc-version}'
1050 license-exclude-paths: '{license-exclude-paths}'
1051 licenses-allowed: '{licenses-allowed}'
1057 name: '{project-name}-license-check'
1058 id: gerrit-license-check
1059 <<: *lf_license_check
1061 git-url: '$GIT_URL/$GERRIT_PROJECT'
1064 - lf-infra-gerrit-scm:
1065 git-url: '{git-url}'
1066 refspec: '$GERRIT_REFSPEC'
1067 branch: '$GERRIT_BRANCH'
1068 # Submodules are out of the project's control
1069 submodule-recursive: false
1070 submodule-timeout: '{submodule-timeout}'
1071 choosing-strategy: gerrit
1072 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1076 server-name: '{gerrit-server-name}'
1077 # Trigger should not be overridable as we want to always run
1079 - patchset-created-event:
1080 exclude-drafts: false
1081 exclude-trivial-rebase: false
1082 exclude-no-code-change: false
1083 - draft-published-event
1084 - comment-added-contains-event:
1085 comment-contains-value: recheck$
1087 - project-compare-type: ANT
1088 project-pattern: '{project-pattern}'
1090 - branch-compare-type: ANT
1091 branch-pattern: '**'
1094 name: '{project-name}-license-check'
1095 id: github-license-check
1096 <<: *lf_license_check
1099 - lf-infra-properties:
1100 build-days-to-keep: '{build-days-to-keep}'
1102 url: '{github-url}/{github-org}/{project}'
1105 - lf-infra-github-scm:
1106 url: '{git-clone-url}{github-org}/{project}'
1107 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1109 # Submodules are out of the project's control
1110 submodule-recursive: false
1111 submodule-timeout: '{submodule-timeout}'
1112 choosing-strategy: default
1113 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1116 - github-pull-request:
1117 trigger-phrase: '^recheck$'
1118 only-trigger-phrase: false
1119 status-context: 'License Check'
1122 white-list-target-branches:
1125 ####################
1126 # Info YAML Verify #
1127 ####################
1129 - lf_info_yaml_verify: &lf_info_yaml_verify
1130 name: lf-info-yaml-verify
1132 ######################
1133 # Default parameters #
1134 ######################
1136 gerrit_verify_triggers:
1137 - patchset-created-event:
1138 exclude-drafts: true
1139 exclude-trivial-rebase: false
1140 exclude-no-code-change: false
1141 - draft-published-event
1142 - comment-added-contains-event:
1143 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1145 #####################
1146 # Job Configuration #
1147 #####################
1152 - shell: !include-raw-escape:
1153 - ../shell/git-validate-info-yaml.sh
1154 - ../shell/info-file-validate.sh
1157 name: '{project-name}-info-yaml-verify'
1158 id: gerrit-info-yaml-verify
1160 # yamllint disable-line rule:key-duplicates
1161 <<: *lf_info_yaml_verify
1163 git-url: '$GIT_URL/$GERRIT_PROJECT'
1166 - lf-infra-gerrit-scm:
1167 git-url: '{git-url}'
1168 refspec: '$GERRIT_REFSPEC'
1169 branch: '$GERRIT_BRANCH'
1170 submodule-recursive: '{submodule-recursive}'
1171 submodule-timeout: '{submodule-timeout}'
1172 choosing-strategy: gerrit
1173 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1177 server-name: '{gerrit-server-name}'
1178 trigger-on: '{obj:gerrit_verify_triggers}'
1180 - project-compare-type: ANT
1181 project-pattern: '{project}'
1183 - branch-compare-type: ANT
1184 branch-pattern: '**/{branch}'
1186 - compare-type: REG_EXP
1187 pattern: 'INFO.yaml'
1190 name: '{project-name}-info-yaml-verify'
1191 id: github-info-yaml-verify
1193 # yamllint disable-line rule:key-duplicates
1194 <<: *lf_info_yaml_verify
1196 github-url: 'https://github.com'
1199 url: '{github-url}/{github-org}/{project}'
1202 - lf-infra-github-scm:
1203 url: '{git-clone-url}{github-org}/{project}'
1204 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1206 submodule-recursive: '{submodule-recursive}'
1207 submodule-timeout: '{submodule-timeout}'
1208 choosing-strategy: default
1209 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1212 - github-pull-request:
1213 trigger-phrase: '^(recheck|reverify)$'
1214 only-trigger-phrase: false
1215 status-context: 'INFO File Verify'
1218 # included-regions MUST match gerrit file-paths
1219 included-regions: 'INFO.yaml'
1220 white-list-target-branches:
1227 - lf_openstack_cron: &lf_openstack_cron
1228 name: lf-openstack-cron
1230 ######################
1231 # Default parameters #
1232 ######################
1235 build-days-to-keep: 7
1239 git-url: '$GIT_URL/$PROJECT'
1240 github-url: 'https://github.com'
1241 openstack-cloud: vex
1242 openstack-image-cleanup: true
1243 openstack-image-cleanup-age: 30
1244 openstack-image-protect: true
1245 openstack-server-cleanup: true
1246 openstack-stack-cleanup: true
1247 openstack-volume-cleanup: true
1249 submodule-timeout: 10
1251 #####################
1252 # Job Configuration #
1253 #####################
1255 project-type: freestyle
1256 node: '{build-node}'
1258 disabled: '{disable-job}'
1261 - lf-infra-properties:
1262 build-days-to-keep: '{build-days-to-keep}'
1265 - lf-infra-parameters:
1266 project: '{project}'
1271 default: '{jenkins-urls}'
1273 Space separated list of Jenkins URLs to check for active builds.
1276 - lf-infra-wrappers:
1277 build-timeout: '{build-timeout}'
1278 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1279 # Listed after to override openstack-infra-wrappers clouds.yaml definition
1280 - config-file-provider:
1282 - file-id: clouds-yaml
1283 target: '$HOME/.config/openstack/clouds.yaml'
1285 target: '$HOME/.npmrc'
1287 target: '$HOME/.config/pip/pip.conf'
1290 - timed: '{obj:cron}'
1293 - lf-infra-pre-build
1295 properties-content: OS_CLOUD={openstack-cloud}
1298 condition-kind: boolean-expression
1299 condition-expression: '{openstack-stack-cleanup}'
1301 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1304 condition-kind: boolean-expression
1305 condition-expression: '{openstack-server-cleanup}'
1307 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1310 condition-kind: boolean-expression
1311 condition-expression: '{openstack-volume-cleanup}'
1313 - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1316 condition-kind: boolean-expression
1317 condition-expression: '{openstack-image-protect}'
1319 - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1321 condition-kind: boolean-expression
1322 condition-expression: '{openstack-image-cleanup}'
1325 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1326 - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1332 name: '{project-name}-openstack-cron'
1333 id: gerrit-openstack-cron
1334 <<: *lf_openstack_cron
1337 - lf-infra-gerrit-scm:
1338 git-url: '{git-url}'
1339 refspec: 'refs/heads/{branch}'
1341 submodule-recursive: true
1342 submodule-timeout: '{submodule-timeout}'
1343 choosing-strategy: default
1344 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1347 name: '{project-name}-openstack-cron'
1348 id: github-openstack-cron
1349 <<: *lf_openstack_cron
1352 - lf-infra-github-scm:
1353 url: '{git-clone-url}{github-org}/{project}'
1355 branch: 'refs/heads/{branch}'
1356 submodule-recursive: true
1357 submodule-timeout: '{submodule-timeout}'
1358 choosing-strategy: default
1359 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1365 - lf_packer_merge: &lf_packer_merge
1366 name: lf-packer-merge
1368 ######################
1369 # Default parameters #
1370 ######################
1373 openstack-cloud: vex
1375 #####################
1376 # Job Configuration #
1377 #####################
1380 - lf-infra-parameters:
1381 project: '{project}'
1384 - lf-packer-parameters:
1385 packer-version: '{packer-version}'
1388 - lf-infra-packer-build:
1389 openstack: '{openstack}'
1390 openstack-cloud: '{openstack-cloud}'
1391 packer-cloud-settings: '{packer-cloud-settings}'
1392 packer-version: '{packer-version}'
1393 platform: '{platforms}'
1394 template: '{templates}'
1397 name: '{project-name}-packer-merge-{platforms}-{templates}'
1398 id: gerrit-packer-merge
1399 <<: *lf_packer_common
1400 # yamllint disable-line rule:key-duplicates
1401 <<: *lf_packer_merge
1403 ######################
1404 # Default parameters #
1405 ######################
1407 git-url: '$GIT_URL/$GERRIT_PROJECT'
1409 gerrit_merge_triggers:
1410 - change-merged-event
1411 - comment-added-contains-event:
1412 comment-contains-value: remerge$
1414 #####################
1415 # Job Configuration #
1416 #####################
1419 - lf-infra-gerrit-scm:
1420 git-url: '{git-url}'
1421 refspec: '$GERRIT_REFSPEC'
1422 branch: '$GERRIT_BRANCH'
1423 submodule-recursive: '{submodule-recursive}'
1424 submodule-timeout: '{submodule-timeout}'
1425 choosing-strategy: gerrit
1426 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1429 - timed: '{obj:cron}'
1431 server-name: '{gerrit-server-name}'
1432 trigger-on: '{obj:gerrit_merge_triggers}'
1434 - project-compare-type: ANT
1435 project-pattern: '{project}'
1437 - branch-compare-type: ANT
1438 branch-pattern: '**/{branch}'
1440 - compare-type: REG_EXP
1441 pattern: 'packer\/provision\/.*\.sh'
1442 - compare-type: REG_EXP
1443 pattern: 'packer\/provision\/.*\.bat'
1444 - compare-type: REG_EXP
1445 pattern: 'packer\/provision\/.*\.ps1'
1446 - compare-type: REG_EXP
1447 pattern: 'packer\/provision\/{templates}\.yaml'
1448 - compare-type: REG_EXP
1449 pattern: 'packer\/provision\/local-{templates}\.yaml'
1450 - compare-type: REG_EXP
1451 pattern: 'packer\/templates\/{templates}\.json'
1452 - compare-type: REG_EXP
1453 pattern: 'packer\/vars\/{platforms}\.json'
1456 name: '{project-name}-packer-merge-{platforms}-{templates}'
1457 id: github-packer-merge
1458 <<: *lf_packer_common
1459 # yamllint disable-line rule:key-duplicates
1460 <<: *lf_packer_merge
1462 #####################
1463 # Job Configuration #
1464 #####################
1467 - lf-infra-properties:
1468 project: '{project}'
1469 build-days-to-keep: 7
1471 url: '{github-url}/{github-org}/{project}'
1474 - lf-infra-github-scm:
1475 url: '{git-clone-url}{github-org}/{project}'
1477 +refs/heads/*:refs/remotes/origin/*
1478 +refs/pull/*:refs/remotes/origin/pr/*
1479 branch: '$GERRIT_REFSPEC'
1480 submodule-recursive: '{submodule-recursive}'
1481 submodule-timeout: '{submodule-timeout}'
1482 choosing-strategy: default
1483 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1486 - timed: '{obj:cron}'
1491 - github-pull-request:
1492 trigger-phrase: '^remerge$'
1493 only-trigger-phrase: true
1494 status-context: 'Packer {platforms}-{templates} Merge'
1499 white-list: '{obj:github_pr_whitelist}'
1500 admin-list: '{obj:github_pr_admin_list}'
1501 # included-regions MUST match Gerrit Trigger file-paths
1503 - 'packer\/provision\/.*\.sh'
1504 - 'packer\/provision\/.*\.bat'
1505 - 'packer\/provision\/.*\.ps1'
1506 - 'packer\/provision\/{templates}\.yaml'
1507 - 'packer\/provision\/local-{templates}\.yaml'
1508 - 'packer\/templates\/{templates}\.json'
1509 - 'packer\/vars\/{platforms}\.json'
1510 white-list-target-branches:
1517 - lf_packer_verify: &lf_packer_verify
1518 name: lf-packer-verify
1520 ######################
1521 # Default parameters #
1522 ######################
1526 openstack-cloud: vex
1528 gerrit_verify_triggers:
1529 - patchset-created-event:
1530 exclude-drafts: true
1531 exclude-trivial-rebase: false
1532 exclude-no-code-change: false
1533 - draft-published-event
1534 - comment-added-contains-event:
1535 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1537 gerrit_trigger_file_paths:
1538 - compare-type: REG_EXP
1539 pattern: 'packer\/.*'
1541 # github_included_regions MUST match gerrit_trigger_file_paths
1542 github_included_regions:
1545 #####################
1546 # Job Configuration #
1547 #####################
1552 - lf-infra-packer-validate:
1553 openstack: '{openstack}'
1554 openstack-cloud: '{openstack-cloud}'
1555 packer-cloud-settings: '{packer-cloud-settings}'
1556 packer-version: '{packer-version}'
1559 name: '{project-name}-packer-verify'
1560 id: gerrit-packer-verify
1561 <<: *lf_packer_common
1562 # yamllint disable-line rule:key-duplicates
1563 <<: *lf_packer_verify
1565 ######################
1566 # Default parameters #
1567 ######################
1569 git-url: '$GIT_URL/$GERRIT_PROJECT'
1571 #####################
1572 # Job Configuration #
1573 #####################
1576 - lf-infra-gerrit-scm:
1577 git-url: '{git-url}'
1578 refspec: '$GERRIT_REFSPEC'
1579 branch: '$GERRIT_BRANCH'
1580 submodule-recursive: '{submodule-recursive}'
1581 submodule-timeout: '{submodule-timeout}'
1582 choosing-strategy: gerrit
1583 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1587 server-name: '{gerrit-server-name}'
1588 trigger-on: '{obj:gerrit_verify_triggers}'
1590 - project-compare-type: ANT
1591 project-pattern: '{project}'
1593 - branch-compare-type: ANT
1594 branch-pattern: '**/{branch}'
1595 file-paths: '{obj:gerrit_trigger_file_paths}'
1598 name: '{project-name}-packer-verify'
1599 id: github-packer-verify
1600 <<: *lf_packer_common
1601 # yamllint disable-line rule:key-duplicates
1602 <<: *lf_packer_verify
1604 #####################
1605 # Job Configuration #
1606 #####################
1609 - lf-infra-properties:
1610 project: '{project}'
1611 build-days-to-keep: 7
1613 url: '{github-url}/{github-org}/{project}'
1616 - lf-infra-github-scm:
1617 url: '{git-clone-url}{github-org}/{project}'
1618 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1620 submodule-recursive: '{submodule-recursive}'
1621 submodule-timeout: '{submodule-timeout}'
1622 choosing-strategy: default
1623 jenkins-ssh-credential: '{jenkins-ssh-credential}'
1626 - github-pull-request:
1627 trigger-phrase: '^(recheck|reverify)$'
1628 only-trigger-phrase: false
1629 status-context: 'Packer Verify'
1632 included-regions: '{obj:github_included_regions}'
1633 white-list-target-branches: