Merge "Fix sonar build issue for ves"
[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:
6     # 1. tox
7     #
8     # This job supports subprojects.
9     #
10     # Required Variables:
11     #     branch:    git branch (eg. stable/lithium or master)
12     # Optional Variables:
13     #     path:      directory containing the project's tox.ini relative to
14     #                the workspace. The default is the project root.
15     #     pattern:   ant file-path pattern relative to the workspace used to
16     #                trigger the job
17
18     name: '{project-name}-{stream}-{subproject}-verify-python'
19     path: '$WORKSPACE'
20
21     project-type: freestyle
22     concurrent: true
23     node: '{build-node}'
24
25     properties:
26       - infra-properties:
27           build-days-to-keep: '{build-days-to-keep}'
28
29     parameters:
30       - infra-parameters:
31           project: '{project}'
32           branch: '{branch}'
33           refspec: 'refs/heads/{branch}'
34           artifacts: '{archive-artifacts}'
35       - maven-exec:
36           maven-version: '{maven-version}'
37
38     scm:
39       - gerrit-trigger-scm:
40           refspec: '$GERRIT_REFSPEC'
41           choosing-strategy: 'gerrit'
42           submodule-recursive: '{submodule-recursive}'
43
44     wrappers:
45       - infra-wrappers:
46           build-timeout: '{build-timeout}'
47
48     triggers:
49       - gerrit-trigger-patch-submitted:
50           server: '{server-name}'
51           project: '{project}'
52           branch: '{branch}'
53           files: '{pattern}'
54
55     builders:
56       - provide-maven-settings:
57           global-settings-file: 'global-settings'
58           settings-file: '{mvn-settings}'
59       - shell: |
60           #!/bin/bash
61           virtualenv $WORKSPACE/venv-tox
62           source $WORKSPACE/venv-tox/bin/activate
63           pip install --upgrade pip
64           pip install --upgrade tox argparse
65           pip freeze
66           cd $WORKSPACE/{path}
67           tox
68
69     publishers:
70       - infra-shiplogs:
71           maven-version: '{maven-version}'
72
73
74 - job-template:
75     # Job template for docker daily jobs for 3 SCMs
76     #
77     # The purpose of this job template is to run:
78     # 1. inject a version properties file
79     # 2. login into the docker registry
80     # 4. run a specified shell script
81     #
82     # Required Variables:
83     #     branch:    git branch (eg. stable/lithium or master)
84
85     name: '{project-name}-{stream}-3scm-docker-shell-daily'
86     project-type: freestyle
87     node: 'queue-docker-4c-4g'
88
89     properties:
90       - infra-properties:
91           build-days-to-keep: '{build-days-to-keep}'
92
93     parameters:
94       - infra-parameters:
95           project: '{project}'
96           branch: '{branch}'
97           refspec: 'refs/heads/{branch}'
98           artifacts: '{archive-artifacts}'
99       - maven-exec:
100           maven-version: '{maven-version}'
101
102     scm:
103       - gerrit-trigger-scm:
104           refspec: ''
105           choosing-strategy: 'default'
106           submodule-recursive: '{submodule-recursive}'
107       - git-extra-project:
108           project: '{extra-project1}'
109           refspec: '{extra-refspec1}'
110           branch: '{extra-branch1}'
111           checkout-dir: '{checkout-dir1}'
112       - git-extra-project:
113           project: '{extra-project2}'
114           refspec: '{extra-refspec2}'
115           branch: '{extra-branch2}'
116           checkout-dir: '{checkout-dir2}'
117       - git-extra-project:
118           project: '{extra-project3}'
119           refspec: '{extra-refspec3}'
120           branch: '{extra-branch3}'
121           checkout-dir: '{checkout-dir3}'
122
123     wrappers:
124       - infra-wrappers-docker-build:
125           build-timeout: '{build-timeout}'
126
127     triggers:
128       - timed: 'H */4 * * *'
129       - gerrit-trigger-release-manually:
130           server: '{server-name}'
131           project: '{project}'
132           branch: '{branch}'
133       - gerrit-trigger-patch-merged:
134           server: '{server-name}'
135           project: '{project}'
136           branch: '{branch}'
137           files: '**'
138
139     builders:
140       - provide-maven-settings:
141           global-settings-file: 'global-settings'
142           settings-file: '{mvn-settings}'
143       - inject:
144           properties-file: version.properties
145       - docker-login
146       - shell: '{script}'
147     publishers:
148       - infra-shiplogs:
149           maven-version: '{maven-version}'