e1e8b45872d220d6234bc191da54f1d7a4f77993
[ci-management.git] / jjb / global-templates-python.yaml
1 ---
2 - job-template:
3     # Job template for python verify jobs
4     #
5     # The purpose of this job template is to run tox for projects using this
6     # template.
7     #
8     # Required Variables:
9     #     branch:    git branch (eg. stable/lithium or master)
10     # Optional Variables:
11     #     path:      directory containing the project's tox.ini relative to
12     #                the workspace. The default is the project root.
13     #     pattern:   ant file-path pattern relative to the workspace used to
14     #                trigger the job
15
16     name: '{project}-{stream}-{subproject}-verify-python'
17     path: '$WORKSPACE'
18
19     project-type: freestyle
20     concurrent: true
21     node: '{build-node}'
22
23     properties:
24       - ecomp-infra-properties:
25           build-days-to-keep: '{build-days-to-keep}'
26
27     parameters:
28       - ecomp-infra-parameters:
29           project: '{project}'
30           branch: '{branch}'
31           refspec: 'refs/heads/{branch}'
32
33     scm:
34       - gerrit-trigger-scm:
35           refspec: '$GERRIT_REFSPEC'
36           choosing-strategy: 'gerrit'
37
38     wrappers:
39       - ecomp-infra-wrappers:
40           build-timeout: '{build-timeout}'
41
42     triggers:
43       - gerrit-trigger-patch-submitted:
44           server: '{server-name}'
45           project: '{project}'
46           branch: '{branch}'
47           files: '{pattern}'
48
49     builders:
50       - shell: |
51           virtualenv $WORKSPACE/venv-tox
52           source $WORKSPACE/venv-tox/bin/activate
53           pip install --upgrade pip
54           pip install --upgrade tox argparse
55           pip freeze
56           cd $WORKSPACE/{path}
57           tox
58
59 #     publishers:
60 #       - ecomp-infra-shiplogs:
61 #           maven-version: 'mvn33'