3875158814571631efd23b9cc0bfa92e68fa78c3
[releng.git] / jjb / qtip / qtip.yml
1 - project:
2     name: qtip
3     jobs:
4         - 'qtip-test'
5         - 'qtip-daily-{stream}'
6         - 'qtip-merge'
7         - 'qtip-verify'
8         - 'qtip-dhrystone-VM_vs_Baremetal-{pod}'
9         - 'qtip_dhrystone-BM_vs_BM-{pod}'
10
11
12     # stream:    branch with - in place of / (eg. stable-helium)
13     # branch:    branch (eg. stable/helium)
14
15
16     pod:
17         - dell-build:
18            node: 'dell-build'
19            installer_type: 'foreman'
20            installer_ip: '172.18.0.12'
21
22
23     stream:
24         - master:
25             branch: 'master'
26
27     project: 'qtip'
28     somevar: 'foo'
29
30 - job-template:
31     name: qtip-test
32
33     project-type: freestyle
34
35     logrotate:
36         daysToKeep: 30
37         numToKeep: 10
38         artifactDaysToKeep: -1
39         artifactNumToKeep: -1
40
41     builders:
42         - shell: |
43             echo "Hello world from qtip"
44
45 - job-template:
46     name: 'qtip-daily-{stream}'
47
48     # Job template for daily builders
49     #
50     # Required Variables:
51     #     stream:    branch with - in place of / (eg. stable)
52     #     branch:    branch (eg. stable)
53
54     project-type: freestyle
55     varsetabove: '{somevar}'
56
57     logrotate:
58         daysToKeep: '{build-days-to-keep}'
59         numToKeep: '{build-num-to-keep}'
60         artifactDaysToKeep: '{build-artifact-days-to-keep}'
61         artifactNumToKeep: '{build-artifact-num-to-keep}'
62
63     parameters:
64         - project-parameter:
65             project: '{project}'
66
67
68     scm:
69         - git-scm:
70             credentials-id: '{ssh-credentials}'
71             refspec: ''
72             branch: '{branch}'
73
74     wrappers:
75         - ssh-agent-credentials:
76             user: '{ssh-credentials}'
77
78     triggers:
79         - timed: 'H H * * *'
80
81     prebuilders:
82         - test-macro
83
84     builders:
85         - shell: |
86             pwd
87             find .
88             echo "Hello world from qtip {somevar} daily"
89
90     postbuilders:
91         - test-macro
92
93 - job-template:
94     name: 'qtip-verify'
95
96     project-type: freestyle
97
98     logrotate:
99         daysToKeep: 30
100         numToKeep: 10
101         artifactDaysToKeep: -1
102         artifactNumToKeep: -1
103
104     parameters:
105         - project-parameter:
106             project: '{project}'
107         - gerrit-parameter:
108             branch: 'master'
109     scm:
110         - gerrit-trigger-scm:
111             credentials-id: '{ssh-credentials}'
112             refspec: '$GERRIT_REFSPEC'
113             choosing-strategy: 'gerrit'
114
115     wrappers:
116         - ssh-agent-credentials:
117             user: '{ssh-credentials}'
118
119     triggers:
120         - gerrit:
121             trigger-on:
122                 - patchset-created-event:
123                     exclude-drafts: 'false'
124                     exclude-trivial-rebase: 'false'
125                     exclude-no-code-change: 'false'
126                 - draft-published-event
127                 - comment-added-contains-event:
128                     comment-contains-value: 'recheck'
129                 - comment-added-contains-event:
130                     comment-contains-value: 'reverify'
131             projects:
132               - project-compare-type: 'ANT'
133                 project-pattern: 'qtip'
134                 branches:
135                   - branch-compare-type: 'ANT'
136                     branch-pattern: '**/master'
137
138     builders:
139         - shell: |
140             pwd
141             find .
142             echo "verify logic goes here"
143
144 - job-template:
145     name: 'qtip-merge'
146
147     # builder-merge job to run JJB update
148     #
149     # This job's purpose is to update all the JJB
150
151     project-type: freestyle
152
153     logrotate:
154         daysToKeep: 30
155         numToKeep: 40
156         artifactDaysToKeep: -1
157         artifactNumToKeep: 5
158
159     parameters:
160         - project-parameter:
161             project: '{project}'
162         - gerrit-parameter:
163             branch: 'master'
164
165     scm:
166         - gerrit-trigger-scm:
167             credentials-id: '{ssh-credentials}'
168             refspec: ''
169             choosing-strategy: 'default'
170
171     wrappers:
172         - ssh-agent-credentials:
173             user: '{ssh-credentials}'
174
175     triggers:
176         - gerrit:
177             trigger-on:
178                 - change-merged-event
179                 - comment-added-contains-event:
180                     comment-contains-value: 'remerge'
181             projects:
182               - project-compare-type: 'ANT'
183                 project-pattern: 'qtip'
184                 branches:
185                     - branch-compare-type: 'ANT'
186                       branch-pattern: '**/master'
187
188     builders:
189         - shell: |
190             pwd
191             find .
192             echo "merge logic goes here"
193
194 - job-template:
195     name: 'qtip-dhrystone-VM_vs_Baremetal-{pod}'
196
197     project-type: freestyle
198
199     disabled: false
200
201     node: '{node}'
202
203     logrotate:
204       daysToKeep: 30
205       numToKeep: 10
206       artifactDaysToKeep: -1
207       artifactNumToKeep: -1
208
209     parameters:
210       - project-parameter:
211           project: '{project}'
212       - string:
213           name: INSTALLER_TYPE
214           default: '{installer_type}'
215           description: "Installer name that is used for deployment."
216       - string:
217           name: INSTALLER_IP
218           default: '{installer_ip}'
219           description: "Installer IP"
220       - string:
221           name: GIT_BASE
222           default: https://gerrit.opnfv.org/gerrit/$PROJECT
223           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
224
225     scm:
226        - git-scm:
227            credentials-id: '{ssh-credentials}'
228            refspec: ''
229            branch: master
230
231     builders:
232         - 'qtip-fetch-os-cred'
233         - 'qtip-dhrystone-VM_vs_BM'
234
235 - job-template:
236     name: 'qtip_dhrystone-BM_vs_BM-{pod}'
237
238
239     project-type: freestyle
240
241     disabled: false
242
243     node: '{node}'
244
245     logrotate:
246       daysToKeep: 30
247       numToKeep: 10
248       artifactDaysToKeep: -1
249       artifactNumToKeep: -1
250
251     parameters:
252       - project-parameter:
253           project: '{project}'
254       - string:
255           name: INSTALLER_TYPE
256           default: '{installer_type}'
257           description: "Installer name that is used for deployment."
258       - string:
259           name: INSTALLER_IP
260           default: '{installer_ip}'
261           description: "IP address of the installer"
262       - string:
263           name: GIT_BASE
264           default: https://gerrit.opnfv.org/gerrit/$PROJECT
265           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
266
267     scm:
268        - git-scm:
269            credentials-id: '{ssh-credentials}'
270            refspec: ''
271            branch: master
272
273     builders:
274       - 'qtip-fetch-os-cred'
275       - 'qtip-dhrystone-BM_vs_BM'
276
277
278 ###########################
279 #biuilder macros
280 ###########################
281 - builder:
282     name: qtip-dhrystone-VM_vs_BM
283
284     builders:
285         - shell: |
286             #! /bin/bash
287
288
289             if [[ ! -f $HOME/opnfv-openrc.sh]]; then
290                echo "Unable to access file $HOME/opnfv-openrc.sh"
291                exit 1
292             fi
293             source $HOME/opnfv-openrc.sh
294             cd $WORKSPACE
295
296
297             echo "Running QTIP dhrystone with First Test case"
298             ./QTIP.sh First dhrystone
299
300
301 - builder:
302     name: qtip-dhrystone-BM_vs_BM
303
304     builders:
305         - shell: |
306             #!/bin/bash
307
308
309             if [[ ! -f $HOME/opnfv-openrc.sh]]; then
310                echo "Unable to access file $HOME/opnfv-openrc.sh"
311                exit 1
312             fi
313             source $HOME/opnfv-openrc.sh
314             cd $WORKSPACE
315
316
317             echo "Running QTIP dhrystone with Second Test case"
318             ./QTIP.sh Second dhrystone
319
320
321 - builder:
322     name: qtip-fetch-os-cred
323     builders:
324         - shell: |
325             !include-raw ../../utils/fetch_os_creds.sh