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 pre-build-script: "# pre-build script goes here"
90 python-version: python3
91 requirements-file: requirements.txt
93 submodule-recursive: true
95 submodule-disable: false
100 # Job Configuration #
101 #####################
103 disabled: "{disable-job}"
106 - lf-infra-parameters:
110 - lf-infra-tox-parameters:
112 tox-envs: "{tox-envs}"
114 name: ARCHIVE_ARTIFACTS
115 default: "{archive-artifacts}"
116 description: Artifacts to archive to the logs server.
118 name: NEXUS_IQ_CLI_VERSION
119 default: "{nexus-iq-cli-version}"
120 description: Nexus IQ CLI jar to download and run.
124 build-timeout: "{build-timeout}"
125 jenkins-ssh-credential: "{jenkins-ssh-credential}"
126 - credentials-binding:
127 - username-password-separated:
128 credential-id: nexus-iq-xc-clm
129 username: NEXUS_IQ_USER
130 password: NEXUS_IQ_PASSWORD
134 - lf-update-java-alternatives:
135 java-version: "{java-version}"
136 - lf-infra-tox-install:
137 python-version: "{python-version}"
138 - shell: "{pre-build-script}"
141 - lf-infra-nexus-iq-python-cli:
142 nexus-iq-project-name: "{nexus-iq-namespace}{project-name}"
143 requirements-file: "{requirements-file}"
146 name: "{project-name}-tox-nexus-iq-clm"
147 id: gerrit-tox-nexus-iq-clm
148 <<: *lf_python_common
149 <<: *lf_tox_nexus_iq_clm
151 ######################
152 # Default parameters #
153 ######################
155 gerrit_nexus_iq_triggers:
156 - comment-added-contains-event:
157 comment-contains-value: '^Patch Set\s+\d+:\s+run-clm\s*$'
159 #####################
160 # Job Configuration #
161 #####################
164 - lf-infra-gerrit-scm:
165 jenkins-ssh-credential: "{jenkins-ssh-credential}"
167 refspec: "$GERRIT_REFSPEC"
168 branch: "$GERRIT_BRANCH"
169 submodule-recursive: "{submodule-recursive}"
170 submodule-timeout: "{submodule-timeout}"
171 submodule-disable: "{submodule-disable}"
172 choosing-strategy: default
175 - timed: "{obj:cron}"
177 server-name: "{gerrit-server-name}"
178 trigger-on: "{obj:gerrit_nexus_iq_triggers}"
180 - project-compare-type: ANT
181 project-pattern: "{project}"
183 - branch-compare-type: ANT
184 branch-pattern: "**/{branch}"
192 name: "{project-name}-tox-nexus-iq"
193 id: github-tox-nexus-iq-clm
194 <<: *lf_python_common
195 <<: *lf_tox_nexus_iq_clm
198 - lf-infra-properties:
199 build-days-to-keep: "{build-days-to-keep}"
201 url: "{github-url}/{github-org}/{project}"
204 - lf-infra-github-scm:
205 url: "{git-clone-url}{github-org}/{project}"
207 branch: "refs/heads/{branch}"
208 submodule-recursive: "{submodule-recursive}"
209 submodule-timeout: "{submodule-timeout}"
210 submodule-disable: "{submodule-disable}"
211 choosing-strategy: default
212 jenkins-ssh-credential: "{jenkins-ssh-credential}"
215 - timed: "{obj:cron}"
216 - github-pull-request:
217 trigger-phrase: "^run-clm$"
218 only-trigger-phrase: false
219 status-context: "CLM"
222 white-list-target-branches:
225 #########################
226 # Python Sonar with CLI #
227 #########################
229 - lf_cli_sonar: &lf_cli_sonar
232 ######################
233 # Default parameters #
234 ######################
236 branch: master # Sonar should always be run on master branch
237 build-days-to-keep: 7
239 cron: "H H * * *" # run daily
241 git-url: "$GIT_URL/$PROJECT"
242 github-url: "https://github.com"
243 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
244 # Projects not compatible with jdk11 can set java-version to something else
245 java-version: openjdk11
247 pre-build-script: "# pre-build script goes here"
248 python-version: python3
250 sonar-scanner-version: "4.7.0.2747"
251 sonar-scanner-home: "$WORKSPACE/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux"
252 sonar-scanner-opts: "-server"
253 submodule-recursive: true
254 submodule-timeout: 10
255 submodule-disable: false
259 gerrit_trigger_file_paths:
260 - compare-type: REG_EXP
263 # github_included_regions MUST match gerrit_trigger_file_paths
264 github_included_regions:
267 #####################
268 # Job Configuration #
269 #####################
271 disabled: "{disable-job}"
274 - lf-infra-parameters:
278 - lf-infra-sonar-cli-parameters:
280 tox-envs: "{tox-envs}"
281 sonar-scanner-version: "{sonar-scanner-version}"
282 sonar-scanner-home: "{sonar-scanner-home}"
283 sonar-scanner-opts: "{sonar-scanner-opts}"
285 name: ARCHIVE_ARTIFACTS
286 default: "{archive-artifacts}"
287 description: Artifacts to archive to the logs server.
289 - credentials-binding:
291 credential-id: sonar-token-{project-name}
292 variable: SONAR_TOKEN
295 - lf-infra-tox-install:
296 python-version: "{python-version}"
297 - shell: "{pre-build-script}"
299 parallel: "{parallel}"
302 properties-content: |
303 SONARCLOUD_PROJECT_ORGANIZATION={sonarcloud-project-organization}
304 SONARCLOUD_PROJECT_KEY={sonarcloud-project-key}
305 - shell: !include-raw-escape: ../shell/sonar-cli.sh
311 name: "{project-name}-cli-sonar"
313 <<: *lf_python_common
316 ######################
317 # Default parameters #
318 ######################
320 gerrit_sonar_triggers:
321 - comment-added-contains-event:
322 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
324 #####################
325 # Job Configuration #
326 #####################
329 - lf-infra-gerrit-scm:
330 jenkins-ssh-credential: "{jenkins-ssh-credential}"
332 refspec: $GERRIT_REFSPEC
333 branch: $GERRIT_BRANCH
334 submodule-recursive: "{submodule-recursive}"
335 submodule-timeout: "{submodule-timeout}"
336 submodule-disable: "{submodule-disable}"
337 choosing-strategy: default
340 - timed: "{obj:cron}"
342 server-name: "{gerrit-server-name}"
343 trigger-on: "{obj:gerrit_sonar_triggers}"
345 - project-compare-type: "ANT"
346 project-pattern: "{project}"
348 - branch-compare-type: "ANT"
349 branch-pattern: "**/{branch}"
350 file-paths: "{obj:gerrit_trigger_file_paths}"
358 name: "{project-name}-cli-sonar"
360 <<: *lf_python_common
364 - lf-infra-properties:
365 build-days-to-keep: "{build-days-to-keep}"
367 url: "{github-url}/{github-org}/{project}"
370 - lf-infra-github-scm:
371 url: "{git-clone-url}{github-org}/{project}"
372 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
374 submodule-recursive: "{submodule-recursive}"
375 submodule-timeout: "{submodule-timeout}"
376 submodule-disable: "{submodule-disable}"
377 choosing-strategy: default
378 jenkins-ssh-credential: "{jenkins-ssh-credential}"
381 - github-pull-request:
382 trigger-phrase: "^run-sonar$"
383 only-trigger-phrase: false
384 status-context: "Python Sonar"
387 white-list-target-branches:
389 included-regions: "{obj:github_included_regions}"
391 #########################
392 # Python Sonar with Tox #
393 #########################
395 - lf_tox_sonar: &lf_tox_sonar
398 ######################
399 # Default parameters #
400 ######################
402 branch: master # Sonar should always be run on master branch
403 build-days-to-keep: 7
405 cron: "H H * * *" # run daily
407 git-url: "$GIT_URL/$PROJECT"
408 github-url: "https://github.com"
409 java-version: openjdk11
410 mvn-global-settings: global-settings
414 mvn-settings: "{mvn-settings}"
417 pre-build-script: "# pre-build script goes here"
418 python-version: python3
419 sonar-mvn-goal: "sonar:sonar"
421 sonarcloud-project-key: ""
422 sonarcloud-project-organization: ""
423 sonarcloud-api-token-cred-id: sonarcloud-api-token
424 sonarcloud-qualitygate-wait: false
425 # SonarCloud scan using jdk8 will become deprecated by Oct, 2020
426 # Projects not compatible with jdk11 can set java-version to something else
427 sonarcloud-java-version: openjdk11
429 submodule-recursive: true
430 submodule-timeout: 10
431 submodule-disable: false
434 scan-dev-branch: false
436 gerrit_trigger_file_paths:
437 - compare-type: REG_EXP
440 # github_included_regions MUST match gerrit_trigger_file_paths
441 github_included_regions:
444 #####################
445 # Job Configuration #
446 #####################
448 disabled: "{disable-job}"
451 - lf-infra-parameters:
455 - lf-infra-maven-parameters:
456 mvn-opts: "{mvn-opts}"
457 mvn-params: "{mvn-params}"
458 mvn-version: "{mvn-version}"
459 - lf-infra-tox-parameters:
461 tox-envs: "{tox-envs}"
463 name: ARCHIVE_ARTIFACTS
464 default: "{archive-artifacts}"
465 description: Artifacts to archive to the logs server.
468 # Sets an env var for shell scripts to be able to call the dynamically
469 # installed maven without having to calculate the path themselves.
470 # yamllint disable-line rule:line-length
471 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
472 description: "Maven selector to be used by shell scripts"
474 name: SONAR_MAVEN_GOAL
475 default: "{sonar-mvn-goal}"
477 Maven goals to pass to the Sonar call. Typically sonar:sonar
478 however to use a specific version of the sonar-maven-plugin we
479 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
482 - credentials-binding:
484 credential-id: '{sonarcloud-api-token-cred-id}'
489 - lf-infra-tox-install:
490 python-version: "{python-version}"
491 - shell: "{pre-build-script}"
493 parallel: "{parallel}"
494 - lf-provide-maven-settings:
495 global-settings-file: "{mvn-global-settings}"
496 settings-file: "{mvn-settings}"
499 condition-kind: boolean-expression
500 condition-expression: "{sonarcloud}"
502 - shell: echo 'Using SonarCloud'
503 - lf-infra-maven-sonarcloud:
504 java-version: "{java-version}"
505 mvn-goals: "{mvn-goals}"
506 mvn-settings: "{mvn-settings}"
507 mvn-version: "{mvn-version}"
508 sonarcloud-project-key: "{sonarcloud-project-key}"
509 # yamllint disable-line rule:line-length
510 sonarcloud-project-organization: "{sonarcloud-project-organization}"
511 sonarcloud-java-version: "{sonarcloud-java-version}"
512 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
513 scan-dev-branch: "{scan-dev-branch}"
518 condition-kind: boolean-expression
519 condition-expression: "{sonarcloud}"
521 - shell: echo 'Using SonarQube'
522 - lf-infra-maven-sonar:
523 java-version: "{java-version}"
524 mvn-goals: "{mvn-goals}"
525 mvn-settings: "{mvn-settings}"
526 mvn-version: "{mvn-version}"
532 name: "{project-name}-tox-sonar"
534 <<: *lf_python_common
537 ######################
538 # Default parameters #
539 ######################
541 gerrit_sonar_triggers:
542 - comment-added-contains-event:
543 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
545 #####################
546 # Job Configuration #
547 #####################
550 - lf-infra-gerrit-scm:
551 jenkins-ssh-credential: "{jenkins-ssh-credential}"
553 refspec: $GERRIT_REFSPEC
554 branch: $GERRIT_BRANCH
555 submodule-recursive: "{submodule-recursive}"
556 submodule-timeout: "{submodule-timeout}"
557 submodule-disable: "{submodule-disable}"
558 choosing-strategy: default
561 - timed: "{obj:cron}"
563 server-name: "{gerrit-server-name}"
564 trigger-on: "{obj:gerrit_sonar_triggers}"
566 - project-compare-type: "ANT"
567 project-pattern: "{project}"
569 - branch-compare-type: "ANT"
570 branch-pattern: "**/{branch}"
571 file-paths: "{obj:gerrit_trigger_file_paths}"
579 name: "{project-name}-tox-sonar"
581 <<: *lf_python_common
585 - lf-infra-properties:
586 build-days-to-keep: "{build-days-to-keep}"
588 url: "{github-url}/{github-org}/{project}"
591 - lf-infra-github-scm:
592 url: "{git-clone-url}{github-org}/{project}"
593 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
595 submodule-recursive: "{submodule-recursive}"
596 submodule-timeout: "{submodule-timeout}"
597 submodule-disable: "{submodule-disable}"
598 choosing-strategy: default
599 jenkins-ssh-credential: "{jenkins-ssh-credential}"
602 - github-pull-request:
603 trigger-phrase: "^run-sonar$"
604 only-trigger-phrase: false
605 status-context: "Python Sonar"
608 white-list-target-branches:
610 included-regions: "{obj:github_included_regions}"
616 - lf_tox_sonarqube: &lf_tox_sonarqube
617 name: lf-tox-sonarqube
619 ######################
620 # Default parameters #
621 ######################
625 branch: master # Sonar should always be run on master branch
626 build-days-to-keep: 7
630 git-url: "$GIT_URL/$PROJECT"
631 github-url: "https://github.com"
633 pre-build-script: "# pre-build script goes here"
634 python-version: python3
636 submodule-recursive: true
637 submodule-timeout: 10
638 submodule-disable: false
642 sonar-additional-args: ""
644 sonar-project-file: "sonar-project.properties"
648 #####################
649 # Job Configuration #
650 #####################
652 project-type: freestyle
654 disabled: "{disable-job}"
657 - lf-infra-properties:
658 build-days-to-keep: "{build-days-to-keep}"
662 build-timeout: "{build-timeout}"
663 jenkins-ssh-credential: "{jenkins-ssh-credential}"
666 - lf-infra-parameters:
670 - lf-infra-tox-parameters:
672 tox-envs: "{tox-envs}"
674 name: ARCHIVE_ARTIFACTS
675 default: "{archive-artifacts}"
676 description: Artifacts to archive to the logs server.
680 - lf-infra-tox-install:
681 python-version: "{python-version}"
682 - shell: "{pre-build-script}"
684 parallel: "{parallel}"
686 sonar-task: "{sonar-task}"
687 sonar-project-file: "{sonar-project-file}"
688 sonar-properties: "{sonar-properties}"
689 sonar-java-opts: "{sonar-java-opts}"
690 sonar-additional-args: "{sonar-additional-args}"
696 name: "{project-name}-tox-sonarqube"
697 id: gerrit-tox-sonarqube
699 <<: *lf_tox_sonarqube
701 ######################
702 # Default parameters #
703 ######################
705 gerrit_sonar_triggers:
706 - comment-added-contains-event:
707 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
710 - lf-infra-gerrit-scm:
711 branch: "$GERRIT_BRANCH"
712 jenkins-ssh-credential: "{jenkins-ssh-credential}"
714 refspec: "$GERRIT_REFSPEC"
715 submodule-recursive: "{submodule-recursive}"
716 submodule-timeout: "{submodule-timeout}"
717 submodule-disable: "{submodule-disable}"
718 choosing-strategy: default
721 - timed: "{obj:cron}"
723 server-name: "{gerrit-server-name}"
724 trigger-on: "{obj:gerrit_sonar_triggers}"
726 - project-compare-type: "ANT"
727 project-pattern: "{project}"
729 - branch-compare-type: "ANT"
730 branch-pattern: "**/{branch}"
733 name: "{project-name}-tox-sonarqube"
734 id: github-tox-sonarqube
736 <<: *lf_tox_sonarqube
739 - lf-infra-github-scm:
741 jenkins-ssh-credential: "{jenkins-ssh-credential}"
742 url: "{git-clone-url}{github-org}/{project}"
743 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
744 submodule-recursive: "{submodule-recursive}"
745 submodule-timeout: "{submodule-timeout}"
746 submodule-disable: "{submodule-disable}"
747 choosing-strategy: default
750 - github-pull-request:
751 trigger-phrase: "^run-sonar$"
752 only-trigger-phrase: false
753 status-context: "Tox Sonarqube"
756 white-list-target-branches:
763 - lf_tox_common: &lf_tox_common
766 ######################
767 # Default parameters #
768 ######################
771 build-days-to-keep: 7
774 git-url: "$GIT_URL/$GERRIT_PROJECT"
775 github-url: "https://github.com"
777 pre-build-script: "# pre-build script goes here"
778 python-version: python3
780 submodule-recursive: true
781 submodule-timeout: 10
782 submodule-disable: false
786 gerrit_trigger_file_paths:
787 - compare-type: REG_EXP
790 # github_included_regions MUST match gerrit_trigger_file_paths
791 github_included_regions:
794 #####################
795 # Job Configuration #
796 #####################
798 project-type: freestyle
801 disabled: "{disable-job}"
804 - lf-infra-properties:
805 build-days-to-keep: "{build-days-to-keep}"
808 - lf-infra-parameters:
812 - lf-infra-tox-parameters:
814 tox-envs: "{tox-envs}"
818 build-timeout: "{build-timeout}"
819 jenkins-ssh-credential: "{jenkins-ssh-credential}"
823 - lf-infra-tox-install:
824 python-version: "{python-version}"
825 - shell: "{pre-build-script}"
827 parallel: "{parallel}"
833 # Python projects typically use tox to run testing.
834 name: "{project-name}-tox-verify-{stream}"
835 id: gerrit-tox-verify
838 ######################
839 # Default parameters #
840 ######################
842 gerrit-skip-vote: false
843 gerrit_verify_triggers:
844 - patchset-created-event:
846 exclude-trivial-rebase: false
847 exclude-no-code-change: false
848 - draft-published-event
849 - comment-added-contains-event:
850 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
852 #####################
853 # Job Configuration #
854 #####################
857 - lf-infra-gerrit-scm:
858 jenkins-ssh-credential: "{jenkins-ssh-credential}"
860 refspec: "$GERRIT_REFSPEC"
861 branch: "$GERRIT_BRANCH"
862 submodule-recursive: "{submodule-recursive}"
863 submodule-timeout: "{submodule-timeout}"
864 submodule-disable: "{submodule-disable}"
865 choosing-strategy: gerrit
869 server-name: "{gerrit-server-name}"
870 trigger-on: "{obj:gerrit_verify_triggers}"
872 - project-compare-type: ANT
873 project-pattern: "{project}"
875 - branch-compare-type: ANT
876 branch-pattern: "**/{branch}"
877 file-paths: "{obj:gerrit_trigger_file_paths}"
879 successful: "{gerrit-skip-vote}"
880 failed: "{gerrit-skip-vote}"
881 unstable: "{gerrit-skip-vote}"
882 notbuilt: "{gerrit-skip-vote}"
885 # Python projects typically use tox to run testing.
886 name: "{project-name}-tox-verify-{stream}"
887 id: github-tox-verify
891 - lf-infra-properties:
892 build-days-to-keep: "{build-days-to-keep}"
894 url: "{github-url}/{github-org}/{project}"
897 - lf-infra-github-scm:
898 url: "{git-clone-url}{github-org}/{project}"
899 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
901 submodule-recursive: "{submodule-recursive}"
902 submodule-timeout: "{submodule-timeout}"
903 submodule-disable: "{submodule-disable}"
904 choosing-strategy: default
905 jenkins-ssh-credential: "{jenkins-ssh-credential}"
908 - github-pull-request:
909 trigger-phrase: "^(recheck|reverify)$"
910 only-trigger-phrase: false
911 status-context: "Tox Verify"
914 white-list-target-branches:
916 included-regions: "{obj:github_included_regions}"
919 # Run tox after merge of gerrit change set
920 name: "{project-name}-tox-merge-{stream}"
924 ######################
925 # Default parameters #
926 ######################
928 gerrit_merge_triggers:
929 - change-merged-event
930 - comment-added-contains-event:
931 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
933 #####################
934 # Job Configuration #
935 #####################
938 - lf-infra-gerrit-scm:
939 jenkins-ssh-credential: "{jenkins-ssh-credential}"
941 refspec: "$GERRIT_REFSPEC"
942 branch: "$GERRIT_BRANCH"
943 submodule-recursive: "{submodule-recursive}"
944 submodule-timeout: "{submodule-timeout}"
945 submodule-disable: "{submodule-disable}"
946 # merge jobs always build from tip
947 choosing-strategy: default
951 server-name: "{gerrit-server-name}"
952 trigger-on: "{obj:gerrit_merge_triggers}"
954 - project-compare-type: ANT
955 project-pattern: "{project}"
957 - branch-compare-type: ANT
958 branch-pattern: "**/{branch}"
959 file-paths: "{obj:gerrit_trigger_file_paths}"
962 # Run tox after merge of github pull request
963 name: "{project-name}-tox-merge-{stream}"
968 - lf-infra-properties:
969 build-days-to-keep: "{build-days-to-keep}"
971 url: "{github-url}/{github-org}/{project}"
974 - lf-infra-github-scm:
975 url: "{git-clone-url}{github-org}/{project}"
977 branch: "refs/heads/{branch}"
978 submodule-recursive: "{submodule-recursive}"
979 submodule-timeout: "{submodule-timeout}"
980 submodule-disable: "{submodule-disable}"
981 choosing-strategy: default
982 jenkins-ssh-credential: "{jenkins-ssh-credential}"
985 - github-pull-request:
986 trigger-phrase: "^remerge$"
987 only-trigger-phrase: true
988 status-context: "Tox Merge"
993 white-list: "{obj:github_pr_allowlist}"
994 admin-list: "{obj:github_pr_admin_list}"
995 white-list-target-branches:
997 included-regions: "{obj:github_included_regions}"
1003 - lf_pypi_common: &lf_pypi_common
1004 name: lf-pypi-common
1006 ######################
1007 # Default parameters #
1008 ######################
1010 archive-artifacts: >
1013 build-days-to-keep: 7
1017 git-url: "$GIT_URL/$GERRIT_PROJECT"
1018 github-url: "https://github.com"
1020 pre-build-script: "# pre-build script goes here"
1021 python-version: python3
1023 submodule-disable: false
1024 submodule-recursive: true
1025 submodule-timeout: 10
1029 gerrit_trigger_file_paths:
1030 - compare-type: REG_EXP
1033 # github_included_regions MUST match gerrit_trigger_file_paths
1034 github_included_regions:
1037 #####################
1038 # Job Configuration #
1039 #####################
1041 project-type: freestyle
1042 node: "{build-node}"
1043 disabled: "{disable-job}"
1046 - lf-infra-properties:
1047 build-days-to-keep: "{build-days-to-keep}"
1050 - lf-infra-parameters:
1051 project: "{project}"
1054 - lf-infra-tox-parameters:
1055 tox-dir: "{tox-dir}"
1056 tox-envs: "{tox-envs}"
1058 name: BUILD_BDIST_WHEEL
1059 default: "{dist-binary}"
1060 description: "Set to True (checked) to build a binary distribution"
1064 description: "Set to True (checked) to skip uploading artifacts"
1067 - lf-infra-wrappers:
1068 build-timeout: "{build-timeout}"
1069 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1074 - lf_pypi_verify_builders: &lf_pypi_verify_builders
1075 name: lf-pypi-verify-builders
1078 - lf-infra-pre-build
1079 - lf-infra-tox-install:
1080 python-version: "{python-version}"
1081 - shell: "{pre-build-script}"
1083 parallel: "{parallel}"
1084 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1086 - lf_pypi_publish_builders: &lf_pypi_publish_builders
1087 name: lf-pypi-publish-builders
1090 - lf-infra-pre-build
1091 - lf-infra-tox-install:
1092 python-version: "{python-version}"
1093 - shell: "{pre-build-script}"
1095 parallel: "{parallel}"
1096 - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
1097 - config-file-provider:
1100 target: "$HOME/.pypirc"
1102 properties-content: "REPOSITORY={pypi-repo}"
1103 - shell: !include-raw-escape: ../shell/pypi-upload.sh
1106 name: "{project-name}-pypi-verify-{stream}"
1107 id: gerrit-pypi-verify
1109 <<: *lf_pypi_verify_builders
1112 - lf-infra-gerrit-scm:
1113 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1114 git-url: "{git-url}"
1115 refspec: "$GERRIT_REFSPEC"
1116 branch: "$GERRIT_BRANCH"
1117 submodule-recursive: "{submodule-recursive}"
1118 submodule-timeout: "{submodule-timeout}"
1119 submodule-disable: "{submodule-disable}"
1120 choosing-strategy: gerrit
1124 server-name: "{gerrit-server-name}"
1126 - patchset-created-event:
1127 exclude-drafts: true
1128 exclude-trivial-rebase: false
1129 exclude-no-code-change: false
1130 - draft-published-event
1131 - comment-added-contains-event:
1132 # yamllint disable-line rule:line-length
1133 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1135 - project-compare-type: ANT
1136 project-pattern: "{project}"
1138 - branch-compare-type: ANT
1139 branch-pattern: "**/{branch}"
1140 file-paths: "{obj:gerrit_trigger_file_paths}"
1143 name: "{project-name}-pypi-verify-{stream}"
1144 id: github-pypi-verify
1146 <<: *lf_pypi_verify_builders
1150 url: "{github-url}/{github-org}/{project}"
1153 - lf-infra-github-scm:
1154 url: "{git-clone-url}{github-org}/{project}"
1155 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1157 submodule-recursive: "{submodule-recursive}"
1158 submodule-timeout: "{submodule-timeout}"
1159 submodule-disable: "{submodule-disable}"
1160 choosing-strategy: default
1161 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1164 - github-pull-request:
1165 trigger-phrase: "^(recheck|reverify)$"
1166 only-trigger-phrase: false
1167 status-context: "PyPI Verify"
1170 white-list-target-branches:
1172 included-regions: "{obj:github_included_regions}"
1175 name: "{project-name}-pypi-merge-{stream}"
1176 id: gerrit-pypi-merge
1178 <<: *lf_pypi_publish_builders
1180 cron: "" # avoid for pypi which rejects duplicates
1181 pypi-repo: pypi-test
1184 - lf-infra-gerrit-scm:
1185 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1186 git-url: "{git-url}"
1187 refspec: "$GERRIT_REFSPEC"
1188 branch: "$GERRIT_BRANCH"
1189 submodule-recursive: "{submodule-recursive}"
1190 submodule-timeout: "{submodule-timeout}"
1191 submodule-disable: "{submodule-disable}"
1192 # merge jobs always build from tip
1193 choosing-strategy: default
1196 - timed: "{obj:cron}"
1198 server-name: "{gerrit-server-name}"
1200 - change-merged-event
1201 - comment-added-contains-event:
1202 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1204 - project-compare-type: ANT
1205 project-pattern: "{project}"
1207 - branch-compare-type: ANT
1208 branch-pattern: "**/{branch}"
1209 file-paths: "{obj:gerrit_trigger_file_paths}"
1212 name: "{project-name}-pypi-merge-{stream}"
1213 id: github-pypi-merge
1215 <<: *lf_pypi_publish_builders
1218 pypi-repo: pypi-test
1222 url: "{github-url}/{github-org}/{project}"
1225 - lf-infra-github-scm:
1226 url: "{git-clone-url}{github-org}/{project}"
1228 branch: "refs/heads/{branch}"
1229 submodule-recursive: "{submodule-recursive}"
1230 submodule-timeout: "{submodule-timeout}"
1231 submodule-disable: "{submodule-disable}"
1232 choosing-strategy: default
1233 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1236 - timed: "{obj:cron}"
1237 - github-pull-request:
1238 trigger-phrase: "^remerge$"
1239 only-trigger-phrase: false
1240 status-context: "Merge"
1245 white-list: "{obj:github_pr_allowlist}"
1246 admin-list: "{obj:github_pr_admin_list}"
1247 white-list-target-branches:
1249 included-regions: "{obj:github_included_regions}"
1252 name: "{project-name}-pypi-stage-{stream}"
1253 id: gerrit-pypi-stage
1255 <<: *lf_pypi_publish_builders
1258 pypi-repo: pypi-test
1260 gerrit_stage_triggers:
1261 - comment-added-contains-event:
1262 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
1265 - lf-infra-gerrit-scm:
1266 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1267 git-url: "{git-url}"
1268 refspec: "$GERRIT_REFSPEC"
1269 branch: "$GERRIT_BRANCH"
1270 submodule-recursive: "{submodule-recursive}"
1271 submodule-timeout: "{submodule-timeout}"
1272 submodule-disable: "{submodule-disable}"
1273 # stage jobs always build from tip
1274 choosing-strategy: default
1277 - timed: "{obj:cron}"
1279 server-name: "{gerrit-server-name}"
1280 trigger-on: "{obj:gerrit_stage_triggers}"
1282 - project-compare-type: ANT
1283 project-pattern: "{project}"
1285 - branch-compare-type: ANT
1286 branch-pattern: "**/{branch}"
1287 file-paths: "{obj:gerrit_trigger_file_paths}"
1290 name: "{project-name}-pypi-stage-{stream}"
1291 id: github-pypi-stage
1293 <<: *lf_pypi_publish_builders
1296 pypi-repo: pypi-test
1300 url: "{github-url}/{github-org}/{project}"
1303 - lf-infra-github-scm:
1304 url: "{git-clone-url}{github-org}/{project}"
1306 branch: "refs/heads/{branch}"
1307 submodule-recursive: "{submodule-recursive}"
1308 submodule-timeout: "{submodule-timeout}"
1309 submodule-disable: "{submodule-disable}"
1310 choosing-strategy: default
1311 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1314 - timed: "{obj:cron}"
1315 - github-pull-request:
1316 trigger-phrase: "^stage-release$"
1317 only-trigger-phrase: true
1318 status-context: "Release"
1321 white-list-target-branches:
1323 included-regions: "{obj:github_included_regions}"