Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame^] | 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 | parameters: |
| 24 | - ecomp-infra-parameters: |
| 25 | project: '{project}' |
| 26 | branch: '{branch}' |
| 27 | refspec: 'refs/heads/{branch}' |
| 28 | |
| 29 | scm: |
| 30 | - gerrit-trigger-scm: |
| 31 | refspec: '$GERRIT_REFSPEC' |
| 32 | choosing-strategy: 'gerrit' |
| 33 | |
| 34 | wrappers: |
| 35 | - ecomp-infra-wrappers: |
| 36 | build-timeout: '{build-timeout}' |
| 37 | |
| 38 | triggers: |
| 39 | - gerrit-trigger-patch-submitted-pattern: |
| 40 | name: '{project}' |
| 41 | branch: '{branch}' |
| 42 | pattern: '{pattern}' |
| 43 | |
| 44 | builders: |
| 45 | - shell: | |
| 46 | virtualenv $WORKSPACE/venv-tox |
| 47 | source $WORKSPACE/venv-tox/bin/activate |
| 48 | pip install --upgrade pip |
| 49 | pip install --upgrade tox argparse |
| 50 | pip freeze |
| 51 | cd $WORKSPACE/{path} |
| 52 | tox |
| 53 | |
| 54 | publishers: |
| 55 | - ecomp-infra-shiplogs: |
| 56 | maven-version: 'mvn33' |