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:
234 - lf_python_snyk_cli: &lf_python_snyk_cli
235 name: lf-python-snyk_cli
237 ######################
238 # Default parameters #
239 ######################
242 build-days-to-keep: 30 # 30 days for troubleshooting purposes
245 git-url: "$GIT_URL/$PROJECT"
246 github-url: "https://github.com"
247 java-version: openjdk11
249 pre-build-script: "# pre-build script goes here"
250 python-version: python3
252 snyk-token-credential-id: snyk-token
253 snyk-org-credential-id: snyk-org
255 submodule-recursive: true
256 submodule-timeout: 10
257 submodule-disable: false
261 gerrit_snyk_triggers:
262 - comment-added-contains-event:
263 comment-contains-value: '^Patch Set\s+\d+:\s+run-snyk\s*$'
266 - lf-infra-parameters:
271 name: SNYK_CLI_OPTIONS
272 default: "{snyk-cli-options}"
273 description: Additional Snyk CLI commands and options
274 - lf-infra-tox-parameters:
276 tox-envs: "{tox-envs}"
279 - credentials-binding:
281 credential-id: "{snyk-token-credential-id}"
284 credential-id: "{snyk-org-credential-id}"
287 #####################
288 # Job Configuration #
289 #####################
291 disabled: "{disable-job}"
295 - lf-infra-tox-install:
296 python-version: "{python-version}"
297 - shell: "{pre-build-script}"
299 parallel: "{parallel}"
300 - lf-infra-snyk-cli-scanner
303 name: "{project-name}-python-snyk-cli-{stream}"
304 id: gerrit-python-snyk-cli
305 # yamllint disable-line rule:key-duplicates
306 <<: *lf_python_snyk_cli
309 - lf-infra-gerrit-scm:
310 jenkins-ssh-credential: "{jenkins-ssh-credential}"
312 refspec: "$GERRIT_REFSPEC"
313 branch: "$GERRIT_BRANCH"
314 submodule-recursive: "{submodule-recursive}"
315 submodule-timeout: "{submodule-timeout}"
316 submodule-disable: "{submodule-disable}"
317 choosing-strategy: default
320 # Build weekly on Saturdays
323 server-name: "{gerrit-server-name}"
324 trigger-on: "{obj:gerrit_snyk_triggers}"
326 - project-compare-type: ANT
327 project-pattern: "{project}"
329 - branch-compare-type: ANT
330 branch-pattern: "**/{branch}"
338 name: "{project-name}-python-snyk-cli-{stream}"
339 id: github-python-snyk-cli
340 # yamllint disable-line rule:key-duplicates
341 <<: *lf_python_snyk_cli
344 - lf-infra-properties:
345 build-days-to-keep: "{build-days-to-keep}"
347 url: "{github-url}/{github-org}/{project}"
350 - lf-infra-github-scm:
351 url: "{git-clone-url}{github-org}/{project}"
353 branch: "refs/heads/{branch}"
354 submodule-recursive: "{submodule-recursive}"
355 submodule-timeout: "{submodule-timeout}"
356 submodule-disable: "{submodule-disable}"
357 choosing-strategy: default
358 jenkins-ssh-credential: "{jenkins-ssh-credential}"
361 # Build weekly on Saturdays
363 - github-pull-request:
364 trigger-phrase: "^run-snyk$"
365 only-trigger-phrase: true
366 status-context: "SNYK scan"
371 white-list: "{obj:github_pr_allowlist}"
372 admin-list: "{obj:github_pr_admin_list}"
373 white-list-target-branches:
376 #########################
377 # Python Sonar with CLI #
378 #########################
380 - lf_cli_sonar: &lf_cli_sonar
383 ######################
384 # Default parameters #
385 ######################
387 branch: master # Sonar should always be run on master branch
388 build-days-to-keep: 7
390 cron: "H H * * *" # run daily
392 git-url: "$GIT_URL/$PROJECT"
393 github-url: "https://github.com"
394 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
395 # Projects not compatible with jdk11 can set java-version to something else
396 java-version: openjdk11
398 pre-build-script: "# pre-build script goes here"
399 python-version: python3
401 sonar-scanner-version: "4.7.0.2747"
402 sonar-scanner-home: "$WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
403 sonar-scanner-opts: "-server"
404 submodule-recursive: true
405 submodule-timeout: 10
406 submodule-disable: false
410 gerrit_trigger_file_paths:
411 - compare-type: REG_EXP
414 # github_included_regions MUST match gerrit_trigger_file_paths
415 github_included_regions:
418 #####################
419 # Job Configuration #
420 #####################
422 disabled: "{disable-job}"
425 - lf-infra-parameters:
429 - lf-infra-sonar-cli-parameters:
431 tox-envs: "{tox-envs}"
432 sonar-scanner-version: "{sonar-scanner-version}"
433 sonar-scanner-home: "{sonar-scanner-home}"
434 sonar-scanner-opts: "{sonar-scanner-opts}"
436 name: ARCHIVE_ARTIFACTS
437 default: "{archive-artifacts}"
438 description: Artifacts to archive to the logs server.
440 - credentials-binding:
442 credential-id: sonar-token-{project-name}
443 variable: SONAR_TOKEN
446 - lf-infra-tox-install:
447 python-version: "{python-version}"
448 - shell: "{pre-build-script}"
450 parallel: "{parallel}"
453 properties-content: |
454 SONARCLOUD_PROJECT_ORGANIZATION={sonarcloud-project-organization}
455 SONARCLOUD_PROJECT_KEY={sonarcloud-project-key}
456 - shell: !include-raw-escape: ../shell/sonar-cli.sh
462 name: "{project-name}-cli-sonar"
464 <<: *lf_python_common
467 ######################
468 # Default parameters #
469 ######################
471 gerrit_sonar_triggers:
472 - comment-added-contains-event:
473 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
475 #####################
476 # Job Configuration #
477 #####################
480 - lf-infra-gerrit-scm:
481 jenkins-ssh-credential: "{jenkins-ssh-credential}"
483 refspec: $GERRIT_REFSPEC
484 branch: $GERRIT_BRANCH
485 submodule-recursive: "{submodule-recursive}"
486 submodule-timeout: "{submodule-timeout}"
487 submodule-disable: "{submodule-disable}"
488 choosing-strategy: default
491 - timed: "{obj:cron}"
493 server-name: "{gerrit-server-name}"
494 trigger-on: "{obj:gerrit_sonar_triggers}"
496 - project-compare-type: "ANT"
497 project-pattern: "{project}"
499 - branch-compare-type: "ANT"
500 branch-pattern: "**/{branch}"
501 file-paths: "{obj:gerrit_trigger_file_paths}"
509 name: "{project-name}-cli-sonar"
511 <<: *lf_python_common
515 - lf-infra-properties:
516 build-days-to-keep: "{build-days-to-keep}"
518 url: "{github-url}/{github-org}/{project}"
521 - lf-infra-github-scm:
522 url: "{git-clone-url}{github-org}/{project}"
523 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
525 submodule-recursive: "{submodule-recursive}"
526 submodule-timeout: "{submodule-timeout}"
527 submodule-disable: "{submodule-disable}"
528 choosing-strategy: default
529 jenkins-ssh-credential: "{jenkins-ssh-credential}"
532 - github-pull-request:
533 trigger-phrase: "^run-sonar$"
534 only-trigger-phrase: false
535 status-context: "Python Sonar"
538 white-list-target-branches:
540 included-regions: "{obj:github_included_regions}"
542 #########################
543 # Python Sonar with Tox #
544 #########################
546 - lf_tox_sonar: &lf_tox_sonar
549 ######################
550 # Default parameters #
551 ######################
553 branch: master # Sonar should always be run on master branch
554 build-days-to-keep: 7
556 cron: "H H * * *" # run daily
558 git-url: "$GIT_URL/$PROJECT"
559 github-url: "https://github.com"
560 java-version: openjdk11
561 mvn-global-settings: global-settings
565 mvn-settings: "{mvn-settings}"
568 pre-build-script: "# pre-build script goes here"
569 python-version: python3
570 sonar-mvn-goal: "sonar:sonar"
572 sonarcloud-project-key: ""
573 sonarcloud-project-organization: ""
574 sonarcloud-api-token-cred-id: sonarcloud-api-token
575 sonarcloud-qualitygate-wait: false
576 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
577 # Projects not compatible with jdk11 can set java-version to something else
578 sonarcloud-java-version: openjdk11
580 submodule-recursive: true
581 submodule-timeout: 10
582 submodule-disable: false
585 scan-dev-branch: false
587 gerrit_trigger_file_paths:
588 - compare-type: REG_EXP
591 # github_included_regions MUST match gerrit_trigger_file_paths
592 github_included_regions:
595 #####################
596 # Job Configuration #
597 #####################
599 disabled: "{disable-job}"
602 - lf-infra-parameters:
606 - lf-infra-maven-parameters:
607 mvn-opts: "{mvn-opts}"
608 mvn-params: "{mvn-params}"
609 mvn-version: "{mvn-version}"
610 - lf-infra-tox-parameters:
612 tox-envs: "{tox-envs}"
614 name: ARCHIVE_ARTIFACTS
615 default: "{archive-artifacts}"
616 description: Artifacts to archive to the logs server.
619 # Sets an env var for shell scripts to be able to call the dynamically
620 # installed maven without having to calculate the path themselves.
621 # yamllint disable-line rule:line-length
622 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
623 description: "Maven selector to be used by shell scripts"
625 name: SONAR_MAVEN_GOAL
626 default: "{sonar-mvn-goal}"
628 Maven goals to pass to the Sonar call. Typically sonar:sonar
629 however to use a specific version of the sonar-maven-plugin we
630 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
633 - credentials-binding:
635 credential-id: '{sonarcloud-api-token-cred-id}'
640 - lf-infra-tox-install:
641 python-version: "{python-version}"
642 - shell: "{pre-build-script}"
644 parallel: "{parallel}"
645 - lf-provide-maven-settings:
646 global-settings-file: "{mvn-global-settings}"
647 settings-file: "{mvn-settings}"
650 condition-kind: boolean-expression
651 condition-expression: "{sonarcloud}"
653 - shell: echo 'Using SonarCloud'
654 - lf-infra-maven-sonarcloud:
655 java-version: "{java-version}"
656 mvn-goals: "{mvn-goals}"
657 mvn-settings: "{mvn-settings}"
658 mvn-version: "{mvn-version}"
659 sonarcloud-project-key: "{sonarcloud-project-key}"
660 # yamllint disable-line rule:line-length
661 sonarcloud-project-organization: "{sonarcloud-project-organization}"
662 sonarcloud-java-version: "{sonarcloud-java-version}"
663 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
664 scan-dev-branch: "{scan-dev-branch}"
669 condition-kind: boolean-expression
670 condition-expression: "{sonarcloud}"
672 - shell: echo 'Using SonarQube'
673 - lf-infra-maven-sonar:
674 java-version: "{java-version}"
675 mvn-goals: "{mvn-goals}"
676 mvn-settings: "{mvn-settings}"
677 mvn-version: "{mvn-version}"
683 name: "{project-name}-tox-sonar"
685 <<: *lf_python_common
688 ######################
689 # Default parameters #
690 ######################
692 gerrit_sonar_triggers:
693 - comment-added-contains-event:
694 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
696 #####################
697 # Job Configuration #
698 #####################
701 - lf-infra-gerrit-scm:
702 jenkins-ssh-credential: "{jenkins-ssh-credential}"
704 refspec: $GERRIT_REFSPEC
705 branch: $GERRIT_BRANCH
706 submodule-recursive: "{submodule-recursive}"
707 submodule-timeout: "{submodule-timeout}"
708 submodule-disable: "{submodule-disable}"
709 choosing-strategy: default
712 - timed: "{obj:cron}"
714 server-name: "{gerrit-server-name}"
715 trigger-on: "{obj:gerrit_sonar_triggers}"
717 - project-compare-type: "ANT"
718 project-pattern: "{project}"
720 - branch-compare-type: "ANT"
721 branch-pattern: "**/{branch}"
722 file-paths: "{obj:gerrit_trigger_file_paths}"
730 name: "{project-name}-tox-sonar"
732 <<: *lf_python_common
736 - lf-infra-properties:
737 build-days-to-keep: "{build-days-to-keep}"
739 url: "{github-url}/{github-org}/{project}"
742 - lf-infra-github-scm:
743 url: "{git-clone-url}{github-org}/{project}"
744 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
746 submodule-recursive: "{submodule-recursive}"
747 submodule-timeout: "{submodule-timeout}"
748 submodule-disable: "{submodule-disable}"
749 choosing-strategy: default
750 jenkins-ssh-credential: "{jenkins-ssh-credential}"
753 - github-pull-request:
754 trigger-phrase: "^run-sonar$"
755 only-trigger-phrase: false
756 status-context: "Python Sonar"
759 white-list-target-branches:
761 included-regions: "{obj:github_included_regions}"
767 - lf_tox_sonarqube: &lf_tox_sonarqube
768 name: lf-tox-sonarqube
770 ######################
771 # Default parameters #
772 ######################
776 branch: master # Sonar should always be run on master branch
777 build-days-to-keep: 7
781 git-url: "$GIT_URL/$PROJECT"
782 github-url: "https://github.com"
784 pre-build-script: "# pre-build script goes here"
785 python-version: python3
787 submodule-recursive: true
788 submodule-timeout: 10
789 submodule-disable: false
793 sonar-additional-args: ""
795 sonar-project-file: "sonar-project.properties"
799 #####################
800 # Job Configuration #
801 #####################
803 project-type: freestyle
805 disabled: "{disable-job}"
808 - lf-infra-properties:
809 build-days-to-keep: "{build-days-to-keep}"
813 build-timeout: "{build-timeout}"
814 jenkins-ssh-credential: "{jenkins-ssh-credential}"
817 - lf-infra-parameters:
821 - lf-infra-tox-parameters:
823 tox-envs: "{tox-envs}"
825 name: ARCHIVE_ARTIFACTS
826 default: "{archive-artifacts}"
827 description: Artifacts to archive to the logs server.
831 - lf-infra-tox-install:
832 python-version: "{python-version}"
833 - shell: "{pre-build-script}"
835 parallel: "{parallel}"
837 sonar-task: "{sonar-task}"
838 sonar-project-file: "{sonar-project-file}"
839 sonar-properties: "{sonar-properties}"
840 sonar-java-opts: "{sonar-java-opts}"
841 sonar-additional-args: "{sonar-additional-args}"
847 name: "{project-name}-tox-sonarqube"
848 id: gerrit-tox-sonarqube
850 <<: *lf_tox_sonarqube
852 ######################
853 # Default parameters #
854 ######################
856 gerrit_sonar_triggers:
857 - comment-added-contains-event:
858 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
861 - lf-infra-gerrit-scm:
862 branch: "$GERRIT_BRANCH"
863 jenkins-ssh-credential: "{jenkins-ssh-credential}"
865 refspec: "$GERRIT_REFSPEC"
866 submodule-recursive: "{submodule-recursive}"
867 submodule-timeout: "{submodule-timeout}"
868 submodule-disable: "{submodule-disable}"
869 choosing-strategy: default
872 - timed: "{obj:cron}"
874 server-name: "{gerrit-server-name}"
875 trigger-on: "{obj:gerrit_sonar_triggers}"
877 - project-compare-type: "ANT"
878 project-pattern: "{project}"
880 - branch-compare-type: "ANT"
881 branch-pattern: "**/{branch}"
884 name: "{project-name}-tox-sonarqube"
885 id: github-tox-sonarqube
887 <<: *lf_tox_sonarqube
890 - lf-infra-github-scm:
892 jenkins-ssh-credential: "{jenkins-ssh-credential}"
893 url: "{git-clone-url}{github-org}/{project}"
894 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
895 submodule-recursive: "{submodule-recursive}"
896 submodule-timeout: "{submodule-timeout}"
897 submodule-disable: "{submodule-disable}"
898 choosing-strategy: default
901 - github-pull-request:
902 trigger-phrase: "^run-sonar$"
903 only-trigger-phrase: false
904 status-context: "Tox Sonarqube"
907 white-list-target-branches:
914 - lf_tox_common: &lf_tox_common
917 ######################
918 # Default parameters #
919 ######################
922 build-days-to-keep: 7
925 git-url: "$GIT_URL/$GERRIT_PROJECT"
926 github-url: "https://github.com"
928 pre-build-script: "# pre-build script goes here"
929 python-version: python3
931 submodule-recursive: true
932 submodule-timeout: 10
933 submodule-disable: false
937 gerrit_trigger_file_paths:
938 - compare-type: REG_EXP
941 # github_included_regions MUST match gerrit_trigger_file_paths
942 github_included_regions:
945 #####################
946 # Job Configuration #
947 #####################
949 project-type: freestyle
952 disabled: "{disable-job}"
955 - lf-infra-properties:
956 build-days-to-keep: "{build-days-to-keep}"
959 - lf-infra-parameters:
963 - lf-infra-tox-parameters:
965 tox-envs: "{tox-envs}"
969 build-timeout: "{build-timeout}"
970 jenkins-ssh-credential: "{jenkins-ssh-credential}"
974 - lf-infra-tox-install:
975 python-version: "{python-version}"
976 - shell: "{pre-build-script}"
978 parallel: "{parallel}"
984 # Python projects typically use tox to run testing.
985 name: "{project-name}-tox-verify-{stream}"
986 id: gerrit-tox-verify
989 ######################
990 # Default parameters #
991 ######################
993 gerrit-skip-vote: false
994 gerrit_verify_triggers:
995 - patchset-created-event:
997 exclude-trivial-rebase: false
998 exclude-no-code-change: false
999 - draft-published-event
1000 - comment-added-contains-event:
1001 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1003 #####################
1004 # Job Configuration #
1005 #####################
1008 - lf-infra-gerrit-scm:
1009 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1010 git-url: "{git-url}"
1011 refspec: "$GERRIT_REFSPEC"
1012 branch: "$GERRIT_BRANCH"
1013 submodule-recursive: "{submodule-recursive}"
1014 submodule-timeout: "{submodule-timeout}"
1015 submodule-disable: "{submodule-disable}"
1016 choosing-strategy: gerrit
1020 server-name: "{gerrit-server-name}"
1021 trigger-on: "{obj:gerrit_verify_triggers}"
1023 - project-compare-type: ANT
1024 project-pattern: "{project}"
1026 - branch-compare-type: ANT
1027 branch-pattern: "**/{branch}"
1028 file-paths: "{obj:gerrit_trigger_file_paths}"
1030 successful: "{gerrit-skip-vote}"
1031 failed: "{gerrit-skip-vote}"
1032 unstable: "{gerrit-skip-vote}"
1033 notbuilt: "{gerrit-skip-vote}"
1036 # Python projects typically use tox to run testing.
1037 name: "{project-name}-tox-verify-{stream}"
1038 id: github-tox-verify
1042 - lf-infra-properties:
1043 build-days-to-keep: "{build-days-to-keep}"
1045 url: "{github-url}/{github-org}/{project}"
1048 - lf-infra-github-scm:
1049 url: "{git-clone-url}{github-org}/{project}"
1050 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1052 submodule-recursive: "{submodule-recursive}"
1053 submodule-timeout: "{submodule-timeout}"
1054 submodule-disable: "{submodule-disable}"
1055 choosing-strategy: default
1056 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1059 - github-pull-request:
1060 trigger-phrase: "^(recheck|reverify)$"
1061 only-trigger-phrase: false
1062 status-context: "Tox Verify"
1065 white-list-target-branches:
1067 included-regions: "{obj:github_included_regions}"
1070 # Run tox after merge of gerrit change set
1071 name: "{project-name}-tox-merge-{stream}"
1072 id: gerrit-tox-merge
1075 ######################
1076 # Default parameters #
1077 ######################
1079 gerrit_merge_triggers:
1080 - change-merged-event
1081 - comment-added-contains-event:
1082 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1084 #####################
1085 # Job Configuration #
1086 #####################
1089 - lf-infra-gerrit-scm:
1090 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1091 git-url: "{git-url}"
1092 refspec: "$GERRIT_REFSPEC"
1093 branch: "$GERRIT_BRANCH"
1094 submodule-recursive: "{submodule-recursive}"
1095 submodule-timeout: "{submodule-timeout}"
1096 submodule-disable: "{submodule-disable}"
1097 # merge jobs always build from tip
1098 choosing-strategy: default
1102 server-name: "{gerrit-server-name}"
1103 trigger-on: "{obj:gerrit_merge_triggers}"
1105 - project-compare-type: ANT
1106 project-pattern: "{project}"
1108 - branch-compare-type: ANT
1109 branch-pattern: "**/{branch}"
1110 file-paths: "{obj:gerrit_trigger_file_paths}"
1113 # Run tox after merge of github pull request
1114 name: "{project-name}-tox-merge-{stream}"
1115 id: github-tox-merge
1119 - lf-infra-properties:
1120 build-days-to-keep: "{build-days-to-keep}"
1122 url: "{github-url}/{github-org}/{project}"
1125 - lf-infra-github-scm:
1126 url: "{git-clone-url}{github-org}/{project}"
1128 branch: "refs/heads/{branch}"
1129 submodule-recursive: "{submodule-recursive}"
1130 submodule-timeout: "{submodule-timeout}"
1131 submodule-disable: "{submodule-disable}"
1132 choosing-strategy: default
1133 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1136 - github-pull-request:
1137 trigger-phrase: "^remerge$"
1138 only-trigger-phrase: true
1139 status-context: "Tox Merge"
1144 white-list: "{obj:github_pr_allowlist}"
1145 admin-list: "{obj:github_pr_admin_list}"
1146 white-list-target-branches:
1148 included-regions: "{obj:github_included_regions}"
1154 - lf_pypi_common: &lf_pypi_common
1155 name: lf-pypi-common
1157 ######################
1158 # Default parameters #
1159 ######################
1161 archive-artifacts: >
1164 build-days-to-keep: 7
1168 git-url: "$GIT_URL/$GERRIT_PROJECT"
1169 github-url: "https://github.com"
1171 pre-build-script: "# pre-build script goes here"
1172 python-version: python3
1174 submodule-disable: false
1175 submodule-recursive: true
1176 submodule-timeout: 10
1180 gerrit_trigger_file_paths:
1181 - compare-type: REG_EXP
1184 # github_included_regions MUST match gerrit_trigger_file_paths
1185 github_included_regions:
1188 #####################
1189 # Job Configuration #
1190 #####################
1192 project-type: freestyle
1193 node: "{build-node}"
1194 disabled: "{disable-job}"
1197 - lf-infra-properties:
1198 build-days-to-keep: "{build-days-to-keep}"
1201 - lf-infra-parameters:
1202 project: "{project}"
1205 - lf-infra-tox-parameters:
1206 tox-dir: "{tox-dir}"
1207 tox-envs: "{tox-envs}"
1209 name: BUILD_BDIST_WHEEL
1210 default: "{dist-binary}"
1211 description: "Set to True (checked) to build a binary distribution"
1215 description: "Set to True (checked) to skip uploading artifacts"
1218 - lf-infra-wrappers:
1219 build-timeout: "{build-timeout}"
1220 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1225 - lf_pypi_verify_builders: &lf_pypi_verify_builders
1226 name: lf-pypi-verify-builders
1229 - lf-infra-pre-build
1230 - lf-infra-tox-install:
1231 python-version: "{python-version}"
1232 - shell: "{pre-build-script}"
1234 parallel: "{parallel}"
1235 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1237 - lf_pypi_publish_builders: &lf_pypi_publish_builders
1238 name: lf-pypi-publish-builders
1241 - lf-infra-pre-build
1242 - lf-infra-tox-install:
1243 python-version: "{python-version}"
1244 - shell: "{pre-build-script}"
1246 parallel: "{parallel}"
1247 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1248 - config-file-provider:
1251 target: "$HOME/.pypirc"
1253 properties-content: "REPOSITORY={pypi-repo}"
1254 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1257 name: "{project-name}-pypi-verify-{stream}"
1258 id: gerrit-pypi-verify
1260 <<: *lf_pypi_verify_builders
1263 - lf-infra-gerrit-scm:
1264 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1265 git-url: "{git-url}"
1266 refspec: "$GERRIT_REFSPEC"
1267 branch: "$GERRIT_BRANCH"
1268 submodule-recursive: "{submodule-recursive}"
1269 submodule-timeout: "{submodule-timeout}"
1270 submodule-disable: "{submodule-disable}"
1271 choosing-strategy: gerrit
1275 server-name: "{gerrit-server-name}"
1277 - patchset-created-event:
1278 exclude-drafts: true
1279 exclude-trivial-rebase: false
1280 exclude-no-code-change: false
1281 - draft-published-event
1282 - comment-added-contains-event:
1283 # yamllint disable-line rule:line-length
1284 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1286 - project-compare-type: ANT
1287 project-pattern: "{project}"
1289 - branch-compare-type: ANT
1290 branch-pattern: "**/{branch}"
1291 file-paths: "{obj:gerrit_trigger_file_paths}"
1294 name: "{project-name}-pypi-verify-{stream}"
1295 id: github-pypi-verify
1297 <<: *lf_pypi_verify_builders
1301 url: "{github-url}/{github-org}/{project}"
1304 - lf-infra-github-scm:
1305 url: "{git-clone-url}{github-org}/{project}"
1306 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1308 submodule-recursive: "{submodule-recursive}"
1309 submodule-timeout: "{submodule-timeout}"
1310 submodule-disable: "{submodule-disable}"
1311 choosing-strategy: default
1312 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1315 - github-pull-request:
1316 trigger-phrase: "^(recheck|reverify)$"
1317 only-trigger-phrase: false
1318 status-context: "PyPI Verify"
1321 white-list-target-branches:
1323 included-regions: "{obj:github_included_regions}"
1326 name: "{project-name}-pypi-merge-{stream}"
1327 id: gerrit-pypi-merge
1329 <<: *lf_pypi_publish_builders
1331 cron: "" # avoid for pypi which rejects duplicates
1332 pypi-repo: pypi-test
1335 - lf-infra-gerrit-scm:
1336 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1337 git-url: "{git-url}"
1338 refspec: "$GERRIT_REFSPEC"
1339 branch: "$GERRIT_BRANCH"
1340 submodule-recursive: "{submodule-recursive}"
1341 submodule-timeout: "{submodule-timeout}"
1342 submodule-disable: "{submodule-disable}"
1343 # merge jobs always build from tip
1344 choosing-strategy: default
1347 - timed: "{obj:cron}"
1349 server-name: "{gerrit-server-name}"
1351 - change-merged-event
1352 - comment-added-contains-event:
1353 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1355 - project-compare-type: ANT
1356 project-pattern: "{project}"
1358 - branch-compare-type: ANT
1359 branch-pattern: "**/{branch}"
1360 file-paths: "{obj:gerrit_trigger_file_paths}"
1363 name: "{project-name}-pypi-merge-{stream}"
1364 id: github-pypi-merge
1366 <<: *lf_pypi_publish_builders
1369 pypi-repo: pypi-test
1373 url: "{github-url}/{github-org}/{project}"
1376 - lf-infra-github-scm:
1377 url: "{git-clone-url}{github-org}/{project}"
1379 branch: "refs/heads/{branch}"
1380 submodule-recursive: "{submodule-recursive}"
1381 submodule-timeout: "{submodule-timeout}"
1382 submodule-disable: "{submodule-disable}"
1383 choosing-strategy: default
1384 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1387 - timed: "{obj:cron}"
1388 - github-pull-request:
1389 trigger-phrase: "^remerge$"
1390 only-trigger-phrase: false
1391 status-context: "Merge"
1396 white-list: "{obj:github_pr_allowlist}"
1397 admin-list: "{obj:github_pr_admin_list}"
1398 white-list-target-branches:
1400 included-regions: "{obj:github_included_regions}"
1403 name: "{project-name}-pypi-stage-{stream}"
1404 id: gerrit-pypi-stage
1406 <<: *lf_pypi_publish_builders
1409 pypi-repo: pypi-test
1411 gerrit_stage_triggers:
1412 - comment-added-contains-event:
1413 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1416 - lf-infra-gerrit-scm:
1417 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1418 git-url: "{git-url}"
1419 refspec: "$GERRIT_REFSPEC"
1420 branch: "$GERRIT_BRANCH"
1421 submodule-recursive: "{submodule-recursive}"
1422 submodule-timeout: "{submodule-timeout}"
1423 submodule-disable: "{submodule-disable}"
1424 # stage jobs always build from tip
1425 choosing-strategy: default
1428 - timed: "{obj:cron}"
1430 server-name: "{gerrit-server-name}"
1431 trigger-on: "{obj:gerrit_stage_triggers}"
1433 - project-compare-type: ANT
1434 project-pattern: "{project}"
1436 - branch-compare-type: ANT
1437 branch-pattern: "**/{branch}"
1438 file-paths: "{obj:gerrit_trigger_file_paths}"
1441 name: "{project-name}-pypi-stage-{stream}"
1442 id: github-pypi-stage
1444 <<: *lf_pypi_publish_builders
1447 pypi-repo: pypi-test
1451 url: "{github-url}/{github-org}/{project}"
1454 - lf-infra-github-scm:
1455 url: "{git-clone-url}{github-org}/{project}"
1457 branch: "refs/heads/{branch}"
1458 submodule-recursive: "{submodule-recursive}"
1459 submodule-timeout: "{submodule-timeout}"
1460 submodule-disable: "{submodule-disable}"
1461 choosing-strategy: default
1462 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1465 - timed: "{obj:cron}"
1466 - github-pull-request:
1467 trigger-phrase: "^stage-release$"
1468 only-trigger-phrase: true
1469 status-context: "Release"
1472 white-list-target-branches:
1474 included-regions: "{obj:github_included_regions}"