Call "lftools jenkins" after credentials are set
[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           choosing-strategy: gerrit
609
610     triggers:
611       - gerrit:
612           server-name: "{gerrit-server-name}"
613           trigger-on: "{obj:gerrit_merge_triggers}"
614           projects:
615             - project-compare-type: ANT
616               project-pattern: "{project}"
617               branches:
618                 - branch-compare-type: ANT
619                   branch-pattern: "**/{branch}"
620               file-paths: "{obj:gerrit_trigger_file_paths}"
621
622 - job-template:
623     # Run tox after merge of github pull request
624     name: "{project-name}-tox-merge-{stream}"
625     id: github-tox-merge
626     <<: *lf_tox_common
627
628     properties:
629       - lf-infra-properties:
630           build-days-to-keep: "{build-days-to-keep}"
631       - github:
632           url: "{github-url}/{github-org}/{project}"
633
634     scm:
635       - lf-infra-github-scm:
636           url: "{git-clone-url}{github-org}/{project}"
637           refspec: ""
638           branch: "refs/heads/{branch}"
639           submodule-recursive: "{submodule-recursive}"
640           submodule-timeout: "{submodule-timeout}"
641           submodule-disable: "{submodule-disable}"
642           choosing-strategy: default
643           jenkins-ssh-credential: "{jenkins-ssh-credential}"
644
645     triggers:
646       - github-pull-request:
647           trigger-phrase: "^remerge$"
648           only-trigger-phrase: true
649           status-context: "Tox Merge"
650           permit-all: true
651           github-hooks: true
652           org-list:
653             - "{github-org}"
654           white-list: "{obj:github_pr_whitelist}"
655           admin-list: "{obj:github_pr_admin_list}"
656           white-list-target-branches:
657             - "{branch}"
658           included-regions: "{obj:github_included_regions}"
659
660 ########
661 # PyPI #
662 ########
663
664 - lf_pypi_common: &lf_pypi_common
665     name: lf-pypi-common
666
667     ######################
668     # Default parameters #
669     ######################
670
671     archive-artifacts: >
672       **/*.log
673     branch: master
674     build-days-to-keep: 7
675     build-timeout: 15
676     disable-job: false
677     dist-binary: true
678     git-url: "$GIT_URL/$GERRIT_PROJECT"
679     github-url: "https://github.com"
680     parallel: false
681     pre-build-script: "# pre-build script goes here"
682     python-version: python3
683     stream: master
684     submodule-disable: false
685     submodule-recursive: true
686     submodule-timeout: 10
687     tox-dir: "."
688     tox-envs: ""
689
690     gerrit_trigger_file_paths:
691       - compare-type: REG_EXP
692         pattern: ".*"
693
694     # github_included_regions MUST match gerrit_trigger_file_paths
695     github_included_regions:
696       - ".*"
697
698     #####################
699     # Job Configuration #
700     #####################
701
702     project-type: freestyle
703     node: "{build-node}"
704     disabled: "{disable-job}"
705
706     properties:
707       - lf-infra-properties:
708           build-days-to-keep: "{build-days-to-keep}"
709
710     parameters:
711       - lf-infra-parameters:
712           project: "{project}"
713           branch: "{branch}"
714           stream: "{stream}"
715       - lf-infra-tox-parameters:
716           tox-dir: "{tox-dir}"
717           tox-envs: "{tox-envs}"
718       - bool:
719           name: BUILD_BDIST_WHEEL
720           default: "{dist-binary}"
721           description: "Set to True (checked) to build a binary distribution"
722       - bool:
723           name: DRY_RUN
724           default: false
725           description: "Set to True (checked) to skip uploading artifacts"
726
727     wrappers:
728       - lf-infra-wrappers:
729           build-timeout: "{build-timeout}"
730           jenkins-ssh-credential: "{jenkins-ssh-credential}"
731
732     publishers:
733       - lf-infra-publish
734
735 - lf_pypi_verify_builders: &lf_pypi_verify_builders
736     name: lf-pypi-verify-builders
737
738     builders:
739       - lf-infra-pre-build
740       - lf-infra-tox-install:
741           python-version: "{python-version}"
742       - shell: "{pre-build-script}"
743       - lf-infra-tox-run:
744           parallel: "{parallel}"
745       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
746
747 - lf_pypi_merge_builders: &lf_pypi_merge_builders
748     name: lf-pypi-merge-builders
749
750     builders:
751       - lf-infra-pre-build
752       - lf-infra-tox-install:
753           python-version: "{python-version}"
754       - shell: "{pre-build-script}"
755       - lf-infra-tox-run:
756           parallel: "{parallel}"
757       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
758       - config-file-provider:
759           files:
760             - file-id: pypirc
761               target: "$HOME/.pypirc"
762       - inject:
763           properties-content: "REPOSITORY={pypi-repo}"
764       - shell: !include-raw-escape: ../shell/pypi-upload.sh
765
766 - job-template:
767     name: "{project-name}-pypi-verify-{stream}"
768     id: gerrit-pypi-verify
769     <<: *lf_pypi_common
770     <<: *lf_pypi_verify_builders
771
772     scm:
773       - lf-infra-gerrit-scm:
774           jenkins-ssh-credential: "{jenkins-ssh-credential}"
775           git-url: "{git-url}"
776           refspec: "$GERRIT_REFSPEC"
777           branch: "$GERRIT_BRANCH"
778           submodule-recursive: "{submodule-recursive}"
779           submodule-timeout: "{submodule-timeout}"
780           submodule-disable: "{submodule-disable}"
781           choosing-strategy: gerrit
782
783     triggers:
784       - gerrit:
785           server-name: "{gerrit-server-name}"
786           trigger-on:
787             - patchset-created-event:
788                 exclude-drafts: true
789                 exclude-trivial-rebase: false
790                 exclude-no-code-change: false
791             - draft-published-event
792             - comment-added-contains-event:
793                 # yamllint disable-line rule:line-length
794                 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
795           projects:
796             - project-compare-type: ANT
797               project-pattern: "{project}"
798               branches:
799                 - branch-compare-type: ANT
800                   branch-pattern: "**/{branch}"
801               file-paths: "{obj:gerrit_trigger_file_paths}"
802
803 - job-template:
804     name: "{project-name}-pypi-verify-{stream}"
805     id: github-pypi-verify
806     <<: *lf_pypi_common
807     <<: *lf_pypi_verify_builders
808
809     properties:
810       - github:
811           url: "{github-url}/{github-org}/{project}"
812
813     scm:
814       - lf-infra-github-scm:
815           url: "{git-clone-url}{github-org}/{project}"
816           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
817           branch: "$sha1"
818           submodule-recursive: "{submodule-recursive}"
819           submodule-timeout: "{submodule-timeout}"
820           submodule-disable: "{submodule-disable}"
821           choosing-strategy: default
822           jenkins-ssh-credential: "{jenkins-ssh-credential}"
823
824     triggers:
825       - github-pull-request:
826           trigger-phrase: "^(recheck|reverify)$"
827           only-trigger-phrase: false
828           status-context: "PyPI Verify"
829           permit-all: true
830           github-hooks: true
831           white-list-target-branches:
832             - "{branch}"
833           included-regions: "{obj:github_included_regions}"
834
835 - job-template:
836     name: "{project-name}-pypi-merge-{stream}"
837     id: gerrit-pypi-merge
838     <<: *lf_pypi_common
839     <<: *lf_pypi_merge_builders
840
841     cron: ""
842     pypi-repo: pypi-test
843
844     scm:
845       - lf-infra-gerrit-scm:
846           jenkins-ssh-credential: "{jenkins-ssh-credential}"
847           git-url: "{git-url}"
848           refspec: "$GERRIT_REFSPEC"
849           branch: "$GERRIT_BRANCH"
850           submodule-recursive: "{submodule-recursive}"
851           submodule-timeout: "{submodule-timeout}"
852           submodule-disable: "{submodule-disable}"
853           choosing-strategy: gerrit
854
855     triggers:
856       - timed: "{obj:cron}"
857       - gerrit:
858           server-name: "{gerrit-server-name}"
859           trigger-on:
860             - change-merged-event
861             - comment-added-contains-event:
862                 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
863           projects:
864             - project-compare-type: ANT
865               project-pattern: "{project}"
866               branches:
867                 - branch-compare-type: ANT
868                   branch-pattern: "**/{branch}"
869               file-paths: "{obj:gerrit_trigger_file_paths}"
870
871 - job-template:
872     name: "{project-name}-pypi-merge-{stream}"
873     id: github-pypi-merge
874     <<: *lf_pypi_common
875     <<: *lf_pypi_merge_builders
876
877     cron: ""
878     pypi-repo: pypi-test
879
880     properties:
881       - github:
882           url: "{github-url}/{github-org}/{project}"
883
884     scm:
885       - lf-infra-github-scm:
886           url: "{git-clone-url}{github-org}/{project}"
887           refspec: ""
888           branch: "refs/heads/{branch}"
889           submodule-recursive: "{submodule-recursive}"
890           submodule-timeout: "{submodule-timeout}"
891           submodule-disable: "{submodule-disable}"
892           choosing-strategy: default
893           jenkins-ssh-credential: "{jenkins-ssh-credential}"
894
895     triggers:
896       - timed: "{obj:cron}"
897       - github-pull-request:
898           trigger-phrase: "^remerge$"
899           only-trigger-phrase: false
900           status-context: "Merge"
901           permit-all: true
902           github-hooks: true
903           org-list:
904             - "{github-org}"
905           white-list: "{obj:github_pr_whitelist}"
906           admin-list: "{obj:github_pr_admin_list}"
907           white-list-target-branches:
908             - "{branch}"
909           included-regions: "{obj:github_included_regions}"