530d05b54b662bb1f524c073e82c68c45a8eb764
[releng/global-jjb.git] / jjb / lf-python-jobs.yaml
1 ---
2 #################
3 # Job Templates #
4 #################
5
6 - job-template:
7     # Python projects typically use tox to run testing.
8     name: '{project-name}-tox-verify-{stream}'
9
10     # Required Variables:
11     #     branch:    git branch (default: master)
12     #     tox-dir:   directory containing the project's tox.ini relative to
13     #                the workspace. Empty works if tox.ini is at project root.
14
15     project-type: freestyle
16     node: '{build-node}'
17     concurrent: true
18
19     ######################
20     # Default parameters #
21     ######################
22
23     branch: master
24     build-timeout: 10
25     git-url: '$GIT_URL/$GERRIT_PROJECT'
26     submodule-recursive: true
27     tox-dir: ''
28     tox-envs: ''
29
30     #####################
31     # Job Configuration #
32     #####################
33
34     properties:
35       - lf-infra-properties:
36           build-days-to-keep: 7
37
38     parameters:
39       - lf-infra-parameters:
40           project: '{project}'
41           branch: '{branch}'
42       - lf-infra-tox-parameters:
43           tox-dir: '{tox-dir}'
44           tox-envs: '{tox-envs}'
45
46     scm:
47       - lf-infra-gerrit-scm:
48           jenkins-ssh-credential: '{jenkins-ssh-credential}'
49           git-url: '{git-url}'
50           refspec: '$GERRIT_REFSPEC'
51           branch: '$GERRIT_BRANCH'
52           submodule-recursive: '{submodule-recursive}'
53           choosing-strategy: gerrit
54
55     wrappers:
56       - lf-infra-wrappers:
57           build-timeout: '{build-timeout}'
58           jenkins-ssh-credential: '{jenkins-ssh-credential}'
59
60     triggers:
61       - gerrit:
62           server-name: '{gerrit-server-name}'
63           trigger-on:
64             - patchset-created-event:
65                 exclude-drafts: false
66                 exclude-trivial-rebase: false
67                 exclude-no-code-change: false
68             - draft-published-event
69             - comment-added-contains-event:
70                 comment-contains-value: recheck$
71           projects:
72             - project-compare-type: ANT
73               project-pattern: '{project}'
74               branches:
75                 - branch-compare-type: ANT
76                   branch-pattern: '**/{branch}'
77
78     builders:
79       - shell: !include-raw-escape:
80           # Workaround issue where the tox run later breaks the lftools virtualenv.
81           # Without running the install first the run in the publisher will fail
82           # due to missing lftools because it gets installed into a tox venv.
83           - ../shell/lftools-install.sh
84       - shell: !include-raw-escape:
85           - ../shell/tox-install.sh
86           - ../shell/tox-run.sh
87
88     publishers:
89       - lf-infra-publish