Fix OS_CLOUD export for image validation
[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-settings: "{mvn-settings}"
235     mvn-version: mvn35
236     parallel: true
237     pre-build-script: "# pre-build script goes here"
238     python-version: python3
239     sonar-mvn-goal: "sonar:sonar"
240     sonarcloud: false
241     sonarcloud-project-key: ""
242     sonarcloud-project-organization: ""
243     sonarcloud-api-token: ""
244     stream: master
245     submodule-recursive: true
246     submodule-timeout: 10
247     submodule-disable: false
248     tox-dir: "."
249     tox-envs: ""
250
251     gerrit_trigger_file_paths:
252       - compare-type: REG_EXP
253         pattern: ".*"
254
255     # github_included_regions MUST match gerrit_trigger_file_paths
256     github_included_regions:
257       - ".*"
258
259     #####################
260     # Job Configuration #
261     #####################
262
263     disabled: "{disable-job}"
264
265     parameters:
266       - lf-infra-parameters:
267           project: "{project}"
268           branch: "{branch}"
269           stream: "{stream}"
270       - lf-infra-tox-parameters:
271           tox-dir: "{tox-dir}"
272           tox-envs: "{tox-envs}"
273       - string:
274           name: ARCHIVE_ARTIFACTS
275           default: "{archive-artifacts}"
276           description: Artifacts to archive to the logs server.
277       - string:
278           name: MVN
279           # Sets an env var for shell scripts to be able to call the dynamically
280           # installed maven without having to calculate the path themselves.
281           # yamllint disable-line rule:line-length
282           default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{mvn-version}/bin/mvn"
283           description: "Maven selector to be used by shell scripts"
284       - string:
285           name: SONAR_MAVEN_GOAL
286           default: "{sonar-mvn-goal}"
287           description: |
288             Maven goals to pass to the Sonar call. Typically sonar:sonar
289             however to use a specific version of the sonar-maven-plugin we
290             can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
291
292     builders:
293       - lf-infra-pre-build
294       - lf-infra-tox-install:
295           python-version: "{python-version}"
296       - shell: "{pre-build-script}"
297       - lf-infra-tox-run:
298           parallel: "{parallel}"
299       - lf-provide-maven-settings:
300           global-settings-file: "{mvn-global-settings}"
301           settings-file: "{mvn-settings}"
302       # With SonarCloud
303       - conditional-step:
304           condition-kind: boolean-expression
305           condition-expression: "{sonarcloud}"
306           steps:
307             - shell: echo 'Using SonarCloud'
308             - lf-infra-maven-sonarcloud:
309                 java-version: "{java-version}"
310                 mvn-goals: "{mvn-goals}"
311                 mvn-settings: "{mvn-settings}"
312                 mvn-version: "{mvn-version}"
313                 sonarcloud-project-key: "{sonarcloud-project-key}"
314                 # yamllint disable-line rule:line-length
315                 sonarcloud-project-organization: "{sonarcloud-project-organization}"
316                 sonarcloud-api-token: "{sonarcloud-api-token}"
317       # With SonarQube
318       - conditional-step:
319           condition-kind: not
320           condition-operand:
321             condition-kind: boolean-expression
322             condition-expression: "{sonarcloud}"
323           steps:
324             - shell: echo 'Using SonarQube'
325             - lf-infra-maven-sonar:
326                 java-version: "{java-version}"
327                 mvn-goals: "{mvn-goals}"
328                 mvn-settings: "{mvn-settings}"
329                 mvn-version: "{mvn-version}"
330
331     publishers:
332       - lf-infra-publish
333
334 - job-template:
335     name: "{project-name}-tox-sonar"
336     id: gerrit-tox-sonar
337     <<: *lf_python_common
338     <<: *lf_tox_sonar
339
340     ######################
341     # Default parameters #
342     ######################
343
344     gerrit_sonar_triggers:
345       - comment-added-contains-event:
346           comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
347
348     #####################
349     # Job Configuration #
350     #####################
351
352     scm:
353       - lf-infra-gerrit-scm:
354           jenkins-ssh-credential: "{jenkins-ssh-credential}"
355           git-url: "{git-url}"
356           refspec: $GERRIT_REFSPEC
357           branch: $GERRIT_BRANCH
358           submodule-recursive: "{submodule-recursive}"
359           submodule-timeout: "{submodule-timeout}"
360           submodule-disable: "{submodule-disable}"
361           choosing-strategy: default
362
363     triggers:
364       - timed: "{obj:cron}"
365       - gerrit:
366           server-name: "{gerrit-server-name}"
367           trigger-on: "{obj:gerrit_sonar_triggers}"
368           projects:
369             - project-compare-type: "ANT"
370               project-pattern: "{project}"
371               branches:
372                 - branch-compare-type: "ANT"
373                   branch-pattern: "**/{branch}"
374               file-paths: "{obj:gerrit_trigger_file_paths}"
375           skip-vote:
376             successful: true
377             failed: true
378             unstable: true
379             notbuilt: true
380
381 - job-template:
382     name: "{project-name}-tox-sonar"
383     id: github-tox-sonar
384     <<: *lf_python_common
385     <<: *lf_tox_sonar
386
387     properties:
388       - lf-infra-properties:
389           build-days-to-keep: "{build-days-to-keep}"
390       - github:
391           url: "{github-url}/{github-org}/{project}"
392
393     scm:
394       - lf-infra-github-scm:
395           url: "{git-clone-url}{github-org}/{project}"
396           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
397           branch: "$sha1"
398           submodule-recursive: "{submodule-recursive}"
399           submodule-timeout: "{submodule-timeout}"
400           submodule-disable: "{submodule-disable}"
401           choosing-strategy: default
402           jenkins-ssh-credential: "{jenkins-ssh-credential}"
403
404     triggers:
405       - github-pull-request:
406           trigger-phrase: "^run-sonar$"
407           only-trigger-phrase: false
408           status-context: "Python Sonar"
409           permit-all: true
410           github-hooks: true
411           white-list-target-branches:
412             - "{branch}"
413           included-regions: "{obj:github_included_regions}"
414
415 ##############
416 # Tox Common #
417 ##############
418
419 - lf_tox_common: &lf_tox_common
420     name: lf-tox-common
421
422     ######################
423     # Default parameters #
424     ######################
425
426     branch: master
427     build-days-to-keep: 7
428     build-timeout: 15
429     disable-job: false
430     git-url: "$GIT_URL/$GERRIT_PROJECT"
431     github-url: "https://github.com"
432     parallel: false
433     pre-build-script: "# pre-build script goes here"
434     python-version: python3
435     stream: master
436     submodule-recursive: true
437     submodule-timeout: 10
438     submodule-disable: false
439     tox-dir: "."
440     tox-envs: ""
441
442     gerrit_trigger_file_paths:
443       - compare-type: REG_EXP
444         pattern: ".*"
445
446     # github_included_regions MUST match gerrit_trigger_file_paths
447     github_included_regions:
448       - ".*"
449
450     #####################
451     # Job Configuration #
452     #####################
453
454     project-type: freestyle
455     node: "{build-node}"
456     concurrent: true
457     disabled: "{disable-job}"
458
459     properties:
460       - lf-infra-properties:
461           build-days-to-keep: "{build-days-to-keep}"
462
463     parameters:
464       - lf-infra-parameters:
465           project: "{project}"
466           branch: "{branch}"
467           stream: "{stream}"
468       - lf-infra-tox-parameters:
469           tox-dir: "{tox-dir}"
470           tox-envs: "{tox-envs}"
471
472     wrappers:
473       - lf-infra-wrappers:
474           build-timeout: "{build-timeout}"
475           jenkins-ssh-credential: "{jenkins-ssh-credential}"
476
477     builders:
478       - lf-infra-pre-build
479       - lf-infra-tox-install:
480           python-version: "{python-version}"
481       - shell: "{pre-build-script}"
482       - lf-infra-tox-run:
483           parallel: "{parallel}"
484
485     publishers:
486       - lf-infra-publish
487
488 - job-template:
489     # Python projects typically use tox to run testing.
490     name: "{project-name}-tox-verify-{stream}"
491     id: gerrit-tox-verify
492     <<: *lf_tox_common
493
494     ######################
495     # Default parameters #
496     ######################
497
498     gerrit-skip-vote: false
499     gerrit_verify_triggers:
500       - patchset-created-event:
501           exclude-drafts: true
502           exclude-trivial-rebase: false
503           exclude-no-code-change: false
504       - draft-published-event
505       - comment-added-contains-event:
506           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
507
508     #####################
509     # Job Configuration #
510     #####################
511
512     scm:
513       - lf-infra-gerrit-scm:
514           jenkins-ssh-credential: "{jenkins-ssh-credential}"
515           git-url: "{git-url}"
516           refspec: "$GERRIT_REFSPEC"
517           branch: "$GERRIT_BRANCH"
518           submodule-recursive: "{submodule-recursive}"
519           submodule-timeout: "{submodule-timeout}"
520           submodule-disable: "{submodule-disable}"
521           choosing-strategy: gerrit
522
523     triggers:
524       - gerrit:
525           server-name: "{gerrit-server-name}"
526           trigger-on: "{obj:gerrit_verify_triggers}"
527           projects:
528             - project-compare-type: ANT
529               project-pattern: "{project}"
530               branches:
531                 - branch-compare-type: ANT
532                   branch-pattern: "**/{branch}"
533               file-paths: "{obj:gerrit_trigger_file_paths}"
534           skip-vote:
535             successful: "{gerrit-skip-vote}"
536             failed: "{gerrit-skip-vote}"
537             unstable: "{gerrit-skip-vote}"
538             notbuilt: "{gerrit-skip-vote}"
539
540 - job-template:
541     # Python projects typically use tox to run testing.
542     name: "{project-name}-tox-verify-{stream}"
543     id: github-tox-verify
544     <<: *lf_tox_common
545
546     properties:
547       - lf-infra-properties:
548           build-days-to-keep: "{build-days-to-keep}"
549       - github:
550           url: "{github-url}/{github-org}/{project}"
551
552     scm:
553       - lf-infra-github-scm:
554           url: "{git-clone-url}{github-org}/{project}"
555           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
556           branch: "$sha1"
557           submodule-recursive: "{submodule-recursive}"
558           submodule-timeout: "{submodule-timeout}"
559           submodule-disable: "{submodule-disable}"
560           choosing-strategy: default
561           jenkins-ssh-credential: "{jenkins-ssh-credential}"
562
563     triggers:
564       - github-pull-request:
565           trigger-phrase: "^(recheck|reverify)$"
566           only-trigger-phrase: false
567           status-context: "Tox Verify"
568           permit-all: true
569           github-hooks: true
570           white-list-target-branches:
571             - "{branch}"
572           included-regions: "{obj:github_included_regions}"
573
574 - job-template:
575     # Run tox after merge of gerrit change set
576     name: "{project-name}-tox-merge-{stream}"
577     id: gerrit-tox-merge
578     <<: *lf_tox_common
579
580     ######################
581     # Default parameters #
582     ######################
583
584     gerrit_merge_triggers:
585       - change-merged-event
586       - comment-added-contains-event:
587           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
588
589     #####################
590     # Job Configuration #
591     #####################
592
593     scm:
594       - lf-infra-gerrit-scm:
595           jenkins-ssh-credential: "{jenkins-ssh-credential}"
596           git-url: "{git-url}"
597           refspec: "$GERRIT_REFSPEC"
598           branch: "$GERRIT_BRANCH"
599           submodule-recursive: "{submodule-recursive}"
600           submodule-timeout: "{submodule-timeout}"
601           submodule-disable: "{submodule-disable}"
602           choosing-strategy: gerrit
603
604     triggers:
605       - gerrit:
606           server-name: "{gerrit-server-name}"
607           trigger-on: "{obj:gerrit_merge_triggers}"
608           projects:
609             - project-compare-type: ANT
610               project-pattern: "{project}"
611               branches:
612                 - branch-compare-type: ANT
613                   branch-pattern: "**/{branch}"
614               file-paths: "{obj:gerrit_trigger_file_paths}"
615
616 - job-template:
617     # Run tox after merge of github pull request
618     name: "{project-name}-tox-merge-{stream}"
619     id: github-tox-merge
620     <<: *lf_tox_common
621
622     properties:
623       - lf-infra-properties:
624           build-days-to-keep: "{build-days-to-keep}"
625       - github:
626           url: "{github-url}/{github-org}/{project}"
627
628     scm:
629       - lf-infra-github-scm:
630           url: "{git-clone-url}{github-org}/{project}"
631           refspec: ""
632           branch: "refs/heads/{branch}"
633           submodule-recursive: "{submodule-recursive}"
634           submodule-timeout: "{submodule-timeout}"
635           submodule-disable: "{submodule-disable}"
636           choosing-strategy: default
637           jenkins-ssh-credential: "{jenkins-ssh-credential}"
638
639     triggers:
640       - github-pull-request:
641           trigger-phrase: "^remerge$"
642           only-trigger-phrase: true
643           status-context: "Tox Merge"
644           permit-all: true
645           github-hooks: true
646           org-list:
647             - "{github-org}"
648           white-list: "{obj:github_pr_whitelist}"
649           admin-list: "{obj:github_pr_admin_list}"
650           white-list-target-branches:
651             - "{branch}"
652           included-regions: "{obj:github_included_regions}"
653
654 ########
655 # PyPI #
656 ########
657
658 - lf_pypi_common: &lf_pypi_common
659     name: lf-pypi-common
660
661     ######################
662     # Default parameters #
663     ######################
664
665     archive-artifacts: >
666       **/*.log
667     branch: master
668     build-days-to-keep: 7
669     build-timeout: 15
670     disable-job: false
671     dist-binary: true
672     git-url: "$GIT_URL/$GERRIT_PROJECT"
673     github-url: "https://github.com"
674     parallel: false
675     pre-build-script: "# pre-build script goes here"
676     python-version: python3
677     stream: master
678     submodule-disable: false
679     submodule-recursive: true
680     submodule-timeout: 10
681     tox-dir: "."
682     tox-envs: ""
683
684     gerrit_trigger_file_paths:
685       - compare-type: REG_EXP
686         pattern: ".*"
687
688     # github_included_regions MUST match gerrit_trigger_file_paths
689     github_included_regions:
690       - ".*"
691
692     #####################
693     # Job Configuration #
694     #####################
695
696     project-type: freestyle
697     node: "{build-node}"
698     disabled: "{disable-job}"
699
700     properties:
701       - lf-infra-properties:
702           build-days-to-keep: "{build-days-to-keep}"
703
704     parameters:
705       - lf-infra-parameters:
706           project: "{project}"
707           branch: "{branch}"
708           stream: "{stream}"
709       - lf-infra-tox-parameters:
710           tox-dir: "{tox-dir}"
711           tox-envs: "{tox-envs}"
712       - bool:
713           name: BUILD_BDIST_WHEEL
714           default: "{dist-binary}"
715           description: "Set to True (checked) to build a binary distribution"
716       - bool:
717           name: DRY_RUN
718           default: false
719           description: "Set to True (checked) to skip uploading artifacts"
720
721     wrappers:
722       - lf-infra-wrappers:
723           build-timeout: "{build-timeout}"
724           jenkins-ssh-credential: "{jenkins-ssh-credential}"
725
726     publishers:
727       - lf-infra-publish
728
729 - lf_pypi_verify_builders: &lf_pypi_verify_builders
730     name: lf-pypi-verify-builders
731
732     builders:
733       - lf-infra-pre-build
734       - lf-infra-tox-install:
735           python-version: "{python-version}"
736       - shell: "{pre-build-script}"
737       - lf-infra-tox-run:
738           parallel: "{parallel}"
739       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
740
741 - lf_pypi_merge_builders: &lf_pypi_merge_builders
742     name: lf-pypi-merge-builders
743
744     builders:
745       - lf-infra-pre-build
746       - lf-infra-tox-install:
747           python-version: "{python-version}"
748       - shell: "{pre-build-script}"
749       - lf-infra-tox-run:
750           parallel: "{parallel}"
751       - shell: !include-raw-escape: ../shell/pypi-dist-build.sh
752       - config-file-provider:
753           files:
754             - file-id: pypirc
755               target: "$HOME/.pypirc"
756       - inject:
757           properties-content: "REPOSITORY={pypi-repo}"
758       - shell: !include-raw-escape: ../shell/pypi-upload.sh
759
760 - job-template:
761     name: "{project-name}-pypi-verify-{stream}"
762     id: gerrit-pypi-verify
763     <<: *lf_pypi_common
764     <<: *lf_pypi_verify_builders
765
766     scm:
767       - lf-infra-gerrit-scm:
768           jenkins-ssh-credential: "{jenkins-ssh-credential}"
769           git-url: "{git-url}"
770           refspec: "$GERRIT_REFSPEC"
771           branch: "$GERRIT_BRANCH"
772           submodule-recursive: "{submodule-recursive}"
773           submodule-timeout: "{submodule-timeout}"
774           submodule-disable: "{submodule-disable}"
775           choosing-strategy: gerrit
776
777     triggers:
778       - gerrit:
779           server-name: "{gerrit-server-name}"
780           trigger-on:
781             - patchset-created-event:
782                 exclude-drafts: true
783                 exclude-trivial-rebase: false
784                 exclude-no-code-change: false
785             - draft-published-event
786             - comment-added-contains-event:
787                 # yamllint disable-line rule:line-length
788                 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
789           projects:
790             - project-compare-type: ANT
791               project-pattern: "{project}"
792               branches:
793                 - branch-compare-type: ANT
794                   branch-pattern: "**/{branch}"
795               file-paths: "{obj:gerrit_trigger_file_paths}"
796
797 - job-template:
798     name: "{project-name}-pypi-verify-{stream}"
799     id: github-pypi-verify
800     <<: *lf_pypi_common
801     <<: *lf_pypi_verify_builders
802
803     properties:
804       - github:
805           url: "{github-url}/{github-org}/{project}"
806
807     scm:
808       - lf-infra-github-scm:
809           url: "{git-clone-url}{github-org}/{project}"
810           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
811           branch: "$sha1"
812           submodule-recursive: "{submodule-recursive}"
813           submodule-timeout: "{submodule-timeout}"
814           submodule-disable: "{submodule-disable}"
815           choosing-strategy: default
816           jenkins-ssh-credential: "{jenkins-ssh-credential}"
817
818     triggers:
819       - github-pull-request:
820           trigger-phrase: "^(recheck|reverify)$"
821           only-trigger-phrase: false
822           status-context: "PyPI Verify"
823           permit-all: true
824           github-hooks: true
825           white-list-target-branches:
826             - "{branch}"
827           included-regions: "{obj:github_included_regions}"
828
829 - job-template:
830     name: "{project-name}-pypi-merge-{stream}"
831     id: gerrit-pypi-merge
832     <<: *lf_pypi_common
833     <<: *lf_pypi_merge_builders
834
835     cron: ""
836     pypi-repo: pypi-test
837
838     scm:
839       - lf-infra-gerrit-scm:
840           jenkins-ssh-credential: "{jenkins-ssh-credential}"
841           git-url: "{git-url}"
842           refspec: "$GERRIT_REFSPEC"
843           branch: "$GERRIT_BRANCH"
844           submodule-recursive: "{submodule-recursive}"
845           submodule-timeout: "{submodule-timeout}"
846           submodule-disable: "{submodule-disable}"
847           choosing-strategy: gerrit
848
849     triggers:
850       - timed: "{obj:cron}"
851       - gerrit:
852           server-name: "{gerrit-server-name}"
853           trigger-on:
854             - change-merged-event
855             - comment-added-contains-event:
856                 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
857           projects:
858             - project-compare-type: ANT
859               project-pattern: "{project}"
860               branches:
861                 - branch-compare-type: ANT
862                   branch-pattern: "**/{branch}"
863               file-paths: "{obj:gerrit_trigger_file_paths}"
864
865 - job-template:
866     name: "{project-name}-pypi-merge-{stream}"
867     id: github-pypi-merge
868     <<: *lf_pypi_common
869     <<: *lf_pypi_merge_builders
870
871     cron: ""
872     pypi-repo: pypi-test
873
874     properties:
875       - github:
876           url: "{github-url}/{github-org}/{project}"
877
878     scm:
879       - lf-infra-github-scm:
880           url: "{git-clone-url}{github-org}/{project}"
881           refspec: ""
882           branch: "refs/heads/{branch}"
883           submodule-recursive: "{submodule-recursive}"
884           submodule-timeout: "{submodule-timeout}"
885           submodule-disable: "{submodule-disable}"
886           choosing-strategy: default
887           jenkins-ssh-credential: "{jenkins-ssh-credential}"
888
889     triggers:
890       - timed: "{obj:cron}"
891       - github-pull-request:
892           trigger-phrase: "^remerge$"
893           only-trigger-phrase: false
894           status-context: "Merge"
895           permit-all: true
896           github-hooks: true
897           org-list:
898             - "{github-org}"
899           white-list: "{obj:github_pr_whitelist}"
900           admin-list: "{obj:github_pr_admin_list}"
901           white-list-target-branches:
902             - "{branch}"
903           included-regions: "{obj:github_included_regions}"