d215a67321b7bad1be4535f60687a4f57d3803ca
[releng/global-jjb.git] / jjb / lf-python-jobs.yaml
1 ---
2 ##########
3 # Macros #
4 ##########
5
6 - builder:
7     name: lf-infra-clm-python
8     builders:
9       - inject:
10           properties-content: "CLM_PROJECT_NAME={clm-project-name}"
11       - shell: !include-raw-escape: ../shell/nexus-iq-cli.sh
12
13 - builder:
14     name: lf-infra-tox-install
15     builders:
16       - inject:
17           properties-content: "PYTHON={python-version}"
18       - shell: !include-raw-escape: ../shell/tox-install.sh
19
20 - builder:
21     name: lf-infra-tox-run
22     builders:
23       - inject:
24           properties-content: "PARALLEL={parallel}"
25       - shell: !include-raw-escape: ../shell/tox-run.sh
26
27 ####################
28 # COMMON FUNCTIONS #
29 ####################
30
31 - lf_python_common: &lf_python_common
32     name: lf-python-common
33
34     ######################
35     # Default parameters #
36     ######################
37
38     archive-artifacts: >
39       **/*.log
40
41     #####################
42     # Job Configuration #
43     #####################
44
45     project-type: freestyle
46     node: "{build-node}"
47
48     properties:
49       - lf-infra-properties:
50           build-days-to-keep: "{build-days-to-keep}"
51
52     parameters:
53       - lf-infra-parameters:
54           project: "{project}"
55           branch: "{branch}"
56           stream: "{stream}"
57
58     wrappers:
59       - lf-infra-wrappers:
60           build-timeout: "{build-timeout}"
61           jenkins-ssh-credential: "{jenkins-ssh-credential}"
62
63     publishers:
64       - lf-infra-publish
65
66 #################
67 # Python XC CLM #
68 #################
69
70 - lf_python_clm_xc: &lf_python_xc_clm
71     name: lf-python-xc-clm
72
73     ######################
74     # Default parameters #
75     ######################
76
77     branch: master
78     build-days-to-keep: 30 # 30 days for troubleshooting purposes
79     build-timeout: 60
80     disable-job: false
81     git-url: "$GIT_URL/$PROJECT"
82     github-url: "https://github.com"
83     java-version: openjdk8
84     nexus-iq-cli-version: 1.44.0-01
85     nexus-iq-namespace: "" # Recommend a trailing dash when set. Example: odl-
86     pre-build-script: "  # pre-build script goes here"
87     stream: master
88     submodule-recursive: true
89     submodule-timeout: 10
90     submodule-disable: false
91
92     gerrit_trigger_file_paths:
93       - compare-type: REG_EXP
94         pattern: ".*"
95
96     # github_included_regions MUST match gerrit_trigger_file_paths
97     github_included_regions:
98       - ".*"
99
100     #####################
101     # Job Configuration #
102     #####################
103
104     disabled: "{disable-job}"
105
106     parameters:
107       - lf-infra-parameters:
108           project: "{project}"
109           branch: "{branch}"
110           stream: "{stream}"
111       - string:
112           name: NEXUS_IQ_CLI_VERSION
113           default: "{nexus-iq-cli-version}"
114           description: Nexus IQ CLI package to download and use.
115
116     wrappers:
117       - credentials-binding:
118           - username-password-separated:
119               credential-id: nexus-iq-xc-clm
120               username: CLM_USER
121               password: CLM_PASSWORD
122     builders:
123       - lf-update-java-alternatives:
124           java-version: "{java-version}"
125       - shell: "{pre-build-script}"
126       - lf-infra-clm-python:
127           clm-project-name: "{nexus-iq-namespace}{project-name}"
128
129 - job-template:
130     name: "{project-name}-python-clm-{stream}"
131     id: gerrit-python-xc-clm
132     <<: *lf_python_common
133     <<: *lf_python_xc_clm
134
135     ######################
136     # Default parameters #
137     ######################
138
139     gerrit_clm_triggers:
140       - comment-added-contains-event:
141           comment-contains-value: '^Patch Set\s+\d+:\s+run-clm\s*$'
142
143     #####################
144     # Job Configuration #
145     #####################
146
147     scm:
148       - lf-infra-gerrit-scm:
149           jenkins-ssh-credential: "{jenkins-ssh-credential}"
150           git-url: "{git-url}"
151           refspec: "$GERRIT_REFSPEC"
152           branch: "$GERRIT_BRANCH"
153           submodule-recursive: "{submodule-recursive}"
154           submodule-timeout: "{submodule-timeout}"
155           submodule-disable: "{submodule-disable}"
156           choosing-strategy: default
157
158     triggers:
159       # Build weekly on Saturdays
160       - timed: "H H * * 6"
161       - gerrit:
162           server-name: "{gerrit-server-name}"
163           trigger-on: "{obj:gerrit_clm_triggers}"
164           projects:
165             - project-compare-type: ANT
166               project-pattern: "{project}"
167               branches:
168                 - branch-compare-type: ANT
169                   branch-pattern: "**/{branch}"
170               file-paths: "{obj:gerrit_trigger_file_paths}"
171           skip-vote:
172             successful: true
173             failed: true
174             unstable: true
175             notbuilt: true
176
177 - job-template:
178     name: "{project-name}-python-clm-{stream}"
179     id: github-python-xc-clm
180     <<: *lf_python_common
181     <<: *lf_python_xc_clm
182
183     properties:
184       - lf-infra-properties:
185           build-days-to-keep: "{build-days-to-keep}"
186       - github:
187           url: "{github-url}/{github-org}/{project}"
188
189     scm:
190       - lf-infra-github-scm:
191           url: "{git-clone-url}{github-org}/{project}"
192           refspec: ""
193           branch: "refs/heads/{branch}"
194           submodule-recursive: "{submodule-recursive}"
195           submodule-timeout: "{submodule-timeout}"
196           submodule-disable: "{submodule-disable}"
197           choosing-strategy: default
198           jenkins-ssh-credential: "{jenkins-ssh-credential}"
199
200     triggers:
201       # Build weekly on Saturdays
202       - timed: "H H * * 6"
203       - github-pull-request:
204           trigger-phrase: "^run-clm$"
205           only-trigger-phrase: false
206           status-context: "CLM"
207           permit-all: true
208           github-hooks: true
209           white-list-target-branches:
210             - "{branch}"
211           included-regions: "{obj:github_included_regions}"
212
213 #########################
214 # Python Sonar with Tox #
215 #########################
216
217 - lf_tox_sonar: &lf_tox_sonar
218     name: lf-tox-sonar
219
220     ######################
221     # Default parameters #
222     ######################
223
224     branch: master # Sonar should always be run on master branch
225     build-days-to-keep: 7
226     build-timeout: 60
227     cron: "H H * * *" # run daily
228     disable-job: false
229     git-url: "$GIT_URL/$PROJECT"
230     github-url: "https://github.com"
231     java-version: openjdk8
232     mvn-global-settings: global-settings
233     mvn-goals: validate
234     mvn-opts: ""
235     mvn-params: ""
236     mvn-settings: "{mvn-settings}"
237     mvn-version: mvn35
238     parallel: true
239     pre-build-script: "# pre-build script goes here"
240     python-version: python3
241     sonar-mvn-goal: "sonar:sonar"
242     sonarcloud: false
243     sonarcloud-project-key: ""
244     sonarcloud-project-organization: ""
245     sonarcloud-api-token: ""
246     stream: master
247     submodule-recursive: true
248     submodule-timeout: 10
249     submodule-disable: false
250     tox-dir: "."
251     tox-envs: ""
252
253     gerrit_trigger_file_paths:
254       - compare-type: REG_EXP
255         pattern: ".*"
256
257     # github_included_regions MUST match gerrit_trigger_file_paths
258     github_included_regions:
259       - ".*"
260
261     #####################
262     # Job Configuration #
263     #####################
264
265     disabled: "{disable-job}"
266
267     parameters:
268       - lf-infra-parameters:
269           project: "{project}"
270           branch: "{branch}"
271           stream: "{stream}"
272       - lf-infra-maven-parameters:
273           mvn-opts: "{mvn-opts}"
274           mvn-params: "{mvn-params}"
275           mvn-version: "{mvn-version}"
276       - lf-infra-tox-parameters:
277           tox-dir: "{tox-dir}"
278           tox-envs: "{tox-envs}"
279       - string:
280           name: ARCHIVE_ARTIFACTS
281           default: "{archive-artifacts}"
282           description: Artifacts to archive to the logs server.
283       - string:
284           name: MVN
285           # Sets an env var for shell scripts to be able to call the dynamically
286           # installed maven without having to calculate the path themselves.
287           # yamllint disable-line rule:line-length
288           default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
289           description: "Maven selector to be used by shell scripts"
290       - string:
291           name: SONAR_MAVEN_GOAL
292           default: "{sonar-mvn-goal}"
293           description: |
294             Maven goals to pass to the Sonar call. Typically sonar:sonar
295             however to use a specific version of the sonar-maven-plugin we
296             can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
297
298     builders:
299       - lf-infra-pre-build
300       - lf-infra-tox-install:
301           python-version: "{python-version}"
302       - shell: "{pre-build-script}"
303       - lf-infra-tox-run:
304           parallel: "{parallel}"
305       - lf-provide-maven-settings:
306           global-settings-file: "{mvn-global-settings}"
307           settings-file: "{mvn-settings}"
308       # With SonarCloud
309       - conditional-step:
310           condition-kind: boolean-expression
311           condition-expression: "{sonarcloud}"
312           steps:
313             - shell: echo 'Using SonarCloud'
314             - lf-infra-maven-sonarcloud:
315                 java-version: "{java-version}"
316                 mvn-goals: "{mvn-goals}"
317                 mvn-settings: "{mvn-settings}"
318                 mvn-version: "{mvn-version}"
319                 sonarcloud-project-key: "{sonarcloud-project-key}"
320                 # yamllint disable-line rule:line-length
321                 sonarcloud-project-organization: "{sonarcloud-project-organization}"
322                 sonarcloud-api-token: "{sonarcloud-api-token}"
323       # With SonarQube
324       - conditional-step:
325           condition-kind: not
326           condition-operand:
327             condition-kind: boolean-expression
328             condition-expression: "{sonarcloud}"
329           steps:
330             - shell: echo 'Using SonarQube'
331             - lf-infra-maven-sonar:
332                 java-version: "{java-version}"
333                 mvn-goals: "{mvn-goals}"
334                 mvn-settings: "{mvn-settings}"
335                 mvn-version: "{mvn-version}"
336
337     publishers:
338       - lf-infra-publish
339
340 - job-template:
341     name: "{project-name}-tox-sonar"
342     id: gerrit-tox-sonar
343     <<: *lf_python_common
344     <<: *lf_tox_sonar
345
346     ######################
347     # Default parameters #
348     ######################
349
350     gerrit_sonar_triggers:
351       - comment-added-contains-event:
352           comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
353
354     #####################
355     # Job Configuration #
356     #####################
357
358     scm:
359       - lf-infra-gerrit-scm:
360           jenkins-ssh-credential: "{jenkins-ssh-credential}"
361           git-url: "{git-url}"
362           refspec: $GERRIT_REFSPEC
363           branch: $GERRIT_BRANCH
364           submodule-recursive: "{submodule-recursive}"
365           submodule-timeout: "{submodule-timeout}"
366           submodule-disable: "{submodule-disable}"
367           choosing-strategy: default
368
369     triggers:
370       - timed: "{obj:cron}"
371       - gerrit:
372           server-name: "{gerrit-server-name}"
373           trigger-on: "{obj:gerrit_sonar_triggers}"
374           projects:
375             - project-compare-type: "ANT"
376               project-pattern: "{project}"
377               branches:
378                 - branch-compare-type: "ANT"
379                   branch-pattern: "**/{branch}"
380               file-paths: "{obj:gerrit_trigger_file_paths}"
381           skip-vote:
382             successful: true
383             failed: true
384             unstable: true
385             notbuilt: true
386
387 - job-template:
388     name: "{project-name}-tox-sonar"
389     id: github-tox-sonar
390     <<: *lf_python_common
391     <<: *lf_tox_sonar
392
393     properties:
394       - lf-infra-properties:
395           build-days-to-keep: "{build-days-to-keep}"
396       - github:
397           url: "{github-url}/{github-org}/{project}"
398
399     scm:
400       - lf-infra-github-scm:
401           url: "{git-clone-url}{github-org}/{project}"
402           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
403           branch: "$sha1"
404           submodule-recursive: "{submodule-recursive}"
405           submodule-timeout: "{submodule-timeout}"
406           submodule-disable: "{submodule-disable}"
407           choosing-strategy: default
408           jenkins-ssh-credential: "{jenkins-ssh-credential}"
409
410     triggers:
411       - github-pull-request:
412           trigger-phrase: "^run-sonar$"
413           only-trigger-phrase: false
414           status-context: "Python Sonar"
415           permit-all: true
416           github-hooks: true
417           white-list-target-branches:
418             - "{branch}"
419           included-regions: "{obj:github_included_regions}"
420
421 ##############
422 # Tox Common #
423 ##############
424
425 - lf_tox_common: &lf_tox_common
426     name: lf-tox-common
427
428     ######################
429     # Default parameters #
430     ######################
431
432     branch: master
433     build-days-to-keep: 7
434     build-timeout: 15
435     disable-job: false
436     git-url: "$GIT_URL/$GERRIT_PROJECT"
437     github-url: "https://github.com"
438     parallel: false
439     pre-build-script: "# pre-build script goes here"
440     python-version: python3
441     stream: master
442     submodule-recursive: true
443     submodule-timeout: 10
444     submodule-disable: false
445     tox-dir: "."
446     tox-envs: ""
447
448     gerrit_trigger_file_paths:
449       - compare-type: REG_EXP
450         pattern: ".*"
451
452     # github_included_regions MUST match gerrit_trigger_file_paths
453     github_included_regions:
454       - ".*"
455
456     #####################
457     # Job Configuration #
458     #####################
459
460     project-type: freestyle
461     node: "{build-node}"
462     concurrent: true
463     disabled: "{disable-job}"
464
465     properties:
466       - lf-infra-properties:
467           build-days-to-keep: "{build-days-to-keep}"
468
469     parameters:
470       - lf-infra-parameters:
471           project: "{project}"
472           branch: "{branch}"
473           stream: "{stream}"
474       - lf-infra-tox-parameters:
475           tox-dir: "{tox-dir}"
476           tox-envs: "{tox-envs}"
477
478     wrappers:
479       - lf-infra-wrappers:
480           build-timeout: "{build-timeout}"
481           jenkins-ssh-credential: "{jenkins-ssh-credential}"
482
483     builders:
484       - lf-infra-pre-build
485       - lf-infra-tox-install:
486           python-version: "{python-version}"
487       - shell: "{pre-build-script}"
488       - lf-infra-tox-run:
489           parallel: "{parallel}"
490
491     publishers:
492       - lf-infra-publish
493
494 - job-template:
495     # Python projects typically use tox to run testing.
496     name: "{project-name}-tox-verify-{stream}"
497     id: gerrit-tox-verify
498     <<: *lf_tox_common
499
500     ######################
501     # Default parameters #
502     ######################
503
504     gerrit-skip-vote: false
505     gerrit_verify_triggers:
506       - patchset-created-event:
507           exclude-drafts: true
508           exclude-trivial-rebase: false
509           exclude-no-code-change: false
510       - draft-published-event
511       - comment-added-contains-event:
512           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
513
514     #####################
515     # Job Configuration #
516     #####################
517
518     scm:
519       - lf-infra-gerrit-scm:
520           jenkins-ssh-credential: "{jenkins-ssh-credential}"
521           git-url: "{git-url}"
522           refspec: "$GERRIT_REFSPEC"
523           branch: "$GERRIT_BRANCH"
524           submodule-recursive: "{submodule-recursive}"
525           submodule-timeout: "{submodule-timeout}"
526           submodule-disable: "{submodule-disable}"
527           choosing-strategy: gerrit
528
529     triggers:
530       - gerrit:
531           server-name: "{gerrit-server-name}"
532           trigger-on: "{obj:gerrit_verify_triggers}"
533           projects:
534             - project-compare-type: ANT
535               project-pattern: "{project}"
536               branches:
537                 - branch-compare-type: ANT
538                   branch-pattern: "**/{branch}"
539               file-paths: "{obj:gerrit_trigger_file_paths}"
540           skip-vote:
541             successful: "{gerrit-skip-vote}"
542             failed: "{gerrit-skip-vote}"
543             unstable: "{gerrit-skip-vote}"
544             notbuilt: "{gerrit-skip-vote}"
545
546 - job-template:
547     # Python projects typically use tox to run testing.
548     name: "{project-name}-tox-verify-{stream}"
549     id: github-tox-verify
550     <<: *lf_tox_common
551
552     properties:
553       - lf-infra-properties:
554           build-days-to-keep: "{build-days-to-keep}"
555       - github:
556           url: "{github-url}/{github-org}/{project}"
557
558     scm:
559       - lf-infra-github-scm:
560           url: "{git-clone-url}{github-org}/{project}"
561           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
562           branch: "$sha1"
563           submodule-recursive: "{submodule-recursive}"
564           submodule-timeout: "{submodule-timeout}"
565           submodule-disable: "{submodule-disable}"
566           choosing-strategy: default
567           jenkins-ssh-credential: "{jenkins-ssh-credential}"
568
569     triggers:
570       - github-pull-request:
571           trigger-phrase: "^(recheck|reverify)$"
572           only-trigger-phrase: false
573           status-context: "Tox Verify"
574           permit-all: true
575           github-hooks: true
576           white-list-target-branches:
577             - "{branch}"
578           included-regions: "{obj:github_included_regions}"
579
580 - job-template:
581     # Run tox after merge of gerrit change set
582     name: "{project-name}-tox-merge-{stream}"
583     id: gerrit-tox-merge
584     <<: *lf_tox_common
585
586     ######################
587     # Default parameters #
588     ######################
589
590     gerrit_merge_triggers:
591       - change-merged-event
592       - comment-added-contains-event:
593           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
594
595     #####################
596     # Job Configuration #
597     #####################
598
599     scm:
600       - lf-infra-gerrit-scm:
601           jenkins-ssh-credential: "{jenkins-ssh-credential}"
602           git-url: "{git-url}"
603           refspec: "$GERRIT_REFSPEC"
604           branch: "$GERRIT_BRANCH"
605           submodule-recursive: "{submodule-recursive}"
606           submodule-timeout: "{submodule-timeout}"
607           submodule-disable: "{submodule-disable}"
608           # merge jobs always build from tip
609           choosing-strategy: default
610
611     triggers:
612       - gerrit:
613           server-name: "{gerrit-server-name}"
614           trigger-on: "{obj:gerrit_merge_triggers}"
615           projects:
616             - project-compare-type: ANT
617               project-pattern: "{project}"
618               branches:
619                 - branch-compare-type: ANT
620                   branch-pattern: "**/{branch}"
621               file-paths: "{obj:gerrit_trigger_file_paths}"
622
623 - job-template:
624     # Run tox after merge of github pull request
625     name: "{project-name}-tox-merge-{stream}"
626     id: github-tox-merge
627     <<: *lf_tox_common
628
629     properties:
630       - lf-infra-properties:
631           build-days-to-keep: "{build-days-to-keep}"
632       - github:
633           url: "{github-url}/{github-org}/{project}"
634
635     scm:
636       - lf-infra-github-scm:
637           url: "{git-clone-url}{github-org}/{project}"
638           refspec: ""
639           branch: "refs/heads/{branch}"
640           submodule-recursive: "{submodule-recursive}"
641           submodule-timeout: "{submodule-timeout}"
642           submodule-disable: "{submodule-disable}"
643           choosing-strategy: default
644           jenkins-ssh-credential: "{jenkins-ssh-credential}"
645
646     triggers:
647       - github-pull-request:
648           trigger-phrase: "^remerge$"
649           only-trigger-phrase: true
650           status-context: "Tox Merge"
651           permit-all: true
652           github-hooks: true
653           org-list:
654             - "{github-org}"
655           white-list: "{obj:github_pr_whitelist}"
656           admin-list: "{obj:github_pr_admin_list}"
657           white-list-target-branches:
658             - "{branch}"
659           included-regions: "{obj:github_included_regions}"
660
661 ########
662 # PyPI #
663 ########
664
665 - lf_pypi_common: &lf_pypi_common
666     name: lf-pypi-common
667
668     ######################
669     # Default parameters #
670     ######################
671
672     archive-artifacts: >
673       **/*.log
674     branch: master
675     build-days-to-keep: 7
676     build-timeout: 15
677     disable-job: false
678     dist-binary: true
679     git-url: "$GIT_URL/$GERRIT_PROJECT"
680     github-url: "https://github.com"
681     parallel: false
682     pre-build-script: "# pre-build script goes here"
683     python-version: python3
684     stream: master
685     submodule-disable: false
686     submodule-recursive: true
687     submodule-timeout: 10
688     tox-dir: "."
689     tox-envs: ""
690
691     gerrit_trigger_file_paths:
692       - compare-type: REG_EXP
693         pattern: ".*"
694
695     # github_included_regions MUST match gerrit_trigger_file_paths
696     github_included_regions:
697       - ".*"
698
699     #####################
700     # Job Configuration #
701     #####################
702
703     project-type: freestyle
704     node: "{build-node}"
705     disabled: "{disable-job}"
706
707     properties:
708       - lf-infra-properties:
709           build-days-to-keep: "{build-days-to-keep}"
710
711     parameters:
712       - lf-infra-parameters:
713           project: "{project}"
714           branch: "{branch}"
715           stream: "{stream}"
716       - lf-infra-tox-parameters:
717           tox-dir: "{tox-dir}"
718           tox-envs: "{tox-envs}"
719       - bool:
720           name: BUILD_BDIST_WHEEL
721           default: "{dist-binary}"
722           description: "Set to True (checked) to build a binary distribution"
723       - bool:
724           name: DRY_RUN
725           default: false
726           description: "Set to True (checked) to skip uploading artifacts"
727
728     wrappers:
729       - lf-infra-wrappers:
730           build-timeout: "{build-timeout}"
731           jenkins-ssh-credential: "{jenkins-ssh-credential}"
732
733     publishers:
734       - lf-infra-publish
735
736 - lf_pypi_verify_builders: &lf_pypi_verify_builders
737     name: lf-pypi-verify-builders
738
739     builders:
740       - lf-infra-pre-build
741       - lf-infra-tox-install:
742           python-version: "{python-version}"
743       - shell: "{pre-build-script}"
744       - lf-infra-tox-run:
745           parallel: "{parallel}"
746       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
747
748 - lf_pypi_merge_builders: &lf_pypi_merge_builders
749     name: lf-pypi-merge-builders
750
751     builders:
752       - lf-infra-pre-build
753       - lf-infra-tox-install:
754           python-version: "{python-version}"
755       - shell: "{pre-build-script}"
756       - lf-infra-tox-run:
757           parallel: "{parallel}"
758       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
759       - config-file-provider:
760           files:
761             - file-id: pypirc
762               target: "$HOME/.pypirc"
763       - inject:
764           properties-content: "REPOSITORY={pypi-repo}"
765       - shell: !include-raw-escape: ../shell/pypi-upload.sh
766
767 - job-template:
768     name: "{project-name}-pypi-verify-{stream}"
769     id: gerrit-pypi-verify
770     <<: *lf_pypi_common
771     <<: *lf_pypi_verify_builders
772
773     scm:
774       - lf-infra-gerrit-scm:
775           jenkins-ssh-credential: "{jenkins-ssh-credential}"
776           git-url: "{git-url}"
777           refspec: "$GERRIT_REFSPEC"
778           branch: "$GERRIT_BRANCH"
779           submodule-recursive: "{submodule-recursive}"
780           submodule-timeout: "{submodule-timeout}"
781           submodule-disable: "{submodule-disable}"
782           choosing-strategy: gerrit
783
784     triggers:
785       - gerrit:
786           server-name: "{gerrit-server-name}"
787           trigger-on:
788             - patchset-created-event:
789                 exclude-drafts: true
790                 exclude-trivial-rebase: false
791                 exclude-no-code-change: false
792             - draft-published-event
793             - comment-added-contains-event:
794                 # yamllint disable-line rule:line-length
795                 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
796           projects:
797             - project-compare-type: ANT
798               project-pattern: "{project}"
799               branches:
800                 - branch-compare-type: ANT
801                   branch-pattern: "**/{branch}"
802               file-paths: "{obj:gerrit_trigger_file_paths}"
803
804 - job-template:
805     name: "{project-name}-pypi-verify-{stream}"
806     id: github-pypi-verify
807     <<: *lf_pypi_common
808     <<: *lf_pypi_verify_builders
809
810     properties:
811       - github:
812           url: "{github-url}/{github-org}/{project}"
813
814     scm:
815       - lf-infra-github-scm:
816           url: "{git-clone-url}{github-org}/{project}"
817           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
818           branch: "$sha1"
819           submodule-recursive: "{submodule-recursive}"
820           submodule-timeout: "{submodule-timeout}"
821           submodule-disable: "{submodule-disable}"
822           choosing-strategy: default
823           jenkins-ssh-credential: "{jenkins-ssh-credential}"
824
825     triggers:
826       - github-pull-request:
827           trigger-phrase: "^(recheck|reverify)$"
828           only-trigger-phrase: false
829           status-context: "PyPI Verify"
830           permit-all: true
831           github-hooks: true
832           white-list-target-branches:
833             - "{branch}"
834           included-regions: "{obj:github_included_regions}"
835
836 - job-template:
837     name: "{project-name}-pypi-merge-{stream}"
838     id: gerrit-pypi-merge
839     <<: *lf_pypi_common
840     <<: *lf_pypi_merge_builders
841
842     cron: ""
843     pypi-repo: pypi-test
844
845     scm:
846       - lf-infra-gerrit-scm:
847           jenkins-ssh-credential: "{jenkins-ssh-credential}"
848           git-url: "{git-url}"
849           refspec: "$GERRIT_REFSPEC"
850           branch: "$GERRIT_BRANCH"
851           submodule-recursive: "{submodule-recursive}"
852           submodule-timeout: "{submodule-timeout}"
853           submodule-disable: "{submodule-disable}"
854           # merge jobs always build from tip
855           choosing-strategy: default
856
857     triggers:
858       - timed: "{obj:cron}"
859       - gerrit:
860           server-name: "{gerrit-server-name}"
861           trigger-on:
862             - change-merged-event
863             - comment-added-contains-event:
864                 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
865           projects:
866             - project-compare-type: ANT
867               project-pattern: "{project}"
868               branches:
869                 - branch-compare-type: ANT
870                   branch-pattern: "**/{branch}"
871               file-paths: "{obj:gerrit_trigger_file_paths}"
872
873 - job-template:
874     name: "{project-name}-pypi-merge-{stream}"
875     id: github-pypi-merge
876     <<: *lf_pypi_common
877     <<: *lf_pypi_merge_builders
878
879     cron: ""
880     pypi-repo: pypi-test
881
882     properties:
883       - github:
884           url: "{github-url}/{github-org}/{project}"
885
886     scm:
887       - lf-infra-github-scm:
888           url: "{git-clone-url}{github-org}/{project}"
889           refspec: ""
890           branch: "refs/heads/{branch}"
891           submodule-recursive: "{submodule-recursive}"
892           submodule-timeout: "{submodule-timeout}"
893           submodule-disable: "{submodule-disable}"
894           choosing-strategy: default
895           jenkins-ssh-credential: "{jenkins-ssh-credential}"
896
897     triggers:
898       - timed: "{obj:cron}"
899       - github-pull-request:
900           trigger-phrase: "^remerge$"
901           only-trigger-phrase: false
902           status-context: "Merge"
903           permit-all: true
904           github-hooks: true
905           org-list:
906             - "{github-org}"
907           white-list: "{obj:github_pr_whitelist}"
908           admin-list: "{obj:github_pr_admin_list}"
909           white-list-target-branches:
910             - "{branch}"
911           included-regions: "{obj:github_included_regions}"