Merge "Remove jjb for repos for amsterdam release"
[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
75     #
76     # The purpose of this job template is to run:
77     # 1. login into the docker registry
78     # 2. docker build
79     # 3. docker tag
80     # 4. docker push
81     #
82     # Required Variables:
83     #     branch:    git branch (eg. stable/lithium or master)
84
85     name: '{project-name}-{stream}-docker-shell-daily'
86     project-type: freestyle
87     node: 'ubuntu1604-docker-8c-8g'
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
108     wrappers:
109       - infra-wrappers:
110           build-timeout: '{build-timeout}'
111
112     triggers:
113       # 12 AM UTC
114       - timed: 'H 12 * * *'
115       - gerrit-trigger-release-manually:
116           server: '{server-name}'
117           project: '{project}'
118           branch: '{branch}'
119
120     builders:
121       - provide-maven-settings:
122           global-settings-file: 'global-settings'
123           settings-file: '{mvn-settings}'
124
125       - docker-login
126
127       - shell: |
128           cp $WORKSPACE/docker/* .
129           docker -D build -t openecomp/testsuite .
130           export REPO="nexus3.onap.org:10003"
131           docker tag openecomp/testsuite:latest $REPO/openecomp/testsuite:1.0-STAGING-latest
132           docker push $REPO/openecomp/testsuite:1.0-STAGING-latest
133
134     publishers:
135       - infra-shiplogs:
136           maven-version: '{maven-version}'
137
138 - job-template:
139     # Job template for docker daily jobs for 2 SCMs
140     #
141     # The purpose of this job template is to run:
142     # 1. inject a version properties file
143     # 2. login into the docker registry
144     # 4. run a specified shell script
145     #
146     # Required Variables:
147     #     branch:    git branch (eg. stable/lithium or master)
148
149     name: '{project-name}-{stream}-2scm-docker-shell-daily'
150     project-type: freestyle
151     node: 'ubuntu1604-docker-8c-8g'
152
153     properties:
154       - infra-properties:
155           build-days-to-keep: '{build-days-to-keep}'
156
157     parameters:
158       - infra-parameters:
159           project: '{project}'
160           branch: '{branch}'
161           refspec: 'refs/heads/{branch}'
162           artifacts: '{archive-artifacts}'
163       - maven-exec:
164           maven-version: '{maven-version}'
165
166     scm:
167       - gerrit-trigger-scm:
168           refspec: ''
169           choosing-strategy: 'default'
170           submodule-recursive: '{submodule-recursive}'
171       - git-extra-project:
172           project: '{extra-project1}'
173           refspec: '{extra-refspec1}'
174           branch: '{extra-branch1}'
175           checkout-dir: '{checkout-dir1}'
176       - git-extra-project:
177           project: '{extra-project2}'
178           refspec: '{extra-refspec2}'
179           branch: '{extra-branch2}'
180           checkout-dir: '{checkout-dir2}'
181
182     wrappers:
183       - infra-wrappers:
184           build-timeout: '{build-timeout}'
185
186     triggers:
187       # 12 AM UTC
188       - timed: 'H 12 * * *'
189       - gerrit-trigger-release-manually:
190           server: '{server-name}'
191           project: '{project}'
192           branch: '{branch}'
193
194     builders:
195       - provide-maven-settings:
196           global-settings-file: 'global-settings'
197           settings-file: '{mvn-settings}'
198       - inject:
199           properties-file: version.properties
200       - docker-login
201       - shell: '{script}'
202     publishers:
203       - infra-shiplogs:
204           maven-version: '{maven-version}'
205
206 - job-template:
207     # Job template for docker daily jobs for 3 SCMs
208     #
209     # The purpose of this job template is to run:
210     # 1. inject a version properties file
211     # 2. login into the docker registry
212     # 4. run a specified shell script
213     #
214     # Required Variables:
215     #     branch:    git branch (eg. stable/lithium or master)
216
217     name: '{project-name}-{stream}-3scm-docker-shell-daily'
218     project-type: freestyle
219     node: 'ubuntu1604-docker-8c-8g'
220
221     properties:
222       - infra-properties:
223           build-days-to-keep: '{build-days-to-keep}'
224
225     parameters:
226       - infra-parameters:
227           project: '{project}'
228           branch: '{branch}'
229           refspec: 'refs/heads/{branch}'
230           artifacts: '{archive-artifacts}'
231       - maven-exec:
232           maven-version: '{maven-version}'
233
234     scm:
235       - gerrit-trigger-scm:
236           refspec: ''
237           choosing-strategy: 'default'
238           submodule-recursive: '{submodule-recursive}'
239       - git-extra-project:
240           project: '{extra-project1}'
241           refspec: '{extra-refspec1}'
242           branch: '{extra-branch1}'
243           checkout-dir: '{checkout-dir1}'
244       - git-extra-project:
245           project: '{extra-project2}'
246           refspec: '{extra-refspec2}'
247           branch: '{extra-branch2}'
248           checkout-dir: '{checkout-dir2}'
249       - git-extra-project:
250           project: '{extra-project3}'
251           refspec: '{extra-refspec3}'
252           branch: '{extra-branch3}'
253           checkout-dir: '{checkout-dir3}'
254
255     wrappers:
256       - infra-wrappers:
257           build-timeout: '{build-timeout}'
258
259     triggers:
260       # 12 AM UTC
261       - timed: 'H 12 * * *'
262       - gerrit-trigger-release-manually:
263           server: '{server-name}'
264           project: '{project}'
265           branch: '{branch}'
266
267     builders:
268       - provide-maven-settings:
269           global-settings-file: 'global-settings'
270           settings-file: '{mvn-settings}'
271       - inject:
272           properties-file: version.properties
273       - docker-login
274       - shell: '{script}'
275     publishers:
276       - infra-shiplogs:
277           maven-version: '{maven-version}'