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 # Projects not compatible with jdk13 can set java-version to something else
395 java-version: openjdk13
397 pre-build-script: "# pre-build script goes here"
398 python-version: python3
400 sonar-scanner-version: "4.7.0.2747"
401 sonar-scanner-home: "$WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
402 sonar-scanner-opts: "-server"
403 submodule-recursive: true
404 submodule-timeout: 10
405 submodule-disable: false
409 gerrit_trigger_file_paths:
410 - compare-type: REG_EXP
413 # github_included_regions MUST match gerrit_trigger_file_paths
414 github_included_regions:
417 #####################
418 # Job Configuration #
419 #####################
421 disabled: "{disable-job}"
424 - lf-infra-parameters:
428 - lf-infra-sonar-cli-parameters:
430 tox-envs: "{tox-envs}"
431 sonar-scanner-version: "{sonar-scanner-version}"
432 sonar-scanner-home: "{sonar-scanner-home}"
433 sonar-scanner-opts: "{sonar-scanner-opts}"
435 name: ARCHIVE_ARTIFACTS
436 default: "{archive-artifacts}"
437 description: Artifacts to archive to the logs server.
439 - credentials-binding:
441 credential-id: sonar-token-{project-name}
442 variable: SONAR_TOKEN
445 - lf-infra-tox-install:
446 python-version: "{python-version}"
447 - shell: "{pre-build-script}"
449 parallel: "{parallel}"
452 properties-content: |
453 SONARCLOUD_PROJECT_ORGANIZATION={sonarcloud-project-organization}
454 SONARCLOUD_PROJECT_KEY={sonarcloud-project-key}
455 - shell: !include-raw-escape: ../shell/sonar-cli.sh
461 name: "{project-name}-cli-sonar"
463 <<: *lf_python_common
466 ######################
467 # Default parameters #
468 ######################
470 gerrit_sonar_triggers:
471 - comment-added-contains-event:
472 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
474 #####################
475 # Job Configuration #
476 #####################
479 - lf-infra-gerrit-scm:
480 jenkins-ssh-credential: "{jenkins-ssh-credential}"
482 refspec: $GERRIT_REFSPEC
483 branch: $GERRIT_BRANCH
484 submodule-recursive: "{submodule-recursive}"
485 submodule-timeout: "{submodule-timeout}"
486 submodule-disable: "{submodule-disable}"
487 choosing-strategy: default
490 - timed: "{obj:cron}"
492 server-name: "{gerrit-server-name}"
493 trigger-on: "{obj:gerrit_sonar_triggers}"
495 - project-compare-type: "ANT"
496 project-pattern: "{project}"
498 - branch-compare-type: "ANT"
499 branch-pattern: "**/{branch}"
500 file-paths: "{obj:gerrit_trigger_file_paths}"
508 name: "{project-name}-cli-sonar"
510 <<: *lf_python_common
514 - lf-infra-properties:
515 build-days-to-keep: "{build-days-to-keep}"
517 url: "{github-url}/{github-org}/{project}"
520 - lf-infra-github-scm:
521 url: "{git-clone-url}{github-org}/{project}"
522 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
524 submodule-recursive: "{submodule-recursive}"
525 submodule-timeout: "{submodule-timeout}"
526 submodule-disable: "{submodule-disable}"
527 choosing-strategy: default
528 jenkins-ssh-credential: "{jenkins-ssh-credential}"
531 - github-pull-request:
532 trigger-phrase: "^run-sonar$"
533 only-trigger-phrase: false
534 status-context: "Python Sonar"
537 white-list-target-branches:
539 included-regions: "{obj:github_included_regions}"
541 #########################
542 # Python Sonar with Tox #
543 #########################
545 - _lf_tox_sonar: &lf_tox_sonar
548 ######################
549 # Default parameters #
550 ######################
552 branch: master # Sonar should always be run on master branch
553 build-days-to-keep: 7
555 cron: "H H * * *" # run daily
557 git-url: "$GIT_URL/$PROJECT"
558 github-url: "https://github.com"
559 java-version: openjdk13
560 mvn-global-settings: global-settings
567 pre-build-script: "# pre-build script goes here"
568 python-version: python3
569 sonar-mvn-goal: "sonar:sonar"
571 sonarcloud-project-key: ""
572 sonarcloud-project-organization: ""
573 sonarcloud-api-token-cred-id: sonarcloud-api-token
574 sonarcloud-qualitygate-wait: false
575 # Projects not compatible with jdk13 can set java-version to something else
576 sonarcloud-java-version: openjdk13
578 submodule-recursive: true
579 submodule-timeout: 10
580 submodule-disable: false
583 scan-dev-branch: false
585 gerrit_trigger_file_paths:
586 - compare-type: REG_EXP
589 # github_included_regions MUST match gerrit_trigger_file_paths
590 github_included_regions:
593 #####################
594 # Job Configuration #
595 #####################
597 disabled: "{disable-job}"
600 - lf-infra-parameters:
604 - lf-infra-maven-parameters:
605 mvn-opts: "{mvn-opts}"
606 mvn-params: "{mvn-params}"
607 mvn-version: "{mvn-version}"
608 - lf-infra-tox-parameters:
610 tox-envs: "{tox-envs}"
612 name: ARCHIVE_ARTIFACTS
613 default: "{archive-artifacts}"
614 description: Artifacts to archive to the logs server.
617 # Sets an env var for shell scripts to be able to call the dynamically
618 # installed maven without having to calculate the path themselves.
619 # yamllint disable-line rule:line-length
620 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
621 description: "Maven selector to be used by shell scripts"
623 name: SONAR_MAVEN_GOAL
624 default: "{sonar-mvn-goal}"
626 Maven goals to pass to the Sonar call. Typically sonar:sonar
627 however to use a specific version of the sonar-maven-plugin we
628 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
631 - credentials-binding:
633 credential-id: "{sonarcloud-api-token-cred-id}"
638 - lf-infra-tox-install:
639 python-version: "{python-version}"
640 - shell: "{pre-build-script}"
642 parallel: "{parallel}"
643 - lf-provide-maven-settings:
644 global-settings-file: "{mvn-global-settings}"
645 settings-file: "{mvn-settings}"
648 condition-kind: boolean-expression
649 condition-expression: "{sonarcloud}"
651 - shell: echo 'Using SonarCloud'
652 - lf-infra-maven-sonarcloud:
653 java-version: "{java-version}"
654 mvn-goals: "{mvn-goals}"
655 mvn-settings: "{mvn-settings}"
656 mvn-version: "{mvn-version}"
657 sonarcloud-project-key: "{sonarcloud-project-key}"
658 # yamllint disable-line rule:line-length
659 sonarcloud-project-organization: "{sonarcloud-project-organization}"
660 sonarcloud-java-version: "{sonarcloud-java-version}"
661 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
662 scan-dev-branch: "{scan-dev-branch}"
667 condition-kind: boolean-expression
668 condition-expression: "{sonarcloud}"
670 - shell: echo 'Using SonarQube'
671 - lf-infra-maven-sonar:
672 java-version: "{java-version}"
673 mvn-goals: "{mvn-goals}"
674 mvn-settings: "{mvn-settings}"
675 mvn-version: "{mvn-version}"
681 name: "{project-name}-tox-sonar"
683 <<: *lf_python_common
686 ######################
687 # Default parameters #
688 ######################
690 gerrit_sonar_triggers:
691 - comment-added-contains-event:
692 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
694 #####################
695 # Job Configuration #
696 #####################
699 - lf-infra-gerrit-scm:
700 jenkins-ssh-credential: "{jenkins-ssh-credential}"
702 refspec: $GERRIT_REFSPEC
703 branch: $GERRIT_BRANCH
704 submodule-recursive: "{submodule-recursive}"
705 submodule-timeout: "{submodule-timeout}"
706 submodule-disable: "{submodule-disable}"
707 choosing-strategy: default
710 - timed: "{obj:cron}"
712 server-name: "{gerrit-server-name}"
713 trigger-on: "{obj:gerrit_sonar_triggers}"
715 - project-compare-type: "ANT"
716 project-pattern: "{project}"
718 - branch-compare-type: "ANT"
719 branch-pattern: "**/{branch}"
720 file-paths: "{obj:gerrit_trigger_file_paths}"
728 name: "{project-name}-tox-sonar"
730 <<: *lf_python_common
734 - lf-infra-properties:
735 build-days-to-keep: "{build-days-to-keep}"
737 url: "{github-url}/{github-org}/{project}"
740 - lf-infra-github-scm:
741 url: "{git-clone-url}{github-org}/{project}"
742 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
748 jenkins-ssh-credential: "{jenkins-ssh-credential}"
751 - github-pull-request:
752 trigger-phrase: "^run-sonar$"
753 only-trigger-phrase: false
754 status-context: "Python Sonar"
757 white-list-target-branches:
759 included-regions: "{obj:github_included_regions}"
765 - _lf_tox_sonarqube: &lf_tox_sonarqube
766 name: lf-tox-sonarqube
768 ######################
769 # Default parameters #
770 ######################
774 branch: master # Sonar should always be run on master branch
775 build-days-to-keep: 7
779 git-url: "$GIT_URL/$PROJECT"
780 github-url: "https://github.com"
782 pre-build-script: "# pre-build script goes here"
783 python-version: python3
785 submodule-recursive: true
786 submodule-timeout: 10
787 submodule-disable: false
791 sonar-additional-args: ""
793 sonar-project-file: "sonar-project.properties"
797 #####################
798 # Job Configuration #
799 #####################
801 project-type: freestyle
803 disabled: "{disable-job}"
806 - lf-infra-properties:
807 build-days-to-keep: "{build-days-to-keep}"
811 build-timeout: "{build-timeout}"
812 jenkins-ssh-credential: "{jenkins-ssh-credential}"
815 - lf-infra-parameters:
819 - lf-infra-tox-parameters:
821 tox-envs: "{tox-envs}"
823 name: ARCHIVE_ARTIFACTS
824 default: "{archive-artifacts}"
825 description: Artifacts to archive to the logs server.
829 - lf-infra-tox-install:
830 python-version: "{python-version}"
831 - shell: "{pre-build-script}"
833 parallel: "{parallel}"
835 sonar-task: "{sonar-task}"
836 sonar-project-file: "{sonar-project-file}"
837 sonar-properties: "{sonar-properties}"
838 sonar-java-opts: "{sonar-java-opts}"
839 sonar-additional-args: "{sonar-additional-args}"
845 name: "{project-name}-tox-sonarqube"
846 id: gerrit-tox-sonarqube
848 <<: *lf_tox_sonarqube
850 ######################
851 # Default parameters #
852 ######################
854 gerrit_sonar_triggers:
855 - comment-added-contains-event:
856 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
859 - lf-infra-gerrit-scm:
860 branch: "$GERRIT_BRANCH"
861 jenkins-ssh-credential: "{jenkins-ssh-credential}"
863 refspec: "$GERRIT_REFSPEC"
864 submodule-recursive: "{submodule-recursive}"
865 submodule-timeout: "{submodule-timeout}"
866 submodule-disable: "{submodule-disable}"
867 choosing-strategy: default
870 - timed: "{obj:cron}"
872 server-name: "{gerrit-server-name}"
873 trigger-on: "{obj:gerrit_sonar_triggers}"
875 - project-compare-type: "ANT"
876 project-pattern: "{project}"
878 - branch-compare-type: "ANT"
879 branch-pattern: "**/{branch}"
882 name: "{project-name}-tox-sonarqube"
883 id: github-tox-sonarqube
885 <<: *lf_tox_sonarqube
888 - lf-infra-github-scm:
890 jenkins-ssh-credential: "{jenkins-ssh-credential}"
891 url: "{git-clone-url}{github-org}/{project}"
892 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
893 submodule-recursive: "{submodule-recursive}"
894 submodule-timeout: "{submodule-timeout}"
895 submodule-disable: "{submodule-disable}"
896 choosing-strategy: default
899 - github-pull-request:
900 trigger-phrase: "^run-sonar$"
901 only-trigger-phrase: false
902 status-context: "Tox Sonarqube"
905 white-list-target-branches:
912 - _lf_tox_common: &lf_tox_common
915 ######################
916 # Default parameters #
917 ######################
920 build-days-to-keep: 7
923 git-url: "$GIT_URL/$GERRIT_PROJECT"
924 github-url: "https://github.com"
926 pre-build-script: "# pre-build script goes here"
927 python-version: python3
929 submodule-recursive: true
930 submodule-timeout: 10
931 submodule-disable: false
935 gerrit_trigger_file_paths:
936 - compare-type: REG_EXP
939 # github_included_regions MUST match gerrit_trigger_file_paths
940 github_included_regions:
943 #####################
944 # Job Configuration #
945 #####################
947 project-type: freestyle
950 disabled: "{disable-job}"
953 - lf-infra-properties:
954 build-days-to-keep: "{build-days-to-keep}"
957 - lf-infra-parameters:
961 - lf-infra-tox-parameters:
963 tox-envs: "{tox-envs}"
967 build-timeout: "{build-timeout}"
968 jenkins-ssh-credential: "{jenkins-ssh-credential}"
972 - lf-infra-tox-install:
973 python-version: "{python-version}"
974 - shell: "{pre-build-script}"
976 parallel: "{parallel}"
982 # Python projects typically use tox to run testing.
983 name: "{project-name}-tox-verify-{stream}"
984 id: gerrit-tox-verify
987 ######################
988 # Default parameters #
989 ######################
991 gerrit-skip-vote: false
992 gerrit_verify_triggers:
993 - patchset-created-event:
995 exclude-trivial-rebase: false
996 exclude-no-code-change: false
997 - draft-published-event
998 - comment-added-contains-event:
999 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1001 #####################
1002 # Job Configuration #
1003 #####################
1006 - lf-infra-gerrit-scm:
1007 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1008 git-url: "{git-url}"
1009 refspec: "$GERRIT_REFSPEC"
1010 branch: "$GERRIT_BRANCH"
1011 submodule-recursive: "{submodule-recursive}"
1012 submodule-timeout: "{submodule-timeout}"
1013 submodule-disable: "{submodule-disable}"
1014 choosing-strategy: gerrit
1018 server-name: "{gerrit-server-name}"
1019 trigger-on: "{obj:gerrit_verify_triggers}"
1021 - project-compare-type: ANT
1022 project-pattern: "{project}"
1024 - branch-compare-type: ANT
1025 branch-pattern: "**/{branch}"
1026 file-paths: "{obj:gerrit_trigger_file_paths}"
1028 successful: "{gerrit-skip-vote}"
1029 failed: "{gerrit-skip-vote}"
1030 unstable: "{gerrit-skip-vote}"
1031 notbuilt: "{gerrit-skip-vote}"
1034 # Python projects typically use tox to run testing.
1035 name: "{project-name}-tox-verify-{stream}"
1036 id: github-tox-verify
1040 - lf-infra-properties:
1041 build-days-to-keep: "{build-days-to-keep}"
1043 url: "{github-url}/{github-org}/{project}"
1046 - lf-infra-github-scm:
1047 url: "{git-clone-url}{github-org}/{project}"
1048 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1050 submodule-recursive: "{submodule-recursive}"
1051 submodule-timeout: "{submodule-timeout}"
1052 submodule-disable: "{submodule-disable}"
1053 choosing-strategy: default
1054 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1057 - github-pull-request:
1058 trigger-phrase: "^(recheck|reverify)$"
1059 only-trigger-phrase: false
1060 status-context: "Tox Verify"
1063 white-list-target-branches:
1065 included-regions: "{obj:github_included_regions}"
1068 # Run tox after merge of gerrit change set
1069 name: "{project-name}-tox-merge-{stream}"
1070 id: gerrit-tox-merge
1073 ######################
1074 # Default parameters #
1075 ######################
1077 gerrit_merge_triggers:
1078 - change-merged-event
1079 - comment-added-contains-event:
1080 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1082 #####################
1083 # Job Configuration #
1084 #####################
1087 - lf-infra-gerrit-scm:
1088 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1089 git-url: "{git-url}"
1090 refspec: "$GERRIT_REFSPEC"
1091 branch: "$GERRIT_BRANCH"
1092 submodule-recursive: "{submodule-recursive}"
1093 submodule-timeout: "{submodule-timeout}"
1094 submodule-disable: "{submodule-disable}"
1095 # merge jobs always build from tip
1096 choosing-strategy: default
1100 server-name: "{gerrit-server-name}"
1101 trigger-on: "{obj:gerrit_merge_triggers}"
1103 - project-compare-type: ANT
1104 project-pattern: "{project}"
1106 - branch-compare-type: ANT
1107 branch-pattern: "**/{branch}"
1108 file-paths: "{obj:gerrit_trigger_file_paths}"
1111 # Run tox after merge of github pull request
1112 name: "{project-name}-tox-merge-{stream}"
1113 id: github-tox-merge
1117 - lf-infra-properties:
1118 build-days-to-keep: "{build-days-to-keep}"
1120 url: "{github-url}/{github-org}/{project}"
1123 - lf-infra-github-scm:
1124 url: "{git-clone-url}{github-org}/{project}"
1126 branch: "refs/heads/{branch}"
1127 submodule-recursive: "{submodule-recursive}"
1128 submodule-timeout: "{submodule-timeout}"
1129 submodule-disable: "{submodule-disable}"
1130 choosing-strategy: default
1131 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1134 - github-pull-request:
1135 trigger-phrase: "^remerge$"
1136 only-trigger-phrase: true
1137 status-context: "Tox Merge"
1142 white-list: "{obj:github_pr_allowlist}"
1143 admin-list: "{obj:github_pr_admin_list}"
1144 white-list-target-branches:
1146 included-regions: "{obj:github_included_regions}"
1152 - _lf_pypi_common: &lf_pypi_common
1153 name: lf-pypi-common
1155 ######################
1156 # Default parameters #
1157 ######################
1159 archive-artifacts: >
1162 build-days-to-keep: 7
1166 git-url: "$GIT_URL/$GERRIT_PROJECT"
1167 github-url: "https://github.com"
1169 pre-build-script: "# pre-build script goes here"
1170 python-version: python3
1172 submodule-disable: false
1173 submodule-recursive: true
1174 submodule-timeout: 10
1178 gerrit_trigger_file_paths:
1179 - compare-type: REG_EXP
1182 # github_included_regions MUST match gerrit_trigger_file_paths
1183 github_included_regions:
1186 #####################
1187 # Job Configuration #
1188 #####################
1190 project-type: freestyle
1191 node: "{build-node}"
1192 disabled: "{disable-job}"
1195 - lf-infra-properties:
1196 build-days-to-keep: "{build-days-to-keep}"
1199 - lf-infra-parameters:
1200 project: "{project}"
1203 - lf-infra-tox-parameters:
1204 tox-dir: "{tox-dir}"
1205 tox-envs: "{tox-envs}"
1207 name: BUILD_BDIST_WHEEL
1208 default: "{dist-binary}"
1209 description: "Set to True (checked) to build a binary distribution"
1213 description: "Set to True (checked) to skip uploading artifacts"
1216 - lf-infra-wrappers:
1217 build-timeout: "{build-timeout}"
1218 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1223 - _lf_pypi_verify_builders: &lf_pypi_verify_builders
1224 name: lf-pypi-verify-builders
1227 - lf-infra-pre-build
1228 - lf-infra-tox-install:
1229 python-version: "{python-version}"
1230 - shell: "{pre-build-script}"
1232 parallel: "{parallel}"
1233 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1235 - _lf_pypi_publish_builders: &lf_pypi_publish_builders
1236 name: lf-pypi-publish-builders
1239 - lf-infra-pre-build
1240 - lf-infra-tox-install:
1241 python-version: "{python-version}"
1242 - shell: "{pre-build-script}"
1244 parallel: "{parallel}"
1245 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1246 - config-file-provider:
1249 target: "$HOME/.pypirc"
1251 properties-content: "REPOSITORY={pypi-repo}"
1252 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1255 name: "{project-name}-pypi-verify-{stream}"
1256 id: gerrit-pypi-verify
1258 <<: *lf_pypi_verify_builders
1261 - lf-infra-gerrit-scm:
1262 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1263 git-url: "{git-url}"
1264 refspec: "$GERRIT_REFSPEC"
1265 branch: "$GERRIT_BRANCH"
1266 submodule-recursive: "{submodule-recursive}"
1267 submodule-timeout: "{submodule-timeout}"
1268 submodule-disable: "{submodule-disable}"
1269 choosing-strategy: gerrit
1273 server-name: "{gerrit-server-name}"
1275 - patchset-created-event:
1276 exclude-drafts: true
1277 exclude-trivial-rebase: false
1278 exclude-no-code-change: false
1279 - draft-published-event
1280 - comment-added-contains-event:
1281 # yamllint disable-line rule:line-length
1282 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1284 - project-compare-type: ANT
1285 project-pattern: "{project}"
1287 - branch-compare-type: ANT
1288 branch-pattern: "**/{branch}"
1289 file-paths: "{obj:gerrit_trigger_file_paths}"
1292 name: "{project-name}-pypi-verify-{stream}"
1293 id: github-pypi-verify
1295 <<: *lf_pypi_verify_builders
1299 url: "{github-url}/{github-org}/{project}"
1302 - lf-infra-github-scm:
1303 url: "{git-clone-url}{github-org}/{project}"
1304 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1306 submodule-recursive: "{submodule-recursive}"
1307 submodule-timeout: "{submodule-timeout}"
1308 submodule-disable: "{submodule-disable}"
1309 choosing-strategy: default
1310 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1313 - github-pull-request:
1314 trigger-phrase: "^(recheck|reverify)$"
1315 only-trigger-phrase: false
1316 status-context: "PyPI Verify"
1319 white-list-target-branches:
1321 included-regions: "{obj:github_included_regions}"
1324 name: "{project-name}-pypi-merge-{stream}"
1325 id: gerrit-pypi-merge
1327 <<: *lf_pypi_publish_builders
1329 cron: "" # avoid for pypi which rejects duplicates
1330 pypi-repo: pypi-test
1333 - lf-infra-gerrit-scm:
1334 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1335 git-url: "{git-url}"
1336 refspec: "$GERRIT_REFSPEC"
1337 branch: "$GERRIT_BRANCH"
1338 submodule-recursive: "{submodule-recursive}"
1339 submodule-timeout: "{submodule-timeout}"
1340 submodule-disable: "{submodule-disable}"
1341 # merge jobs always build from tip
1342 choosing-strategy: default
1345 - timed: "{obj:cron}"
1347 server-name: "{gerrit-server-name}"
1349 - change-merged-event
1350 - comment-added-contains-event:
1351 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1353 - project-compare-type: ANT
1354 project-pattern: "{project}"
1356 - branch-compare-type: ANT
1357 branch-pattern: "**/{branch}"
1358 file-paths: "{obj:gerrit_trigger_file_paths}"
1361 name: "{project-name}-pypi-merge-{stream}"
1362 id: github-pypi-merge
1364 <<: *lf_pypi_publish_builders
1367 pypi-repo: pypi-test
1371 url: "{github-url}/{github-org}/{project}"
1374 - lf-infra-github-scm:
1375 url: "{git-clone-url}{github-org}/{project}"
1377 branch: "refs/heads/{branch}"
1378 submodule-recursive: "{submodule-recursive}"
1379 submodule-timeout: "{submodule-timeout}"
1380 submodule-disable: "{submodule-disable}"
1381 choosing-strategy: default
1382 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1385 - timed: "{obj:cron}"
1386 - github-pull-request:
1387 trigger-phrase: "^remerge$"
1388 only-trigger-phrase: false
1389 status-context: "Merge"
1394 white-list: "{obj:github_pr_allowlist}"
1395 admin-list: "{obj:github_pr_admin_list}"
1396 white-list-target-branches:
1398 included-regions: "{obj:github_included_regions}"
1401 name: "{project-name}-pypi-stage-{stream}"
1402 id: gerrit-pypi-stage
1404 <<: *lf_pypi_publish_builders
1407 pypi-repo: pypi-test
1409 gerrit_stage_triggers:
1410 - comment-added-contains-event:
1411 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1414 - lf-infra-gerrit-scm:
1415 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1416 git-url: "{git-url}"
1417 refspec: "$GERRIT_REFSPEC"
1418 branch: "$GERRIT_BRANCH"
1419 submodule-recursive: "{submodule-recursive}"
1420 submodule-timeout: "{submodule-timeout}"
1421 submodule-disable: "{submodule-disable}"
1422 # stage jobs always build from tip
1423 choosing-strategy: default
1426 - timed: "{obj:cron}"
1428 server-name: "{gerrit-server-name}"
1429 trigger-on: "{obj:gerrit_stage_triggers}"
1431 - project-compare-type: ANT
1432 project-pattern: "{project}"
1434 - branch-compare-type: ANT
1435 branch-pattern: "**/{branch}"
1436 file-paths: "{obj:gerrit_trigger_file_paths}"
1439 name: "{project-name}-pypi-stage-{stream}"
1440 id: github-pypi-stage
1442 <<: *lf_pypi_publish_builders
1445 pypi-repo: pypi-test
1449 url: "{github-url}/{github-org}/{project}"
1452 - lf-infra-github-scm:
1453 url: "{git-clone-url}{github-org}/{project}"
1455 branch: "refs/heads/{branch}"
1456 submodule-recursive: "{submodule-recursive}"
1457 submodule-timeout: "{submodule-timeout}"
1458 submodule-disable: "{submodule-disable}"
1459 choosing-strategy: default
1460 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1463 - timed: "{obj:cron}"
1464 - github-pull-request:
1465 trigger-phrase: "^stage-release$"
1466 only-trigger-phrase: true
1467 status-context: "Release"
1470 white-list-target-branches:
1472 included-regions: "{obj:github_included_regions}"