Merge "[VVP] vvp ci jobs docker"
[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 - job-template:
74     # Job template for docker daily jobs for 2 SCMs
75     #
76     # The purpose of this job template is to run:
77     # 1. inject a version properties file
78     # 2. login into the docker registry
79     # 4. run a specified shell script
80     #
81     # Required Variables:
82     #     branch:    git branch (eg. stable/lithium or master)
83
84     name: '{project-name}-{stream}-2scm-docker-shell-daily'
85     project-type: freestyle
86     node: 'ubuntu1604-docker-8c-8g'
87
88     properties:
89       - infra-properties:
90           build-days-to-keep: '{build-days-to-keep}'
91
92     parameters:
93       - infra-parameters:
94           project: '{project}'
95           branch: '{branch}'
96           refspec: 'refs/heads/{branch}'
97           artifacts: '{archive-artifacts}'
98       - maven-exec:
99           maven-version: '{maven-version}'
100
101     scm:
102       - gerrit-trigger-scm:
103           refspec: ''
104           choosing-strategy: 'default'
105           submodule-recursive: '{submodule-recursive}'
106       - git-extra-project:
107           project: '{extra-project1}'
108           refspec: '{extra-refspec1}'
109           branch: '{extra-branch1}'
110           checkout-dir: '{checkout-dir1}'
111       - git-extra-project:
112           project: '{extra-project2}'
113           refspec: '{extra-refspec2}'
114           branch: '{extra-branch2}'
115           checkout-dir: '{checkout-dir2}'
116
117     wrappers:
118       - infra-wrappers:
119           build-timeout: '{build-timeout}'
120
121     triggers:
122       # 12 AM UTC
123       - timed: 'H 12 * * *'
124       - gerrit-trigger-release-manually:
125           server: '{server-name}'
126           project: '{project}'
127           branch: '{branch}'
128
129     builders:
130       - provide-maven-settings:
131           global-settings-file: 'global-settings'
132           settings-file: '{mvn-settings}'
133       - inject:
134           properties-file: version.properties
135       - docker-login
136       - shell: '{script}'
137     publishers:
138       - infra-shiplogs:
139           maven-version: '{maven-version}'
140
141 - job-template:
142     # Job template for docker daily jobs for 3 SCMs
143     #
144     # The purpose of this job template is to run:
145     # 1. inject a version properties file
146     # 2. login into the docker registry
147     # 4. run a specified shell script
148     #
149     # Required Variables:
150     #     branch:    git branch (eg. stable/lithium or master)
151
152     name: '{project-name}-{stream}-3scm-docker-shell-daily'
153     project-type: freestyle
154     node: 'ubuntu1604-docker-8c-8g'
155
156     properties:
157       - infra-properties:
158           build-days-to-keep: '{build-days-to-keep}'
159
160     parameters:
161       - infra-parameters:
162           project: '{project}'
163           branch: '{branch}'
164           refspec: 'refs/heads/{branch}'
165           artifacts: '{archive-artifacts}'
166       - maven-exec:
167           maven-version: '{maven-version}'
168
169     scm:
170       - gerrit-trigger-scm:
171           refspec: ''
172           choosing-strategy: 'default'
173           submodule-recursive: '{submodule-recursive}'
174       - git-extra-project:
175           project: '{extra-project1}'
176           refspec: '{extra-refspec1}'
177           branch: '{extra-branch1}'
178           checkout-dir: '{checkout-dir1}'
179       - git-extra-project:
180           project: '{extra-project2}'
181           refspec: '{extra-refspec2}'
182           branch: '{extra-branch2}'
183           checkout-dir: '{checkout-dir2}'
184       - git-extra-project:
185           project: '{extra-project3}'
186           refspec: '{extra-refspec3}'
187           branch: '{extra-branch3}'
188           checkout-dir: '{checkout-dir3}'
189
190     wrappers:
191       - infra-wrappers:
192           build-timeout: '{build-timeout}'
193
194     triggers:
195       # 12 AM UTC
196       - timed: 'H 12 * * *'
197       - gerrit-trigger-release-manually:
198           server: '{server-name}'
199           project: '{project}'
200           branch: '{branch}'
201
202     builders:
203       - provide-maven-settings:
204           global-settings-file: 'global-settings'
205           settings-file: '{mvn-settings}'
206       - inject:
207           properties-file: version.properties
208       - docker-login
209       - shell: '{script}'
210     publishers:
211       - infra-shiplogs:
212           maven-version: '{maven-version}'