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
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 # Projects not compatible with jdk17 can set java-version to something else
577 sonarcloud-java-version: openjdk17
579 submodule-recursive: true
580 submodule-timeout: 10
581 submodule-disable: false
584 scan-dev-branch: false
586 gerrit_trigger_file_paths:
587 - compare-type: REG_EXP
590 # github_included_regions MUST match gerrit_trigger_file_paths
591 github_included_regions:
594 #####################
595 # Job Configuration #
596 #####################
598 disabled: "{disable-job}"
601 - lf-infra-parameters:
605 - lf-infra-maven-parameters:
606 mvn-opts: "{mvn-opts}"
607 mvn-params: "{mvn-params}"
608 mvn-version: "{mvn-version}"
609 - lf-infra-tox-parameters:
611 tox-envs: "{tox-envs}"
613 name: ARCHIVE_ARTIFACTS
614 default: "{archive-artifacts}"
615 description: Artifacts to archive to the logs server.
618 # Sets an env var for shell scripts to be able to call the dynamically
619 # installed maven without having to calculate the path themselves.
620 # yamllint disable-line rule:line-length
621 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
622 description: "Maven selector to be used by shell scripts"
624 name: SONAR_MAVEN_GOAL
625 default: "{sonar-mvn-goal}"
627 Maven goals to pass to the Sonar call. Typically sonar:sonar
628 however to use a specific version of the sonar-maven-plugin we
629 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
632 - credentials-binding:
634 credential-id: "{sonarcloud-api-token-cred-id}"
639 - lf-infra-tox-install:
640 python-version: "{python-version}"
641 - shell: "{pre-build-script}"
643 parallel: "{parallel}"
644 - lf-provide-maven-settings:
645 global-settings-file: "{mvn-global-settings}"
646 settings-file: "{mvn-settings}"
649 condition-kind: boolean-expression
650 condition-expression: "{sonarcloud}"
652 - shell: echo 'Using SonarCloud'
653 - lf-infra-maven-sonarcloud:
654 java-version: "{java-version}"
655 mvn-goals: "{mvn-goals}"
656 mvn-settings: "{mvn-settings}"
657 mvn-version: "{mvn-version}"
658 sonarcloud-project-key: "{sonarcloud-project-key}"
659 # yamllint disable-line rule:line-length
660 sonarcloud-project-organization: "{sonarcloud-project-organization}"
661 sonarcloud-java-version: "{sonarcloud-java-version}"
662 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
663 scan-dev-branch: "{scan-dev-branch}"
668 condition-kind: boolean-expression
669 condition-expression: "{sonarcloud}"
671 - shell: echo 'Using SonarQube'
672 - lf-infra-maven-sonar:
673 java-version: "{java-version}"
674 mvn-goals: "{mvn-goals}"
675 mvn-settings: "{mvn-settings}"
676 mvn-version: "{mvn-version}"
682 name: "{project-name}-tox-sonar"
684 <<: *lf_python_common
687 ######################
688 # Default parameters #
689 ######################
691 gerrit_sonar_triggers:
692 - comment-added-contains-event:
693 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
695 #####################
696 # Job Configuration #
697 #####################
700 - lf-infra-gerrit-scm:
701 jenkins-ssh-credential: "{jenkins-ssh-credential}"
703 refspec: $GERRIT_REFSPEC
704 branch: $GERRIT_BRANCH
705 submodule-recursive: "{submodule-recursive}"
706 submodule-timeout: "{submodule-timeout}"
707 submodule-disable: "{submodule-disable}"
708 choosing-strategy: default
711 - timed: "{obj:cron}"
713 server-name: "{gerrit-server-name}"
714 trigger-on: "{obj:gerrit_sonar_triggers}"
716 - project-compare-type: "ANT"
717 project-pattern: "{project}"
719 - branch-compare-type: "ANT"
720 branch-pattern: "**/{branch}"
721 file-paths: "{obj:gerrit_trigger_file_paths}"
729 name: "{project-name}-tox-sonar"
731 <<: *lf_python_common
735 - lf-infra-properties:
736 build-days-to-keep: "{build-days-to-keep}"
738 url: "{github-url}/{github-org}/{project}"
741 - lf-infra-github-scm:
742 url: "{git-clone-url}{github-org}/{project}"
743 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
745 submodule-recursive: "{submodule-recursive}"
746 submodule-timeout: "{submodule-timeout}"
747 submodule-disable: "{submodule-disable}"
748 choosing-strategy: default
749 jenkins-ssh-credential: "{jenkins-ssh-credential}"
752 - github-pull-request:
753 trigger-phrase: "^run-sonar$"
754 only-trigger-phrase: false
755 status-context: "Python Sonar"
758 white-list-target-branches:
760 included-regions: "{obj:github_included_regions}"
766 - _lf_tox_sonarqube: &lf_tox_sonarqube
767 name: lf-tox-sonarqube
769 ######################
770 # Default parameters #
771 ######################
775 branch: master # Sonar should always be run on master branch
776 build-days-to-keep: 7
780 git-url: "$GIT_URL/$PROJECT"
781 github-url: "https://github.com"
783 pre-build-script: "# pre-build script goes here"
784 python-version: python3
786 submodule-recursive: true
787 submodule-timeout: 10
788 submodule-disable: false
792 sonar-additional-args: ""
794 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}"
842 sonar-jdk: "{sonar-jdk}"
848 name: "{project-name}-tox-sonarqube"
849 id: gerrit-tox-sonarqube
851 <<: *lf_tox_sonarqube
853 ######################
854 # Default parameters #
855 ######################
857 gerrit_sonar_triggers:
858 - comment-added-contains-event:
859 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
862 - lf-infra-gerrit-scm:
863 branch: "$GERRIT_BRANCH"
864 jenkins-ssh-credential: "{jenkins-ssh-credential}"
866 refspec: "$GERRIT_REFSPEC"
867 submodule-recursive: "{submodule-recursive}"
868 submodule-timeout: "{submodule-timeout}"
869 submodule-disable: "{submodule-disable}"
870 choosing-strategy: default
873 - timed: "{obj:cron}"
875 server-name: "{gerrit-server-name}"
876 trigger-on: "{obj:gerrit_sonar_triggers}"
878 - project-compare-type: "ANT"
879 project-pattern: "{project}"
881 - branch-compare-type: "ANT"
882 branch-pattern: "**/{branch}"
885 name: "{project-name}-tox-sonarqube"
886 id: github-tox-sonarqube
888 <<: *lf_tox_sonarqube
891 - lf-infra-github-scm:
893 jenkins-ssh-credential: "{jenkins-ssh-credential}"
894 url: "{git-clone-url}{github-org}/{project}"
895 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
896 submodule-recursive: "{submodule-recursive}"
897 submodule-timeout: "{submodule-timeout}"
898 submodule-disable: "{submodule-disable}"
899 choosing-strategy: default
902 - github-pull-request:
903 trigger-phrase: "^run-sonar$"
904 only-trigger-phrase: false
905 status-context: "Tox Sonarqube"
908 white-list-target-branches:
915 - _lf_tox_common: &lf_tox_common
918 ######################
919 # Default parameters #
920 ######################
923 build-days-to-keep: 7
926 git-url: "$GIT_URL/$GERRIT_PROJECT"
927 github-url: "https://github.com"
929 pre-build-script: "# pre-build script goes here"
930 python-version: python3
932 submodule-recursive: true
933 submodule-timeout: 10
934 submodule-disable: false
938 gerrit_trigger_file_paths:
939 - compare-type: REG_EXP
942 # github_included_regions MUST match gerrit_trigger_file_paths
943 github_included_regions:
946 #####################
947 # Job Configuration #
948 #####################
950 project-type: freestyle
953 disabled: "{disable-job}"
956 - lf-infra-properties:
957 build-days-to-keep: "{build-days-to-keep}"
960 - lf-infra-parameters:
964 - lf-infra-tox-parameters:
966 tox-envs: "{tox-envs}"
970 build-timeout: "{build-timeout}"
971 jenkins-ssh-credential: "{jenkins-ssh-credential}"
975 - lf-infra-tox-install:
976 python-version: "{python-version}"
977 - shell: "{pre-build-script}"
979 parallel: "{parallel}"
985 # Python projects typically use tox to run testing.
986 name: "{project-name}-tox-verify-{stream}"
987 id: gerrit-tox-verify
990 ######################
991 # Default parameters #
992 ######################
994 gerrit-skip-vote: false
995 gerrit_verify_triggers:
996 - patchset-created-event:
998 exclude-trivial-rebase: false
999 exclude-no-code-change: false
1000 - draft-published-event
1001 - comment-added-contains-event:
1002 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1004 #####################
1005 # Job Configuration #
1006 #####################
1009 - lf-infra-gerrit-scm:
1010 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1011 git-url: "{git-url}"
1012 refspec: "$GERRIT_REFSPEC"
1013 branch: "$GERRIT_BRANCH"
1014 submodule-recursive: "{submodule-recursive}"
1015 submodule-timeout: "{submodule-timeout}"
1016 submodule-disable: "{submodule-disable}"
1017 choosing-strategy: gerrit
1021 server-name: "{gerrit-server-name}"
1022 trigger-on: "{obj:gerrit_verify_triggers}"
1024 - project-compare-type: ANT
1025 project-pattern: "{project}"
1027 - branch-compare-type: ANT
1028 branch-pattern: "**/{branch}"
1029 file-paths: "{obj:gerrit_trigger_file_paths}"
1031 successful: "{gerrit-skip-vote}"
1032 failed: "{gerrit-skip-vote}"
1033 unstable: "{gerrit-skip-vote}"
1034 notbuilt: "{gerrit-skip-vote}"
1037 # Python projects typically use tox to run testing.
1038 name: "{project-name}-tox-verify-{stream}"
1039 id: github-tox-verify
1043 - lf-infra-properties:
1044 build-days-to-keep: "{build-days-to-keep}"
1046 url: "{github-url}/{github-org}/{project}"
1049 - lf-infra-github-scm:
1050 url: "{git-clone-url}{github-org}/{project}"
1051 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1053 submodule-recursive: "{submodule-recursive}"
1054 submodule-timeout: "{submodule-timeout}"
1055 submodule-disable: "{submodule-disable}"
1056 choosing-strategy: default
1057 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1060 - github-pull-request:
1061 trigger-phrase: "^(recheck|reverify)$"
1062 only-trigger-phrase: false
1063 status-context: "Tox Verify"
1066 white-list-target-branches:
1068 included-regions: "{obj:github_included_regions}"
1071 # Run tox after merge of gerrit change set
1072 name: "{project-name}-tox-merge-{stream}"
1073 id: gerrit-tox-merge
1076 ######################
1077 # Default parameters #
1078 ######################
1080 gerrit_merge_triggers:
1081 - change-merged-event
1082 - comment-added-contains-event:
1083 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1085 #####################
1086 # Job Configuration #
1087 #####################
1090 - lf-infra-gerrit-scm:
1091 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1092 git-url: "{git-url}"
1093 refspec: "$GERRIT_REFSPEC"
1094 branch: "$GERRIT_BRANCH"
1095 submodule-recursive: "{submodule-recursive}"
1096 submodule-timeout: "{submodule-timeout}"
1097 submodule-disable: "{submodule-disable}"
1098 # merge jobs always build from tip
1099 choosing-strategy: default
1103 server-name: "{gerrit-server-name}"
1104 trigger-on: "{obj:gerrit_merge_triggers}"
1106 - project-compare-type: ANT
1107 project-pattern: "{project}"
1109 - branch-compare-type: ANT
1110 branch-pattern: "**/{branch}"
1111 file-paths: "{obj:gerrit_trigger_file_paths}"
1114 # Run tox after merge of github pull request
1115 name: "{project-name}-tox-merge-{stream}"
1116 id: github-tox-merge
1120 - lf-infra-properties:
1121 build-days-to-keep: "{build-days-to-keep}"
1123 url: "{github-url}/{github-org}/{project}"
1126 - lf-infra-github-scm:
1127 url: "{git-clone-url}{github-org}/{project}"
1129 branch: "refs/heads/{branch}"
1130 submodule-recursive: "{submodule-recursive}"
1131 submodule-timeout: "{submodule-timeout}"
1132 submodule-disable: "{submodule-disable}"
1133 choosing-strategy: default
1134 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1137 - github-pull-request:
1138 trigger-phrase: "^remerge$"
1139 only-trigger-phrase: true
1140 status-context: "Tox Merge"
1145 white-list: "{obj:github_pr_allowlist}"
1146 admin-list: "{obj:github_pr_admin_list}"
1147 white-list-target-branches:
1149 included-regions: "{obj:github_included_regions}"
1155 - _lf_pypi_common: &lf_pypi_common
1156 name: lf-pypi-common
1158 ######################
1159 # Default parameters #
1160 ######################
1162 archive-artifacts: >
1165 build-days-to-keep: 7
1169 git-url: "$GIT_URL/$GERRIT_PROJECT"
1170 github-url: "https://github.com"
1172 pre-build-script: "# pre-build script goes here"
1173 python-version: python3
1175 submodule-disable: false
1176 submodule-recursive: true
1177 submodule-timeout: 10
1181 gerrit_trigger_file_paths:
1182 - compare-type: REG_EXP
1185 # github_included_regions MUST match gerrit_trigger_file_paths
1186 github_included_regions:
1189 #####################
1190 # Job Configuration #
1191 #####################
1193 project-type: freestyle
1194 node: "{build-node}"
1195 disabled: "{disable-job}"
1198 - lf-infra-properties:
1199 build-days-to-keep: "{build-days-to-keep}"
1202 - lf-infra-parameters:
1203 project: "{project}"
1206 - lf-infra-tox-parameters:
1207 tox-dir: "{tox-dir}"
1208 tox-envs: "{tox-envs}"
1210 name: BUILD_BDIST_WHEEL
1211 default: "{dist-binary}"
1212 description: "Set to True (checked) to build a binary distribution"
1216 description: "Set to True (checked) to skip uploading artifacts"
1219 - lf-infra-wrappers:
1220 build-timeout: "{build-timeout}"
1221 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1226 - _lf_pypi_verify_builders: &lf_pypi_verify_builders
1227 name: lf-pypi-verify-builders
1230 - lf-infra-pre-build
1231 - lf-infra-tox-install:
1232 python-version: "{python-version}"
1233 - shell: "{pre-build-script}"
1235 parallel: "{parallel}"
1236 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1238 - _lf_pypi_publish_builders: &lf_pypi_publish_builders
1239 name: lf-pypi-publish-builders
1242 - lf-infra-pre-build
1243 - lf-infra-tox-install:
1244 python-version: "{python-version}"
1245 - shell: "{pre-build-script}"
1247 parallel: "{parallel}"
1248 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1249 - config-file-provider:
1252 target: "$HOME/.pypirc"
1254 properties-content: "REPOSITORY={pypi-repo}"
1255 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1258 name: "{project-name}-pypi-verify-{stream}"
1259 id: gerrit-pypi-verify
1261 <<: *lf_pypi_verify_builders
1264 - lf-infra-gerrit-scm:
1265 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1266 git-url: "{git-url}"
1267 refspec: "$GERRIT_REFSPEC"
1268 branch: "$GERRIT_BRANCH"
1269 submodule-recursive: "{submodule-recursive}"
1270 submodule-timeout: "{submodule-timeout}"
1271 submodule-disable: "{submodule-disable}"
1272 choosing-strategy: gerrit
1276 server-name: "{gerrit-server-name}"
1278 - patchset-created-event:
1279 exclude-drafts: true
1280 exclude-trivial-rebase: false
1281 exclude-no-code-change: false
1282 - draft-published-event
1283 - comment-added-contains-event:
1284 # yamllint disable-line rule:line-length
1285 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1287 - project-compare-type: ANT
1288 project-pattern: "{project}"
1290 - branch-compare-type: ANT
1291 branch-pattern: "**/{branch}"
1292 file-paths: "{obj:gerrit_trigger_file_paths}"
1295 name: "{project-name}-pypi-verify-{stream}"
1296 id: github-pypi-verify
1298 <<: *lf_pypi_verify_builders
1302 url: "{github-url}/{github-org}/{project}"
1305 - lf-infra-github-scm:
1306 url: "{git-clone-url}{github-org}/{project}"
1307 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1309 submodule-recursive: "{submodule-recursive}"
1310 submodule-timeout: "{submodule-timeout}"
1311 submodule-disable: "{submodule-disable}"
1312 choosing-strategy: default
1313 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1316 - github-pull-request:
1317 trigger-phrase: "^(recheck|reverify)$"
1318 only-trigger-phrase: false
1319 status-context: "PyPI Verify"
1322 white-list-target-branches:
1324 included-regions: "{obj:github_included_regions}"
1327 name: "{project-name}-pypi-merge-{stream}"
1328 id: gerrit-pypi-merge
1330 <<: *lf_pypi_publish_builders
1332 cron: "" # avoid for pypi which rejects duplicates
1333 pypi-repo: pypi-test
1336 - lf-infra-gerrit-scm:
1337 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1338 git-url: "{git-url}"
1339 refspec: "$GERRIT_REFSPEC"
1340 branch: "$GERRIT_BRANCH"
1341 submodule-recursive: "{submodule-recursive}"
1342 submodule-timeout: "{submodule-timeout}"
1343 submodule-disable: "{submodule-disable}"
1344 # merge jobs always build from tip
1345 choosing-strategy: default
1348 - timed: "{obj:cron}"
1350 server-name: "{gerrit-server-name}"
1352 - change-merged-event
1353 - comment-added-contains-event:
1354 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1356 - project-compare-type: ANT
1357 project-pattern: "{project}"
1359 - branch-compare-type: ANT
1360 branch-pattern: "**/{branch}"
1361 file-paths: "{obj:gerrit_trigger_file_paths}"
1364 name: "{project-name}-pypi-merge-{stream}"
1365 id: github-pypi-merge
1367 <<: *lf_pypi_publish_builders
1370 pypi-repo: pypi-test
1374 url: "{github-url}/{github-org}/{project}"
1377 - lf-infra-github-scm:
1378 url: "{git-clone-url}{github-org}/{project}"
1380 branch: "refs/heads/{branch}"
1381 submodule-recursive: "{submodule-recursive}"
1382 submodule-timeout: "{submodule-timeout}"
1383 submodule-disable: "{submodule-disable}"
1384 choosing-strategy: default
1385 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1388 - timed: "{obj:cron}"
1389 - github-pull-request:
1390 trigger-phrase: "^remerge$"
1391 only-trigger-phrase: false
1392 status-context: "Merge"
1397 white-list: "{obj:github_pr_allowlist}"
1398 admin-list: "{obj:github_pr_admin_list}"
1399 white-list-target-branches:
1401 included-regions: "{obj:github_included_regions}"
1404 name: "{project-name}-pypi-stage-{stream}"
1405 id: gerrit-pypi-stage
1407 <<: *lf_pypi_publish_builders
1410 pypi-repo: pypi-test
1412 gerrit_stage_triggers:
1413 - comment-added-contains-event:
1414 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1417 - lf-infra-gerrit-scm:
1418 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1419 git-url: "{git-url}"
1420 refspec: "$GERRIT_REFSPEC"
1421 branch: "$GERRIT_BRANCH"
1422 submodule-recursive: "{submodule-recursive}"
1423 submodule-timeout: "{submodule-timeout}"
1424 submodule-disable: "{submodule-disable}"
1425 # stage jobs always build from tip
1426 choosing-strategy: default
1429 - timed: "{obj:cron}"
1431 server-name: "{gerrit-server-name}"
1432 trigger-on: "{obj:gerrit_stage_triggers}"
1434 - project-compare-type: ANT
1435 project-pattern: "{project}"
1437 - branch-compare-type: ANT
1438 branch-pattern: "**/{branch}"
1439 file-paths: "{obj:gerrit_trigger_file_paths}"
1442 name: "{project-name}-pypi-stage-{stream}"
1443 id: github-pypi-stage
1445 <<: *lf_pypi_publish_builders
1448 pypi-repo: pypi-test
1452 url: "{github-url}/{github-org}/{project}"
1455 - lf-infra-github-scm:
1456 url: "{git-clone-url}{github-org}/{project}"
1458 branch: "refs/heads/{branch}"
1459 submodule-recursive: "{submodule-recursive}"
1460 submodule-timeout: "{submodule-timeout}"
1461 submodule-disable: "{submodule-disable}"
1462 choosing-strategy: default
1463 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1466 - timed: "{obj:cron}"
1467 - github-pull-request:
1468 trigger-phrase: "^stage-release$"
1469 only-trigger-phrase: true
1470 status-context: "Release"
1473 white-list-target-branches:
1475 included-regions: "{obj:github_included_regions}"