7 name: lf-infra-nexus-iq-python-cli
11 NEXUS_IQ_PROJECT_NAME={nexus-iq-project-name}
12 REQUIREMENTS_FILE={requirements-file}
13 - shell: !include-raw-escape: ../shell/nexus-iq-python-cli.sh
16 name: lf-infra-tox-install
19 properties-content: "PYTHON={python-version}"
20 - shell: !include-raw-escape: ../shell/tox-install.sh
23 name: lf-infra-tox-run
26 properties-content: "PARALLEL={parallel}"
27 - shell: !include-raw-escape: ../shell/tox-run.sh
33 - lf_python_common: &lf_python_common
34 name: lf-python-common
36 ######################
37 # Default parameters #
38 ######################
47 project-type: freestyle
51 - lf-infra-properties:
52 build-days-to-keep: "{build-days-to-keep}"
55 - lf-infra-parameters:
62 build-timeout: "{build-timeout}"
63 jenkins-ssh-credential: "{jenkins-ssh-credential}"
72 - lf_tox_nexus_iq_clm: &lf_tox_nexus_iq_clm
73 name: lf-tox-nexus-iq-clm
75 ######################
76 # Default parameters #
77 ######################
84 git-url: "$GIT_URL/$PROJECT"
85 github-url: "https://github.com"
86 java-version: openjdk11 # Scanner is a jar
87 nexus-iq-cli-version: 1.140.0-01
88 nexus-iq-namespace: "" # Recommend a trailing dash when set. Example: odl-
89 nexus-target-build: "**/*"
90 pre-build-script: "# pre-build script goes here"
91 python-version: python3
92 requirements-file: requirements.txt
94 submodule-recursive: true
96 submodule-disable: false
100 #####################
101 # Job Configuration #
102 #####################
104 disabled: "{disable-job}"
107 - lf-infra-parameters:
111 - lf-infra-tox-parameters:
113 tox-envs: "{tox-envs}"
115 name: ARCHIVE_ARTIFACTS
116 default: "{archive-artifacts}"
117 description: Artifacts to archive to the logs server.
119 name: NEXUS_IQ_CLI_VERSION
120 default: "{nexus-iq-cli-version}"
121 description: Nexus IQ CLI jar to download and run.
123 name: NEXUS_TARGET_BUILD
124 default: "{nexus-target-build}"
125 description: File or dir to scan by Nexus CLI.
129 build-timeout: "{build-timeout}"
130 jenkins-ssh-credential: "{jenkins-ssh-credential}"
131 - credentials-binding:
132 - username-password-separated:
133 credential-id: nexus-iq-xc-clm
134 username: NEXUS_IQ_USER
135 password: NEXUS_IQ_PASSWORD
139 - lf-update-java-alternatives:
140 java-version: "{java-version}"
141 - lf-infra-tox-install:
142 python-version: "{python-version}"
143 - shell: "{pre-build-script}"
146 - lf-infra-nexus-iq-python-cli:
147 nexus-iq-project-name: "{nexus-iq-namespace}{project-name}"
148 requirements-file: "{requirements-file}"
151 name: "{project-name}-tox-nexus-iq-clm"
152 id: gerrit-tox-nexus-iq-clm
153 <<: *lf_python_common
154 <<: *lf_tox_nexus_iq_clm
156 ######################
157 # Default parameters #
158 ######################
160 gerrit_nexus_iq_triggers:
161 - comment-added-contains-event:
162 comment-contains-value: '^Patch Set\s+\d+:\s+run-clm\s*$'
164 #####################
165 # Job Configuration #
166 #####################
169 - lf-infra-gerrit-scm:
170 jenkins-ssh-credential: "{jenkins-ssh-credential}"
172 refspec: "$GERRIT_REFSPEC"
173 branch: "$GERRIT_BRANCH"
174 submodule-recursive: "{submodule-recursive}"
175 submodule-timeout: "{submodule-timeout}"
176 submodule-disable: "{submodule-disable}"
177 choosing-strategy: default
180 - timed: "{obj:cron}"
182 server-name: "{gerrit-server-name}"
183 trigger-on: "{obj:gerrit_nexus_iq_triggers}"
185 - project-compare-type: ANT
186 project-pattern: "{project}"
188 - branch-compare-type: ANT
189 branch-pattern: "**/{branch}"
197 name: "{project-name}-tox-nexus-iq"
198 id: github-tox-nexus-iq-clm
199 <<: *lf_python_common
200 <<: *lf_tox_nexus_iq_clm
203 - lf-infra-properties:
204 build-days-to-keep: "{build-days-to-keep}"
206 url: "{github-url}/{github-org}/{project}"
209 - lf-infra-github-scm:
210 url: "{git-clone-url}{github-org}/{project}"
212 branch: "refs/heads/{branch}"
213 submodule-recursive: "{submodule-recursive}"
214 submodule-timeout: "{submodule-timeout}"
215 submodule-disable: "{submodule-disable}"
216 choosing-strategy: default
217 jenkins-ssh-credential: "{jenkins-ssh-credential}"
220 - timed: "{obj:cron}"
221 - github-pull-request:
222 trigger-phrase: "^run-clm$"
223 only-trigger-phrase: false
224 status-context: "CLM"
227 white-list-target-branches:
230 #########################
231 # Python Sonar with CLI #
232 #########################
234 - lf_cli_sonar: &lf_cli_sonar
237 ######################
238 # Default parameters #
239 ######################
241 branch: master # Sonar should always be run on master branch
242 build-days-to-keep: 7
244 cron: "H H * * *" # run daily
246 git-url: "$GIT_URL/$PROJECT"
247 github-url: "https://github.com"
248 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
249 # Projects not compatible with jdk11 can set java-version to something else
250 java-version: openjdk11
252 pre-build-script: "# pre-build script goes here"
253 python-version: python3
255 sonar-scanner-version: "4.7.0.2747"
256 sonar-scanner-home: "$WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
257 sonar-scanner-opts: "-server"
258 submodule-recursive: true
259 submodule-timeout: 10
260 submodule-disable: false
264 gerrit_trigger_file_paths:
265 - compare-type: REG_EXP
268 # github_included_regions MUST match gerrit_trigger_file_paths
269 github_included_regions:
272 #####################
273 # Job Configuration #
274 #####################
276 disabled: "{disable-job}"
279 - lf-infra-parameters:
283 - lf-infra-sonar-cli-parameters:
285 tox-envs: "{tox-envs}"
286 sonar-scanner-version: "{sonar-scanner-version}"
287 sonar-scanner-home: "{sonar-scanner-home}"
288 sonar-scanner-opts: "{sonar-scanner-opts}"
290 name: ARCHIVE_ARTIFACTS
291 default: "{archive-artifacts}"
292 description: Artifacts to archive to the logs server.
294 - credentials-binding:
296 credential-id: sonar-token-{project-name}
297 variable: SONAR_TOKEN
300 - lf-infra-tox-install:
301 python-version: "{python-version}"
302 - shell: "{pre-build-script}"
304 parallel: "{parallel}"
307 properties-content: |
308 SONARCLOUD_PROJECT_ORGANIZATION={sonarcloud-project-organization}
309 SONARCLOUD_PROJECT_KEY={sonarcloud-project-key}
310 - shell: !include-raw-escape: ../shell/sonar-cli.sh
316 name: "{project-name}-cli-sonar"
318 <<: *lf_python_common
321 ######################
322 # Default parameters #
323 ######################
325 gerrit_sonar_triggers:
326 - comment-added-contains-event:
327 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
329 #####################
330 # Job Configuration #
331 #####################
334 - lf-infra-gerrit-scm:
335 jenkins-ssh-credential: "{jenkins-ssh-credential}"
337 refspec: $GERRIT_REFSPEC
338 branch: $GERRIT_BRANCH
339 submodule-recursive: "{submodule-recursive}"
340 submodule-timeout: "{submodule-timeout}"
341 submodule-disable: "{submodule-disable}"
342 choosing-strategy: default
345 - timed: "{obj:cron}"
347 server-name: "{gerrit-server-name}"
348 trigger-on: "{obj:gerrit_sonar_triggers}"
350 - project-compare-type: "ANT"
351 project-pattern: "{project}"
353 - branch-compare-type: "ANT"
354 branch-pattern: "**/{branch}"
355 file-paths: "{obj:gerrit_trigger_file_paths}"
363 name: "{project-name}-cli-sonar"
365 <<: *lf_python_common
369 - lf-infra-properties:
370 build-days-to-keep: "{build-days-to-keep}"
372 url: "{github-url}/{github-org}/{project}"
375 - lf-infra-github-scm:
376 url: "{git-clone-url}{github-org}/{project}"
377 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
379 submodule-recursive: "{submodule-recursive}"
380 submodule-timeout: "{submodule-timeout}"
381 submodule-disable: "{submodule-disable}"
382 choosing-strategy: default
383 jenkins-ssh-credential: "{jenkins-ssh-credential}"
386 - github-pull-request:
387 trigger-phrase: "^run-sonar$"
388 only-trigger-phrase: false
389 status-context: "Python Sonar"
392 white-list-target-branches:
394 included-regions: "{obj:github_included_regions}"
396 #########################
397 # Python Sonar with Tox #
398 #########################
400 - lf_tox_sonar: &lf_tox_sonar
403 ######################
404 # Default parameters #
405 ######################
407 branch: master # Sonar should always be run on master branch
408 build-days-to-keep: 7
410 cron: "H H * * *" # run daily
412 git-url: "$GIT_URL/$PROJECT"
413 github-url: "https://github.com"
414 java-version: openjdk11
415 mvn-global-settings: global-settings
419 mvn-settings: "{mvn-settings}"
422 pre-build-script: "# pre-build script goes here"
423 python-version: python3
424 sonar-mvn-goal: "sonar:sonar"
426 sonarcloud-project-key: ""
427 sonarcloud-project-organization: ""
428 sonarcloud-api-token: ""
429 sonarcloud-qualitygate-wait: false
430 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
431 # Projects not compatible with jdk11 can set java-version to something else
432 sonarcloud-java-version: openjdk11
434 submodule-recursive: true
435 submodule-timeout: 10
436 submodule-disable: false
439 scan-dev-branch: false
441 gerrit_trigger_file_paths:
442 - compare-type: REG_EXP
445 # github_included_regions MUST match gerrit_trigger_file_paths
446 github_included_regions:
449 #####################
450 # Job Configuration #
451 #####################
453 disabled: "{disable-job}"
456 - lf-infra-parameters:
460 - lf-infra-maven-parameters:
461 mvn-opts: "{mvn-opts}"
462 mvn-params: "{mvn-params}"
463 mvn-version: "{mvn-version}"
464 - lf-infra-tox-parameters:
466 tox-envs: "{tox-envs}"
468 name: ARCHIVE_ARTIFACTS
469 default: "{archive-artifacts}"
470 description: Artifacts to archive to the logs server.
473 # Sets an env var for shell scripts to be able to call the dynamically
474 # installed maven without having to calculate the path themselves.
475 # yamllint disable-line rule:line-length
476 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
477 description: "Maven selector to be used by shell scripts"
479 name: SONAR_MAVEN_GOAL
480 default: "{sonar-mvn-goal}"
482 Maven goals to pass to the Sonar call. Typically sonar:sonar
483 however to use a specific version of the sonar-maven-plugin we
484 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
488 - lf-infra-tox-install:
489 python-version: "{python-version}"
490 - shell: "{pre-build-script}"
492 parallel: "{parallel}"
493 - lf-provide-maven-settings:
494 global-settings-file: "{mvn-global-settings}"
495 settings-file: "{mvn-settings}"
498 condition-kind: boolean-expression
499 condition-expression: "{sonarcloud}"
501 - shell: echo 'Using SonarCloud'
502 - lf-infra-maven-sonarcloud:
503 java-version: "{java-version}"
504 mvn-goals: "{mvn-goals}"
505 mvn-settings: "{mvn-settings}"
506 mvn-version: "{mvn-version}"
507 sonarcloud-project-key: "{sonarcloud-project-key}"
508 # yamllint disable-line rule:line-length
509 sonarcloud-project-organization: "{sonarcloud-project-organization}"
510 sonarcloud-api-token: "{sonarcloud-api-token}"
511 sonarcloud-java-version: "{sonarcloud-java-version}"
512 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
513 scan-dev-branch: "{scan-dev-branch}"
518 condition-kind: boolean-expression
519 condition-expression: "{sonarcloud}"
521 - shell: echo 'Using SonarQube'
522 - lf-infra-maven-sonar:
523 java-version: "{java-version}"
524 mvn-goals: "{mvn-goals}"
525 mvn-settings: "{mvn-settings}"
526 mvn-version: "{mvn-version}"
532 name: "{project-name}-tox-sonar"
534 <<: *lf_python_common
537 ######################
538 # Default parameters #
539 ######################
541 gerrit_sonar_triggers:
542 - comment-added-contains-event:
543 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
545 #####################
546 # Job Configuration #
547 #####################
550 - lf-infra-gerrit-scm:
551 jenkins-ssh-credential: "{jenkins-ssh-credential}"
553 refspec: $GERRIT_REFSPEC
554 branch: $GERRIT_BRANCH
555 submodule-recursive: "{submodule-recursive}"
556 submodule-timeout: "{submodule-timeout}"
557 submodule-disable: "{submodule-disable}"
558 choosing-strategy: default
561 - timed: "{obj:cron}"
563 server-name: "{gerrit-server-name}"
564 trigger-on: "{obj:gerrit_sonar_triggers}"
566 - project-compare-type: "ANT"
567 project-pattern: "{project}"
569 - branch-compare-type: "ANT"
570 branch-pattern: "**/{branch}"
571 file-paths: "{obj:gerrit_trigger_file_paths}"
579 name: "{project-name}-tox-sonar"
581 <<: *lf_python_common
585 - lf-infra-properties:
586 build-days-to-keep: "{build-days-to-keep}"
588 url: "{github-url}/{github-org}/{project}"
591 - lf-infra-github-scm:
592 url: "{git-clone-url}{github-org}/{project}"
593 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
595 submodule-recursive: "{submodule-recursive}"
596 submodule-timeout: "{submodule-timeout}"
597 submodule-disable: "{submodule-disable}"
598 choosing-strategy: default
599 jenkins-ssh-credential: "{jenkins-ssh-credential}"
602 - github-pull-request:
603 trigger-phrase: "^run-sonar$"
604 only-trigger-phrase: false
605 status-context: "Python Sonar"
608 white-list-target-branches:
610 included-regions: "{obj:github_included_regions}"
616 - lf_tox_sonarqube: &lf_tox_sonarqube
617 name: lf-tox-sonarqube
619 ######################
620 # Default parameters #
621 ######################
625 branch: master # Sonar should always be run on master branch
626 build-days-to-keep: 7
630 git-url: "$GIT_URL/$PROJECT"
631 github-url: "https://github.com"
633 pre-build-script: "# pre-build script goes here"
634 python-version: python3
636 submodule-recursive: true
637 submodule-timeout: 10
638 submodule-disable: false
642 sonar-additional-args: ""
644 sonar-project-file: "sonar-project.properties"
648 #####################
649 # Job Configuration #
650 #####################
652 project-type: freestyle
654 disabled: "{disable-job}"
657 - lf-infra-properties:
658 build-days-to-keep: "{build-days-to-keep}"
662 build-timeout: "{build-timeout}"
663 jenkins-ssh-credential: "{jenkins-ssh-credential}"
666 - lf-infra-parameters:
670 - lf-infra-tox-parameters:
672 tox-envs: "{tox-envs}"
674 name: ARCHIVE_ARTIFACTS
675 default: "{archive-artifacts}"
676 description: Artifacts to archive to the logs server.
680 - lf-infra-tox-install:
681 python-version: "{python-version}"
682 - shell: "{pre-build-script}"
684 parallel: "{parallel}"
686 sonar-task: "{sonar-task}"
687 sonar-project-file: "{sonar-project-file}"
688 sonar-properties: "{sonar-properties}"
689 sonar-java-opts: "{sonar-java-opts}"
690 sonar-additional-args: "{sonar-additional-args}"
696 name: "{project-name}-tox-sonarqube"
697 id: gerrit-tox-sonarqube
699 <<: *lf_tox_sonarqube
701 ######################
702 # Default parameters #
703 ######################
705 gerrit_sonar_triggers:
706 - comment-added-contains-event:
707 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
710 - lf-infra-gerrit-scm:
711 branch: "$GERRIT_BRANCH"
712 jenkins-ssh-credential: "{jenkins-ssh-credential}"
714 refspec: "$GERRIT_REFSPEC"
715 submodule-recursive: "{submodule-recursive}"
716 submodule-timeout: "{submodule-timeout}"
717 submodule-disable: "{submodule-disable}"
718 choosing-strategy: default
721 - timed: "{obj:cron}"
723 server-name: "{gerrit-server-name}"
724 trigger-on: "{obj:gerrit_sonar_triggers}"
726 - project-compare-type: "ANT"
727 project-pattern: "{project}"
729 - branch-compare-type: "ANT"
730 branch-pattern: "**/{branch}"
733 name: "{project-name}-tox-sonarqube"
734 id: github-tox-sonarqube
736 <<: *lf_tox_sonarqube
739 - lf-infra-github-scm:
741 jenkins-ssh-credential: "{jenkins-ssh-credential}"
742 url: "{git-clone-url}{github-org}/{project}"
743 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
744 submodule-recursive: "{submodule-recursive}"
745 submodule-timeout: "{submodule-timeout}"
746 submodule-disable: "{submodule-disable}"
747 choosing-strategy: default
750 - github-pull-request:
751 trigger-phrase: "^run-sonar$"
752 only-trigger-phrase: false
753 status-context: "Tox Sonarqube"
756 white-list-target-branches:
763 - lf_tox_common: &lf_tox_common
766 ######################
767 # Default parameters #
768 ######################
771 build-days-to-keep: 7
774 git-url: "$GIT_URL/$GERRIT_PROJECT"
775 github-url: "https://github.com"
777 pre-build-script: "# pre-build script goes here"
778 python-version: python3
780 submodule-recursive: true
781 submodule-timeout: 10
782 submodule-disable: false
786 gerrit_trigger_file_paths:
787 - compare-type: REG_EXP
790 # github_included_regions MUST match gerrit_trigger_file_paths
791 github_included_regions:
794 #####################
795 # Job Configuration #
796 #####################
798 project-type: freestyle
801 disabled: "{disable-job}"
804 - lf-infra-properties:
805 build-days-to-keep: "{build-days-to-keep}"
808 - lf-infra-parameters:
812 - lf-infra-tox-parameters:
814 tox-envs: "{tox-envs}"
818 build-timeout: "{build-timeout}"
819 jenkins-ssh-credential: "{jenkins-ssh-credential}"
823 - lf-infra-tox-install:
824 python-version: "{python-version}"
825 - shell: "{pre-build-script}"
827 parallel: "{parallel}"
833 # Python projects typically use tox to run testing.
834 name: "{project-name}-tox-verify-{stream}"
835 id: gerrit-tox-verify
838 ######################
839 # Default parameters #
840 ######################
842 gerrit-skip-vote: false
843 gerrit_verify_triggers:
844 - patchset-created-event:
846 exclude-trivial-rebase: false
847 exclude-no-code-change: false
848 - draft-published-event
849 - comment-added-contains-event:
850 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
852 #####################
853 # Job Configuration #
854 #####################
857 - lf-infra-gerrit-scm:
858 jenkins-ssh-credential: "{jenkins-ssh-credential}"
860 refspec: "$GERRIT_REFSPEC"
861 branch: "$GERRIT_BRANCH"
862 submodule-recursive: "{submodule-recursive}"
863 submodule-timeout: "{submodule-timeout}"
864 submodule-disable: "{submodule-disable}"
865 choosing-strategy: gerrit
869 server-name: "{gerrit-server-name}"
870 trigger-on: "{obj:gerrit_verify_triggers}"
872 - project-compare-type: ANT
873 project-pattern: "{project}"
875 - branch-compare-type: ANT
876 branch-pattern: "**/{branch}"
877 file-paths: "{obj:gerrit_trigger_file_paths}"
879 successful: "{gerrit-skip-vote}"
880 failed: "{gerrit-skip-vote}"
881 unstable: "{gerrit-skip-vote}"
882 notbuilt: "{gerrit-skip-vote}"
885 # Python projects typically use tox to run testing.
886 name: "{project-name}-tox-verify-{stream}"
887 id: github-tox-verify
891 - lf-infra-properties:
892 build-days-to-keep: "{build-days-to-keep}"
894 url: "{github-url}/{github-org}/{project}"
897 - lf-infra-github-scm:
898 url: "{git-clone-url}{github-org}/{project}"
899 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
901 submodule-recursive: "{submodule-recursive}"
902 submodule-timeout: "{submodule-timeout}"
903 submodule-disable: "{submodule-disable}"
904 choosing-strategy: default
905 jenkins-ssh-credential: "{jenkins-ssh-credential}"
908 - github-pull-request:
909 trigger-phrase: "^(recheck|reverify)$"
910 only-trigger-phrase: false
911 status-context: "Tox Verify"
914 white-list-target-branches:
916 included-regions: "{obj:github_included_regions}"
919 # Run tox after merge of gerrit change set
920 name: "{project-name}-tox-merge-{stream}"
924 ######################
925 # Default parameters #
926 ######################
928 gerrit_merge_triggers:
929 - change-merged-event
930 - comment-added-contains-event:
931 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
933 #####################
934 # Job Configuration #
935 #####################
938 - lf-infra-gerrit-scm:
939 jenkins-ssh-credential: "{jenkins-ssh-credential}"
941 refspec: "$GERRIT_REFSPEC"
942 branch: "$GERRIT_BRANCH"
943 submodule-recursive: "{submodule-recursive}"
944 submodule-timeout: "{submodule-timeout}"
945 submodule-disable: "{submodule-disable}"
946 # merge jobs always build from tip
947 choosing-strategy: default
951 server-name: "{gerrit-server-name}"
952 trigger-on: "{obj:gerrit_merge_triggers}"
954 - project-compare-type: ANT
955 project-pattern: "{project}"
957 - branch-compare-type: ANT
958 branch-pattern: "**/{branch}"
959 file-paths: "{obj:gerrit_trigger_file_paths}"
962 # Run tox after merge of github pull request
963 name: "{project-name}-tox-merge-{stream}"
968 - lf-infra-properties:
969 build-days-to-keep: "{build-days-to-keep}"
971 url: "{github-url}/{github-org}/{project}"
974 - lf-infra-github-scm:
975 url: "{git-clone-url}{github-org}/{project}"
977 branch: "refs/heads/{branch}"
978 submodule-recursive: "{submodule-recursive}"
979 submodule-timeout: "{submodule-timeout}"
980 submodule-disable: "{submodule-disable}"
981 choosing-strategy: default
982 jenkins-ssh-credential: "{jenkins-ssh-credential}"
985 - github-pull-request:
986 trigger-phrase: "^remerge$"
987 only-trigger-phrase: true
988 status-context: "Tox Merge"
993 white-list: "{obj:github_pr_allowlist}"
994 admin-list: "{obj:github_pr_admin_list}"
995 white-list-target-branches:
997 included-regions: "{obj:github_included_regions}"
1003 - lf_pypi_common: &lf_pypi_common
1004 name: lf-pypi-common
1006 ######################
1007 # Default parameters #
1008 ######################
1010 archive-artifacts: >
1013 build-days-to-keep: 7
1017 git-url: "$GIT_URL/$GERRIT_PROJECT"
1018 github-url: "https://github.com"
1020 pre-build-script: "# pre-build script goes here"
1021 python-version: python3
1023 submodule-disable: false
1024 submodule-recursive: true
1025 submodule-timeout: 10
1029 gerrit_trigger_file_paths:
1030 - compare-type: REG_EXP
1033 # github_included_regions MUST match gerrit_trigger_file_paths
1034 github_included_regions:
1037 #####################
1038 # Job Configuration #
1039 #####################
1041 project-type: freestyle
1042 node: "{build-node}"
1043 disabled: "{disable-job}"
1046 - lf-infra-properties:
1047 build-days-to-keep: "{build-days-to-keep}"
1050 - lf-infra-parameters:
1051 project: "{project}"
1054 - lf-infra-tox-parameters:
1055 tox-dir: "{tox-dir}"
1056 tox-envs: "{tox-envs}"
1058 name: BUILD_BDIST_WHEEL
1059 default: "{dist-binary}"
1060 description: "Set to True (checked) to build a binary distribution"
1064 description: "Set to True (checked) to skip uploading artifacts"
1067 - lf-infra-wrappers:
1068 build-timeout: "{build-timeout}"
1069 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1074 - lf_pypi_verify_builders: &lf_pypi_verify_builders
1075 name: lf-pypi-verify-builders
1078 - lf-infra-pre-build
1079 - lf-infra-tox-install:
1080 python-version: "{python-version}"
1081 - shell: "{pre-build-script}"
1083 parallel: "{parallel}"
1084 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1086 - lf_pypi_publish_builders: &lf_pypi_publish_builders
1087 name: lf-pypi-publish-builders
1090 - lf-infra-pre-build
1091 - lf-infra-tox-install:
1092 python-version: "{python-version}"
1093 - shell: "{pre-build-script}"
1095 parallel: "{parallel}"
1096 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1097 - config-file-provider:
1100 target: "$HOME/.pypirc"
1102 properties-content: "REPOSITORY={pypi-repo}"
1103 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1106 name: "{project-name}-pypi-verify-{stream}"
1107 id: gerrit-pypi-verify
1109 <<: *lf_pypi_verify_builders
1112 - lf-infra-gerrit-scm:
1113 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1114 git-url: "{git-url}"
1115 refspec: "$GERRIT_REFSPEC"
1116 branch: "$GERRIT_BRANCH"
1117 submodule-recursive: "{submodule-recursive}"
1118 submodule-timeout: "{submodule-timeout}"
1119 submodule-disable: "{submodule-disable}"
1120 choosing-strategy: gerrit
1124 server-name: "{gerrit-server-name}"
1126 - patchset-created-event:
1127 exclude-drafts: true
1128 exclude-trivial-rebase: false
1129 exclude-no-code-change: false
1130 - draft-published-event
1131 - comment-added-contains-event:
1132 # yamllint disable-line rule:line-length
1133 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1135 - project-compare-type: ANT
1136 project-pattern: "{project}"
1138 - branch-compare-type: ANT
1139 branch-pattern: "**/{branch}"
1140 file-paths: "{obj:gerrit_trigger_file_paths}"
1143 name: "{project-name}-pypi-verify-{stream}"
1144 id: github-pypi-verify
1146 <<: *lf_pypi_verify_builders
1150 url: "{github-url}/{github-org}/{project}"
1153 - lf-infra-github-scm:
1154 url: "{git-clone-url}{github-org}/{project}"
1155 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1157 submodule-recursive: "{submodule-recursive}"
1158 submodule-timeout: "{submodule-timeout}"
1159 submodule-disable: "{submodule-disable}"
1160 choosing-strategy: default
1161 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1164 - github-pull-request:
1165 trigger-phrase: "^(recheck|reverify)$"
1166 only-trigger-phrase: false
1167 status-context: "PyPI Verify"
1170 white-list-target-branches:
1172 included-regions: "{obj:github_included_regions}"
1175 name: "{project-name}-pypi-merge-{stream}"
1176 id: gerrit-pypi-merge
1178 <<: *lf_pypi_publish_builders
1180 cron: "" # avoid for pypi which rejects duplicates
1181 pypi-repo: pypi-test
1184 - lf-infra-gerrit-scm:
1185 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1186 git-url: "{git-url}"
1187 refspec: "$GERRIT_REFSPEC"
1188 branch: "$GERRIT_BRANCH"
1189 submodule-recursive: "{submodule-recursive}"
1190 submodule-timeout: "{submodule-timeout}"
1191 submodule-disable: "{submodule-disable}"
1192 # merge jobs always build from tip
1193 choosing-strategy: default
1196 - timed: "{obj:cron}"
1198 server-name: "{gerrit-server-name}"
1200 - change-merged-event
1201 - comment-added-contains-event:
1202 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1204 - project-compare-type: ANT
1205 project-pattern: "{project}"
1207 - branch-compare-type: ANT
1208 branch-pattern: "**/{branch}"
1209 file-paths: "{obj:gerrit_trigger_file_paths}"
1212 name: "{project-name}-pypi-merge-{stream}"
1213 id: github-pypi-merge
1215 <<: *lf_pypi_publish_builders
1218 pypi-repo: pypi-test
1222 url: "{github-url}/{github-org}/{project}"
1225 - lf-infra-github-scm:
1226 url: "{git-clone-url}{github-org}/{project}"
1228 branch: "refs/heads/{branch}"
1229 submodule-recursive: "{submodule-recursive}"
1230 submodule-timeout: "{submodule-timeout}"
1231 submodule-disable: "{submodule-disable}"
1232 choosing-strategy: default
1233 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1236 - timed: "{obj:cron}"
1237 - github-pull-request:
1238 trigger-phrase: "^remerge$"
1239 only-trigger-phrase: false
1240 status-context: "Merge"
1245 white-list: "{obj:github_pr_allowlist}"
1246 admin-list: "{obj:github_pr_admin_list}"
1247 white-list-target-branches:
1249 included-regions: "{obj:github_included_regions}"
1252 name: "{project-name}-pypi-stage-{stream}"
1253 id: gerrit-pypi-stage
1255 <<: *lf_pypi_publish_builders
1258 pypi-repo: pypi-test
1260 gerrit_stage_triggers:
1261 - comment-added-contains-event:
1262 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1265 - lf-infra-gerrit-scm:
1266 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1267 git-url: "{git-url}"
1268 refspec: "$GERRIT_REFSPEC"
1269 branch: "$GERRIT_BRANCH"
1270 submodule-recursive: "{submodule-recursive}"
1271 submodule-timeout: "{submodule-timeout}"
1272 submodule-disable: "{submodule-disable}"
1273 # stage jobs always build from tip
1274 choosing-strategy: default
1277 - timed: "{obj:cron}"
1279 server-name: "{gerrit-server-name}"
1280 trigger-on: "{obj:gerrit_stage_triggers}"
1282 - project-compare-type: ANT
1283 project-pattern: "{project}"
1285 - branch-compare-type: ANT
1286 branch-pattern: "**/{branch}"
1287 file-paths: "{obj:gerrit_trigger_file_paths}"
1290 name: "{project-name}-pypi-stage-{stream}"
1291 id: github-pypi-stage
1293 <<: *lf_pypi_publish_builders
1296 pypi-repo: pypi-test
1300 url: "{github-url}/{github-org}/{project}"
1303 - lf-infra-github-scm:
1304 url: "{git-clone-url}{github-org}/{project}"
1306 branch: "refs/heads/{branch}"
1307 submodule-recursive: "{submodule-recursive}"
1308 submodule-timeout: "{submodule-timeout}"
1309 submodule-disable: "{submodule-disable}"
1310 choosing-strategy: default
1311 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1314 - timed: "{obj:cron}"
1315 - github-pull-request:
1316 trigger-phrase: "^stage-release$"
1317 only-trigger-phrase: true
1318 status-context: "Release"
1321 white-list-target-branches:
1323 included-regions: "{obj:github_included_regions}"