Merge "Checkout submodules recursively."
[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-name}-{stream}-{subproject}-verify-python'
17     path: '$WORKSPACE'
18
19     project-type: freestyle
20     concurrent: true
21     node: '{build-node}'
22
23     properties:
24       - infra-properties:
25           build-days-to-keep: '{build-days-to-keep}'
26
27     parameters:
28       - infra-parameters:
29           project: '{project}'
30           branch: '{branch}'
31           refspec: 'refs/heads/{branch}'
32           artifacts: '{archive-artifacts}'
33       - maven-exec:
34           maven-version: '{maven-version}'
35
36     scm:
37       - gerrit-trigger-scm:
38           refspec: '$GERRIT_REFSPEC'
39           choosing-strategy: 'gerrit'
40           submodule-recursive: '{submodule-recursive}'
41
42     wrappers:
43       - infra-wrappers:
44           build-timeout: '{build-timeout}'
45
46     triggers:
47       - gerrit-trigger-patch-submitted:
48           server: '{server-name}'
49           project: '{project}'
50           branch: '{branch}'
51           files: '{pattern}'
52
53     builders:
54       - provide-maven-settings:
55           global-settings-file: 'global-settings'
56           settings-file: '{mvn-settings}'
57       - shell: |
58           #!/bin/bash
59           virtualenv $WORKSPACE/venv-tox
60           source $WORKSPACE/venv-tox/bin/activate
61           pip install --upgrade pip
62           pip install --upgrade tox argparse
63           pip freeze
64           cd $WORKSPACE/{path}
65           tox
66
67     publishers:
68       - infra-shiplogs:
69           maven-version: '{maven-version}'
70
71 - job-template:
72     name: '{project-name}-{stream}-docker-shell-daily'
73     project-type: freestyle
74     node: 'ubuntu1604-docker-8c-8g'
75
76     properties:
77       - infra-properties:
78           build-days-to-keep: '{build-days-to-keep}'
79
80     parameters:
81       - infra-parameters:
82           project: '{project}'
83           branch: '{branch}'
84           refspec: 'refs/heads/{branch}'
85           artifacts: '{archive-artifacts}'
86       - maven-exec:
87           maven-version: '{maven-version}'
88
89     scm:
90       - gerrit-trigger-scm:
91           refspec: ''
92           choosing-strategy: 'default'
93           submodule-recursive: '{submodule-recursive}'
94
95     wrappers:
96       - infra-wrappers:
97           build-timeout: '{build-timeout}'
98
99     triggers:
100       # 12 AM UTC
101       - timed: 'H 12 * * *'
102       - gerrit-trigger-release-manually:
103           server: '{server-name}'
104           project: '{project}'
105           branch: '{branch}'
106
107     builders:
108
109       - provide-maven-settings:
110           global-settings-file: 'global-settings'
111           settings-file: '{mvn-settings}'
112
113       - docker-login
114
115       - shell: |
116           cp $WORKSPACE/docker/* .
117           docker -D build -t openecomp/testsuite .
118           export REPO="nexus3.onap.org:10003"
119           docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:1.0-STAGING-latest
120           docker push $REPO/openecomp/testsuite:1.0-STAGING-latest
121
122     publishers:
123       - infra-shiplogs:
124           maven-version: '{maven-version}'
125
126 - job-template:
127     name: '{project-name}-{stream}-2scm-docker-shell-daily'
128     project-type: freestyle
129     node: 'ubuntu1604-docker-8c-8g'
130
131     properties:
132       - infra-properties:
133           build-days-to-keep: '{build-days-to-keep}'
134
135     parameters:
136       - infra-parameters:
137           project: '{project}'
138           branch: '{branch}'
139           refspec: 'refs/heads/{branch}'
140           artifacts: '{archive-artifacts}'
141       - maven-exec:
142           maven-version: '{maven-version}'
143
144     scm:
145       - gerrit-trigger-scm:
146           refspec: ''
147           choosing-strategy: 'default'
148           submodule-recursive: '{submodule-recursive}'
149       - git-extra-project:
150           project: '{extra-project1}'
151           refspec: '{extra-refspec1}'
152           branch: '{extra-branch1}'
153           checkout-dir: '{checkout-dir1}'
154       - git-extra-project:
155           project: '{extra-project2}'
156           refspec: '{extra-refspec2}'
157           branch: '{extra-branch2}'
158           checkout-dir: '{checkout-dir2}'
159
160     wrappers:
161       - infra-wrappers:
162           build-timeout: '{build-timeout}'
163
164     triggers:
165       # 12 AM UTC
166       - timed: 'H 12 * * *'
167       - gerrit-trigger-release-manually:
168           server: '{server-name}'
169           project: '{project}'
170           branch: '{branch}'
171
172     builders:
173
174       - provide-maven-settings:
175           global-settings-file: 'global-settings'
176           settings-file: '{mvn-settings}'
177
178       - inject:
179           properties-file: version.properties
180
181       - docker-login
182
183       - shell: '{script}'
184
185     publishers:
186       - infra-shiplogs:
187           maven-version: '{maven-version}'
188
189 - job-template:
190     name: '{project-name}-{stream}-3scm-docker-shell-daily'
191     project-type: freestyle
192     node: 'ubuntu1604-docker-8c-8g'
193
194     properties:
195       - infra-properties:
196           build-days-to-keep: '{build-days-to-keep}'
197
198     parameters:
199       - infra-parameters:
200           project: '{project}'
201           branch: '{branch}'
202           refspec: 'refs/heads/{branch}'
203           artifacts: '{archive-artifacts}'
204       - maven-exec:
205           maven-version: '{maven-version}'
206
207     scm:
208       - gerrit-trigger-scm:
209           refspec: ''
210           choosing-strategy: 'default'
211           submodule-recursive: '{submodule-recursive}'
212       - git-extra-project:
213           project: '{extra-project1}'
214           refspec: '{extra-refspec1}'
215           branch: '{extra-branch1}'
216           checkout-dir: '{checkout-dir1}'
217       - git-extra-project:
218           project: '{extra-project2}'
219           refspec: '{extra-refspec2}'
220           branch: '{extra-branch2}'
221           checkout-dir: '{checkout-dir2}'
222       - git-extra-project:
223           project: '{extra-project3}'
224           refspec: '{extra-refspec3}'
225           branch: '{extra-branch3}'
226           checkout-dir: '{checkout-dir3}'
227
228     wrappers:
229       - infra-wrappers:
230           build-timeout: '{build-timeout}'
231
232     triggers:
233       # 12 AM UTC
234       - timed: 'H 12 * * *'
235       - gerrit-trigger-release-manually:
236           server: '{server-name}'
237           project: '{project}'
238           branch: '{branch}'
239
240     builders:
241
242       - provide-maven-settings:
243           global-settings-file: 'global-settings'
244           settings-file: '{mvn-settings}'
245
246       - inject:
247           properties-file: version.properties
248
249       - docker-login
250
251       - shell: '{script}'
252
253     publishers:
254       - infra-shiplogs:
255           maven-version: '{maven-version}'
256