7 name: lf-infra-nexus-iq-python-cli
11 NEXUS_IQ_PROJECT_NAME={nexus-iq-project-name}
12 REQUIREMENTS_FILE={requirements-file}
13 - shell: !include-raw-escape: ../shell/nexus-iq-python-cli.sh
16 name: lf-infra-tox-install
19 properties-content: "PYTHON={python-version}"
20 - shell: !include-raw-escape: ../shell/tox-install.sh
23 name: lf-infra-tox-run
26 properties-content: "PARALLEL={parallel}"
27 - shell: !include-raw-escape: ../shell/tox-run.sh
33 - lf_python_common: &lf_python_common
34 name: lf-python-common
36 ######################
37 # Default parameters #
38 ######################
47 project-type: freestyle
51 - lf-infra-properties:
52 build-days-to-keep: "{build-days-to-keep}"
55 - lf-infra-parameters:
62 build-timeout: "{build-timeout}"
63 jenkins-ssh-credential: "{jenkins-ssh-credential}"
72 - lf_tox_nexus_iq_clm: &lf_tox_nexus_iq_clm
73 name: lf-tox-nexus-iq-clm
75 ######################
76 # Default parameters #
77 ######################
84 git-url: "$GIT_URL/$PROJECT"
85 github-url: "https://github.com"
86 java-version: openjdk11 # Scanner is a jar
87 nexus-iq-cli-version: 1.140.0-01
88 nexus-iq-namespace: "" # Recommend a trailing dash when set. Example: odl-
89 nexus-target-build: "**/*"
90 pre-build-script: "# pre-build script goes here"
91 python-version: python3
92 requirements-file: requirements.txt
94 submodule-recursive: true
96 submodule-disable: false
100 #####################
101 # Job Configuration #
102 #####################
104 disabled: "{disable-job}"
107 - lf-infra-parameters:
111 - lf-infra-tox-parameters:
113 tox-envs: "{tox-envs}"
115 name: ARCHIVE_ARTIFACTS
116 default: "{archive-artifacts}"
117 description: Artifacts to archive to the logs server.
119 name: NEXUS_IQ_CLI_VERSION
120 default: "{nexus-iq-cli-version}"
121 description: Nexus IQ CLI jar to download and run.
123 name: NEXUS_TARGET_BUILD
124 default: "{nexus-target-build}"
125 description: File or dir to scan by Nexus CLI.
129 build-timeout: "{build-timeout}"
130 jenkins-ssh-credential: "{jenkins-ssh-credential}"
131 - credentials-binding:
132 - username-password-separated:
133 credential-id: nexus-iq-xc-clm
134 username: NEXUS_IQ_USER
135 password: NEXUS_IQ_PASSWORD
139 - lf-update-java-alternatives:
140 java-version: "{java-version}"
141 - lf-infra-tox-install:
142 python-version: "{python-version}"
143 - shell: "{pre-build-script}"
146 - lf-infra-nexus-iq-python-cli:
147 nexus-iq-project-name: "{nexus-iq-namespace}{project-name}"
148 requirements-file: "{requirements-file}"
151 name: "{project-name}-tox-nexus-iq-clm"
152 id: gerrit-tox-nexus-iq-clm
153 <<: *lf_python_common
154 <<: *lf_tox_nexus_iq_clm
156 ######################
157 # Default parameters #
158 ######################
160 gerrit_nexus_iq_triggers:
161 - comment-added-contains-event:
162 comment-contains-value: '^Patch Set\s+\d+:\s+run-clm\s*$'
164 #####################
165 # Job Configuration #
166 #####################
169 - lf-infra-gerrit-scm:
170 jenkins-ssh-credential: "{jenkins-ssh-credential}"
172 refspec: "$GERRIT_REFSPEC"
173 branch: "$GERRIT_BRANCH"
174 submodule-recursive: "{submodule-recursive}"
175 submodule-timeout: "{submodule-timeout}"
176 submodule-disable: "{submodule-disable}"
177 choosing-strategy: default
180 - timed: "{obj:cron}"
182 server-name: "{gerrit-server-name}"
183 trigger-on: "{obj:gerrit_nexus_iq_triggers}"
185 - project-compare-type: ANT
186 project-pattern: "{project}"
188 - branch-compare-type: ANT
189 branch-pattern: "**/{branch}"
197 name: "{project-name}-tox-nexus-iq"
198 id: github-tox-nexus-iq-clm
199 <<: *lf_python_common
200 <<: *lf_tox_nexus_iq_clm
203 - lf-infra-properties:
204 build-days-to-keep: "{build-days-to-keep}"
206 url: "{github-url}/{github-org}/{project}"
209 - lf-infra-github-scm:
210 url: "{git-clone-url}{github-org}/{project}"
212 branch: "refs/heads/{branch}"
213 submodule-recursive: "{submodule-recursive}"
214 submodule-timeout: "{submodule-timeout}"
215 submodule-disable: "{submodule-disable}"
216 choosing-strategy: default
217 jenkins-ssh-credential: "{jenkins-ssh-credential}"
220 - timed: "{obj:cron}"
221 - github-pull-request:
222 trigger-phrase: "^run-clm$"
223 only-trigger-phrase: false
224 status-context: "CLM"
227 white-list-target-branches:
230 #########################
231 # Python Sonar with CLI #
232 #########################
234 - lf_cli_sonar: &lf_cli_sonar
237 ######################
238 # Default parameters #
239 ######################
241 branch: master # Sonar should always be run on master branch
242 build-days-to-keep: 7
244 cron: "H H * * *" # run daily
246 git-url: "$GIT_URL/$PROJECT"
247 github-url: "https://github.com"
248 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
249 # Projects not compatible with jdk11 can set java-version to something else
250 java-version: openjdk11
252 pre-build-script: "# pre-build script goes here"
253 python-version: python3
255 sonar-scanner-version: "4.7.0.2747"
256 sonar-scanner-home: "$WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
257 sonar-scanner-opts: "-server"
258 submodule-recursive: true
259 submodule-timeout: 10
260 submodule-disable: false
264 gerrit_trigger_file_paths:
265 - compare-type: REG_EXP
268 # github_included_regions MUST match gerrit_trigger_file_paths
269 github_included_regions:
272 #####################
273 # Job Configuration #
274 #####################
276 disabled: "{disable-job}"
279 - lf-infra-parameters:
283 - lf-infra-sonar-cli-parameters:
285 tox-envs: "{tox-envs}"
286 sonar-scanner-version: "{sonar-scanner-version}"
287 sonar-scanner-home: "{sonar-scanner-home}"
288 sonar-scanner-opts: "{sonar-scanner-opts}"
290 name: ARCHIVE_ARTIFACTS
291 default: "{archive-artifacts}"
292 description: Artifacts to archive to the logs server.
294 - credentials-binding:
296 credential-id: sonar-token-{project-name}
297 variable: SONAR_TOKEN
300 - lf-infra-tox-install:
301 python-version: "{python-version}"
302 - shell: "{pre-build-script}"
304 parallel: "{parallel}"
307 properties-content: |
308 SONARCLOUD_PROJECT_ORGANIZATION={sonarcloud-project-organization}
309 SONARCLOUD_PROJECT_KEY={sonarcloud-project-key}
310 - shell: !include-raw-escape: ../shell/sonar-cli.sh
316 name: "{project-name}-cli-sonar"
318 <<: *lf_python_common
321 ######################
322 # Default parameters #
323 ######################
325 gerrit_sonar_triggers:
326 - comment-added-contains-event:
327 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
329 #####################
330 # Job Configuration #
331 #####################
334 - lf-infra-gerrit-scm:
335 jenkins-ssh-credential: "{jenkins-ssh-credential}"
337 refspec: $GERRIT_REFSPEC
338 branch: $GERRIT_BRANCH
339 submodule-recursive: "{submodule-recursive}"
340 submodule-timeout: "{submodule-timeout}"
341 submodule-disable: "{submodule-disable}"
342 choosing-strategy: default
345 - timed: "{obj:cron}"
347 server-name: "{gerrit-server-name}"
348 trigger-on: "{obj:gerrit_sonar_triggers}"
350 - project-compare-type: "ANT"
351 project-pattern: "{project}"
353 - branch-compare-type: "ANT"
354 branch-pattern: "**/{branch}"
355 file-paths: "{obj:gerrit_trigger_file_paths}"
363 name: "{project-name}-cli-sonar"
365 <<: *lf_python_common
369 - lf-infra-properties:
370 build-days-to-keep: "{build-days-to-keep}"
372 url: "{github-url}/{github-org}/{project}"
375 - lf-infra-github-scm:
376 url: "{git-clone-url}{github-org}/{project}"
377 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
379 submodule-recursive: "{submodule-recursive}"
380 submodule-timeout: "{submodule-timeout}"
381 submodule-disable: "{submodule-disable}"
382 choosing-strategy: default
383 jenkins-ssh-credential: "{jenkins-ssh-credential}"
386 - github-pull-request:
387 trigger-phrase: "^run-sonar$"
388 only-trigger-phrase: false
389 status-context: "Python Sonar"
392 white-list-target-branches:
394 included-regions: "{obj:github_included_regions}"
396 #########################
397 # Python Sonar with Tox #
398 #########################
400 - lf_tox_sonar: &lf_tox_sonar
403 ######################
404 # Default parameters #
405 ######################
407 branch: master # Sonar should always be run on master branch
408 build-days-to-keep: 7
410 cron: "H H * * *" # run daily
412 git-url: "$GIT_URL/$PROJECT"
413 github-url: "https://github.com"
414 java-version: openjdk11
415 mvn-global-settings: global-settings
419 mvn-settings: "{mvn-settings}"
422 pre-build-script: "# pre-build script goes here"
423 python-version: python3
424 sonar-mvn-goal: "sonar:sonar"
426 sonarcloud-project-key: ""
427 sonarcloud-project-organization: ""
428 sonarcloud-api-token-cred-id: sonarcloud-api-token
429 sonarcloud-qualitygate-wait: false
430 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
431 # Projects not compatible with jdk11 can set java-version to something else
432 sonarcloud-java-version: openjdk11
434 submodule-recursive: true
435 submodule-timeout: 10
436 submodule-disable: false
439 scan-dev-branch: false
441 gerrit_trigger_file_paths:
442 - compare-type: REG_EXP
445 # github_included_regions MUST match gerrit_trigger_file_paths
446 github_included_regions:
449 #####################
450 # Job Configuration #
451 #####################
453 disabled: "{disable-job}"
456 - lf-infra-parameters:
460 - lf-infra-maven-parameters:
461 mvn-opts: "{mvn-opts}"
462 mvn-params: "{mvn-params}"
463 mvn-version: "{mvn-version}"
464 - lf-infra-tox-parameters:
466 tox-envs: "{tox-envs}"
468 name: ARCHIVE_ARTIFACTS
469 default: "{archive-artifacts}"
470 description: Artifacts to archive to the logs server.
473 # Sets an env var for shell scripts to be able to call the dynamically
474 # installed maven without having to calculate the path themselves.
475 # yamllint disable-line rule:line-length
476 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
477 description: "Maven selector to be used by shell scripts"
479 name: SONAR_MAVEN_GOAL
480 default: "{sonar-mvn-goal}"
482 Maven goals to pass to the Sonar call. Typically sonar:sonar
483 however to use a specific version of the sonar-maven-plugin we
484 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
487 - credentials-binding:
489 credential-id: '{sonarcloud-api-token-cred-id}'
494 - lf-infra-tox-install:
495 python-version: "{python-version}"
496 - shell: "{pre-build-script}"
498 parallel: "{parallel}"
499 - lf-provide-maven-settings:
500 global-settings-file: "{mvn-global-settings}"
501 settings-file: "{mvn-settings}"
504 condition-kind: boolean-expression
505 condition-expression: "{sonarcloud}"
507 - shell: echo 'Using SonarCloud'
508 - lf-infra-maven-sonarcloud:
509 java-version: "{java-version}"
510 mvn-goals: "{mvn-goals}"
511 mvn-settings: "{mvn-settings}"
512 mvn-version: "{mvn-version}"
513 sonarcloud-project-key: "{sonarcloud-project-key}"
514 # yamllint disable-line rule:line-length
515 sonarcloud-project-organization: "{sonarcloud-project-organization}"
516 sonarcloud-java-version: "{sonarcloud-java-version}"
517 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
518 scan-dev-branch: "{scan-dev-branch}"
523 condition-kind: boolean-expression
524 condition-expression: "{sonarcloud}"
526 - shell: echo 'Using SonarQube'
527 - lf-infra-maven-sonar:
528 java-version: "{java-version}"
529 mvn-goals: "{mvn-goals}"
530 mvn-settings: "{mvn-settings}"
531 mvn-version: "{mvn-version}"
537 name: "{project-name}-tox-sonar"
539 <<: *lf_python_common
542 ######################
543 # Default parameters #
544 ######################
546 gerrit_sonar_triggers:
547 - comment-added-contains-event:
548 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
550 #####################
551 # Job Configuration #
552 #####################
555 - lf-infra-gerrit-scm:
556 jenkins-ssh-credential: "{jenkins-ssh-credential}"
558 refspec: $GERRIT_REFSPEC
559 branch: $GERRIT_BRANCH
560 submodule-recursive: "{submodule-recursive}"
561 submodule-timeout: "{submodule-timeout}"
562 submodule-disable: "{submodule-disable}"
563 choosing-strategy: default
566 - timed: "{obj:cron}"
568 server-name: "{gerrit-server-name}"
569 trigger-on: "{obj:gerrit_sonar_triggers}"
571 - project-compare-type: "ANT"
572 project-pattern: "{project}"
574 - branch-compare-type: "ANT"
575 branch-pattern: "**/{branch}"
576 file-paths: "{obj:gerrit_trigger_file_paths}"
584 name: "{project-name}-tox-sonar"
586 <<: *lf_python_common
590 - lf-infra-properties:
591 build-days-to-keep: "{build-days-to-keep}"
593 url: "{github-url}/{github-org}/{project}"
596 - lf-infra-github-scm:
597 url: "{git-clone-url}{github-org}/{project}"
598 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
600 submodule-recursive: "{submodule-recursive}"
601 submodule-timeout: "{submodule-timeout}"
602 submodule-disable: "{submodule-disable}"
603 choosing-strategy: default
604 jenkins-ssh-credential: "{jenkins-ssh-credential}"
607 - github-pull-request:
608 trigger-phrase: "^run-sonar$"
609 only-trigger-phrase: false
610 status-context: "Python Sonar"
613 white-list-target-branches:
615 included-regions: "{obj:github_included_regions}"
621 - lf_tox_sonarqube: &lf_tox_sonarqube
622 name: lf-tox-sonarqube
624 ######################
625 # Default parameters #
626 ######################
630 branch: master # Sonar should always be run on master branch
631 build-days-to-keep: 7
635 git-url: "$GIT_URL/$PROJECT"
636 github-url: "https://github.com"
638 pre-build-script: "# pre-build script goes here"
639 python-version: python3
641 submodule-recursive: true
642 submodule-timeout: 10
643 submodule-disable: false
647 sonar-additional-args: ""
649 sonar-project-file: "sonar-project.properties"
653 #####################
654 # Job Configuration #
655 #####################
657 project-type: freestyle
659 disabled: "{disable-job}"
662 - lf-infra-properties:
663 build-days-to-keep: "{build-days-to-keep}"
667 build-timeout: "{build-timeout}"
668 jenkins-ssh-credential: "{jenkins-ssh-credential}"
671 - lf-infra-parameters:
675 - lf-infra-tox-parameters:
677 tox-envs: "{tox-envs}"
679 name: ARCHIVE_ARTIFACTS
680 default: "{archive-artifacts}"
681 description: Artifacts to archive to the logs server.
685 - lf-infra-tox-install:
686 python-version: "{python-version}"
687 - shell: "{pre-build-script}"
689 parallel: "{parallel}"
691 sonar-task: "{sonar-task}"
692 sonar-project-file: "{sonar-project-file}"
693 sonar-properties: "{sonar-properties}"
694 sonar-java-opts: "{sonar-java-opts}"
695 sonar-additional-args: "{sonar-additional-args}"
701 name: "{project-name}-tox-sonarqube"
702 id: gerrit-tox-sonarqube
704 <<: *lf_tox_sonarqube
706 ######################
707 # Default parameters #
708 ######################
710 gerrit_sonar_triggers:
711 - comment-added-contains-event:
712 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
715 - lf-infra-gerrit-scm:
716 branch: "$GERRIT_BRANCH"
717 jenkins-ssh-credential: "{jenkins-ssh-credential}"
719 refspec: "$GERRIT_REFSPEC"
720 submodule-recursive: "{submodule-recursive}"
721 submodule-timeout: "{submodule-timeout}"
722 submodule-disable: "{submodule-disable}"
723 choosing-strategy: default
726 - timed: "{obj:cron}"
728 server-name: "{gerrit-server-name}"
729 trigger-on: "{obj:gerrit_sonar_triggers}"
731 - project-compare-type: "ANT"
732 project-pattern: "{project}"
734 - branch-compare-type: "ANT"
735 branch-pattern: "**/{branch}"
738 name: "{project-name}-tox-sonarqube"
739 id: github-tox-sonarqube
741 <<: *lf_tox_sonarqube
744 - lf-infra-github-scm:
746 jenkins-ssh-credential: "{jenkins-ssh-credential}"
747 url: "{git-clone-url}{github-org}/{project}"
748 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
749 submodule-recursive: "{submodule-recursive}"
750 submodule-timeout: "{submodule-timeout}"
751 submodule-disable: "{submodule-disable}"
752 choosing-strategy: default
755 - github-pull-request:
756 trigger-phrase: "^run-sonar$"
757 only-trigger-phrase: false
758 status-context: "Tox Sonarqube"
761 white-list-target-branches:
768 - lf_tox_common: &lf_tox_common
771 ######################
772 # Default parameters #
773 ######################
776 build-days-to-keep: 7
779 git-url: "$GIT_URL/$GERRIT_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 gerrit_trigger_file_paths:
792 - compare-type: REG_EXP
795 # github_included_regions MUST match gerrit_trigger_file_paths
796 github_included_regions:
799 #####################
800 # Job Configuration #
801 #####################
803 project-type: freestyle
806 disabled: "{disable-job}"
809 - lf-infra-properties:
810 build-days-to-keep: "{build-days-to-keep}"
813 - lf-infra-parameters:
817 - lf-infra-tox-parameters:
819 tox-envs: "{tox-envs}"
823 build-timeout: "{build-timeout}"
824 jenkins-ssh-credential: "{jenkins-ssh-credential}"
828 - lf-infra-tox-install:
829 python-version: "{python-version}"
830 - shell: "{pre-build-script}"
832 parallel: "{parallel}"
838 # Python projects typically use tox to run testing.
839 name: "{project-name}-tox-verify-{stream}"
840 id: gerrit-tox-verify
843 ######################
844 # Default parameters #
845 ######################
847 gerrit-skip-vote: false
848 gerrit_verify_triggers:
849 - patchset-created-event:
851 exclude-trivial-rebase: false
852 exclude-no-code-change: false
853 - draft-published-event
854 - comment-added-contains-event:
855 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
857 #####################
858 # Job Configuration #
859 #####################
862 - lf-infra-gerrit-scm:
863 jenkins-ssh-credential: "{jenkins-ssh-credential}"
865 refspec: "$GERRIT_REFSPEC"
866 branch: "$GERRIT_BRANCH"
867 submodule-recursive: "{submodule-recursive}"
868 submodule-timeout: "{submodule-timeout}"
869 submodule-disable: "{submodule-disable}"
870 choosing-strategy: gerrit
874 server-name: "{gerrit-server-name}"
875 trigger-on: "{obj:gerrit_verify_triggers}"
877 - project-compare-type: ANT
878 project-pattern: "{project}"
880 - branch-compare-type: ANT
881 branch-pattern: "**/{branch}"
882 file-paths: "{obj:gerrit_trigger_file_paths}"
884 successful: "{gerrit-skip-vote}"
885 failed: "{gerrit-skip-vote}"
886 unstable: "{gerrit-skip-vote}"
887 notbuilt: "{gerrit-skip-vote}"
890 # Python projects typically use tox to run testing.
891 name: "{project-name}-tox-verify-{stream}"
892 id: github-tox-verify
896 - lf-infra-properties:
897 build-days-to-keep: "{build-days-to-keep}"
899 url: "{github-url}/{github-org}/{project}"
902 - lf-infra-github-scm:
903 url: "{git-clone-url}{github-org}/{project}"
904 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
906 submodule-recursive: "{submodule-recursive}"
907 submodule-timeout: "{submodule-timeout}"
908 submodule-disable: "{submodule-disable}"
909 choosing-strategy: default
910 jenkins-ssh-credential: "{jenkins-ssh-credential}"
913 - github-pull-request:
914 trigger-phrase: "^(recheck|reverify)$"
915 only-trigger-phrase: false
916 status-context: "Tox Verify"
919 white-list-target-branches:
921 included-regions: "{obj:github_included_regions}"
924 # Run tox after merge of gerrit change set
925 name: "{project-name}-tox-merge-{stream}"
929 ######################
930 # Default parameters #
931 ######################
933 gerrit_merge_triggers:
934 - change-merged-event
935 - comment-added-contains-event:
936 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
938 #####################
939 # Job Configuration #
940 #####################
943 - lf-infra-gerrit-scm:
944 jenkins-ssh-credential: "{jenkins-ssh-credential}"
946 refspec: "$GERRIT_REFSPEC"
947 branch: "$GERRIT_BRANCH"
948 submodule-recursive: "{submodule-recursive}"
949 submodule-timeout: "{submodule-timeout}"
950 submodule-disable: "{submodule-disable}"
951 # merge jobs always build from tip
952 choosing-strategy: default
956 server-name: "{gerrit-server-name}"
957 trigger-on: "{obj:gerrit_merge_triggers}"
959 - project-compare-type: ANT
960 project-pattern: "{project}"
962 - branch-compare-type: ANT
963 branch-pattern: "**/{branch}"
964 file-paths: "{obj:gerrit_trigger_file_paths}"
967 # Run tox after merge of github pull request
968 name: "{project-name}-tox-merge-{stream}"
973 - lf-infra-properties:
974 build-days-to-keep: "{build-days-to-keep}"
976 url: "{github-url}/{github-org}/{project}"
979 - lf-infra-github-scm:
980 url: "{git-clone-url}{github-org}/{project}"
982 branch: "refs/heads/{branch}"
983 submodule-recursive: "{submodule-recursive}"
984 submodule-timeout: "{submodule-timeout}"
985 submodule-disable: "{submodule-disable}"
986 choosing-strategy: default
987 jenkins-ssh-credential: "{jenkins-ssh-credential}"
990 - github-pull-request:
991 trigger-phrase: "^remerge$"
992 only-trigger-phrase: true
993 status-context: "Tox Merge"
998 white-list: "{obj:github_pr_allowlist}"
999 admin-list: "{obj:github_pr_admin_list}"
1000 white-list-target-branches:
1002 included-regions: "{obj:github_included_regions}"
1008 - lf_pypi_common: &lf_pypi_common
1009 name: lf-pypi-common
1011 ######################
1012 # Default parameters #
1013 ######################
1015 archive-artifacts: >
1018 build-days-to-keep: 7
1022 git-url: "$GIT_URL/$GERRIT_PROJECT"
1023 github-url: "https://github.com"
1025 pre-build-script: "# pre-build script goes here"
1026 python-version: python3
1028 submodule-disable: false
1029 submodule-recursive: true
1030 submodule-timeout: 10
1034 gerrit_trigger_file_paths:
1035 - compare-type: REG_EXP
1038 # github_included_regions MUST match gerrit_trigger_file_paths
1039 github_included_regions:
1042 #####################
1043 # Job Configuration #
1044 #####################
1046 project-type: freestyle
1047 node: "{build-node}"
1048 disabled: "{disable-job}"
1051 - lf-infra-properties:
1052 build-days-to-keep: "{build-days-to-keep}"
1055 - lf-infra-parameters:
1056 project: "{project}"
1059 - lf-infra-tox-parameters:
1060 tox-dir: "{tox-dir}"
1061 tox-envs: "{tox-envs}"
1063 name: BUILD_BDIST_WHEEL
1064 default: "{dist-binary}"
1065 description: "Set to True (checked) to build a binary distribution"
1069 description: "Set to True (checked) to skip uploading artifacts"
1072 - lf-infra-wrappers:
1073 build-timeout: "{build-timeout}"
1074 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1079 - lf_pypi_verify_builders: &lf_pypi_verify_builders
1080 name: lf-pypi-verify-builders
1083 - lf-infra-pre-build
1084 - lf-infra-tox-install:
1085 python-version: "{python-version}"
1086 - shell: "{pre-build-script}"
1088 parallel: "{parallel}"
1089 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1091 - lf_pypi_publish_builders: &lf_pypi_publish_builders
1092 name: lf-pypi-publish-builders
1095 - lf-infra-pre-build
1096 - lf-infra-tox-install:
1097 python-version: "{python-version}"
1098 - shell: "{pre-build-script}"
1100 parallel: "{parallel}"
1101 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1102 - config-file-provider:
1105 target: "$HOME/.pypirc"
1107 properties-content: "REPOSITORY={pypi-repo}"
1108 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1111 name: "{project-name}-pypi-verify-{stream}"
1112 id: gerrit-pypi-verify
1114 <<: *lf_pypi_verify_builders
1117 - lf-infra-gerrit-scm:
1118 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1119 git-url: "{git-url}"
1120 refspec: "$GERRIT_REFSPEC"
1121 branch: "$GERRIT_BRANCH"
1122 submodule-recursive: "{submodule-recursive}"
1123 submodule-timeout: "{submodule-timeout}"
1124 submodule-disable: "{submodule-disable}"
1125 choosing-strategy: gerrit
1129 server-name: "{gerrit-server-name}"
1131 - patchset-created-event:
1132 exclude-drafts: true
1133 exclude-trivial-rebase: false
1134 exclude-no-code-change: false
1135 - draft-published-event
1136 - comment-added-contains-event:
1137 # yamllint disable-line rule:line-length
1138 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1140 - project-compare-type: ANT
1141 project-pattern: "{project}"
1143 - branch-compare-type: ANT
1144 branch-pattern: "**/{branch}"
1145 file-paths: "{obj:gerrit_trigger_file_paths}"
1148 name: "{project-name}-pypi-verify-{stream}"
1149 id: github-pypi-verify
1151 <<: *lf_pypi_verify_builders
1155 url: "{github-url}/{github-org}/{project}"
1158 - lf-infra-github-scm:
1159 url: "{git-clone-url}{github-org}/{project}"
1160 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1162 submodule-recursive: "{submodule-recursive}"
1163 submodule-timeout: "{submodule-timeout}"
1164 submodule-disable: "{submodule-disable}"
1165 choosing-strategy: default
1166 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1169 - github-pull-request:
1170 trigger-phrase: "^(recheck|reverify)$"
1171 only-trigger-phrase: false
1172 status-context: "PyPI Verify"
1175 white-list-target-branches:
1177 included-regions: "{obj:github_included_regions}"
1180 name: "{project-name}-pypi-merge-{stream}"
1181 id: gerrit-pypi-merge
1183 <<: *lf_pypi_publish_builders
1185 cron: "" # avoid for pypi which rejects duplicates
1186 pypi-repo: pypi-test
1189 - lf-infra-gerrit-scm:
1190 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1191 git-url: "{git-url}"
1192 refspec: "$GERRIT_REFSPEC"
1193 branch: "$GERRIT_BRANCH"
1194 submodule-recursive: "{submodule-recursive}"
1195 submodule-timeout: "{submodule-timeout}"
1196 submodule-disable: "{submodule-disable}"
1197 # merge jobs always build from tip
1198 choosing-strategy: default
1201 - timed: "{obj:cron}"
1203 server-name: "{gerrit-server-name}"
1205 - change-merged-event
1206 - comment-added-contains-event:
1207 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1209 - project-compare-type: ANT
1210 project-pattern: "{project}"
1212 - branch-compare-type: ANT
1213 branch-pattern: "**/{branch}"
1214 file-paths: "{obj:gerrit_trigger_file_paths}"
1217 name: "{project-name}-pypi-merge-{stream}"
1218 id: github-pypi-merge
1220 <<: *lf_pypi_publish_builders
1223 pypi-repo: pypi-test
1227 url: "{github-url}/{github-org}/{project}"
1230 - lf-infra-github-scm:
1231 url: "{git-clone-url}{github-org}/{project}"
1233 branch: "refs/heads/{branch}"
1234 submodule-recursive: "{submodule-recursive}"
1235 submodule-timeout: "{submodule-timeout}"
1236 submodule-disable: "{submodule-disable}"
1237 choosing-strategy: default
1238 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1241 - timed: "{obj:cron}"
1242 - github-pull-request:
1243 trigger-phrase: "^remerge$"
1244 only-trigger-phrase: false
1245 status-context: "Merge"
1250 white-list: "{obj:github_pr_allowlist}"
1251 admin-list: "{obj:github_pr_admin_list}"
1252 white-list-target-branches:
1254 included-regions: "{obj:github_included_regions}"
1257 name: "{project-name}-pypi-stage-{stream}"
1258 id: gerrit-pypi-stage
1260 <<: *lf_pypi_publish_builders
1263 pypi-repo: pypi-test
1265 gerrit_stage_triggers:
1266 - comment-added-contains-event:
1267 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1270 - lf-infra-gerrit-scm:
1271 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1272 git-url: "{git-url}"
1273 refspec: "$GERRIT_REFSPEC"
1274 branch: "$GERRIT_BRANCH"
1275 submodule-recursive: "{submodule-recursive}"
1276 submodule-timeout: "{submodule-timeout}"
1277 submodule-disable: "{submodule-disable}"
1278 # stage jobs always build from tip
1279 choosing-strategy: default
1282 - timed: "{obj:cron}"
1284 server-name: "{gerrit-server-name}"
1285 trigger-on: "{obj:gerrit_stage_triggers}"
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-stage-{stream}"
1296 id: github-pypi-stage
1298 <<: *lf_pypi_publish_builders
1301 pypi-repo: pypi-test
1305 url: "{github-url}/{github-org}/{project}"
1308 - lf-infra-github-scm:
1309 url: "{git-clone-url}{github-org}/{project}"
1311 branch: "refs/heads/{branch}"
1312 submodule-recursive: "{submodule-recursive}"
1313 submodule-timeout: "{submodule-timeout}"
1314 submodule-disable: "{submodule-disable}"
1315 choosing-strategy: default
1316 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1319 - timed: "{obj:cron}"
1320 - github-pull-request:
1321 trigger-phrase: "^stage-release$"
1322 only-trigger-phrase: true
1323 status-context: "Release"
1326 white-list-target-branches:
1328 included-regions: "{obj:github_included_regions}"