Added Job triggers for QTIP Jobs
[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     triggers:
236       - timed: '0 13 * * *'
237
238 - job-template:
239     name: 'qtip_dhrystone-BM_vs_BM-{pod}'
240
241
242     project-type: freestyle
243
244     disabled: false
245
246     node: '{node}'
247
248     logrotate:
249       daysToKeep: 30
250       numToKeep: 10
251       artifactDaysToKeep: -1
252       artifactNumToKeep: -1
253
254     parameters:
255       - project-parameter:
256           project: '{project}'
257       - string:
258           name: INSTALLER_TYPE
259           default: '{installer_type}'
260           description: "Installer name that is used for deployment."
261       - string:
262           name: INSTALLER_IP
263           default: '{installer_ip}'
264           description: "IP address of the installer"
265       - string:
266           name: GIT_BASE
267           default: https://gerrit.opnfv.org/gerrit/$PROJECT
268           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
269
270     scm:
271        - git-scm:
272            credentials-id: '{ssh-credentials}'
273            refspec: ''
274            branch: master
275
276     builders:
277       - 'qtip-fetch-os-cred'
278       - 'qtip-dhrystone-BM_vs_BM'
279
280     triggers:
281       - timed: "@midnight"
282
283 ###########################
284 #biuilder macros
285 ###########################
286 - builder:
287     name: qtip-dhrystone-VM_vs_BM
288
289     builders:
290         - shell: |
291             #! /bin/bash
292
293
294             if [[ ! -f $HOME/opnfv-openrc.sh]]; then
295                echo "Unable to access file $HOME/opnfv-openrc.sh"
296                exit 1
297             fi
298             source $HOME/opnfv-openrc.sh
299             cd $WORKSPACE
300
301
302             echo "Running QTIP dhrystone with First Test case"
303             ./QTIP.sh First dhrystone
304
305
306 - builder:
307     name: qtip-dhrystone-BM_vs_BM
308
309     builders:
310         - shell: |
311             #!/bin/bash
312
313
314             if [[ ! -f $HOME/opnfv-openrc.sh]]; then
315                echo "Unable to access file $HOME/opnfv-openrc.sh"
316                exit 1
317             fi
318             source $HOME/opnfv-openrc.sh
319             cd $WORKSPACE
320
321
322             echo "Running QTIP dhrystone with Second Test case"
323             ./QTIP.sh Second dhrystone
324
325
326 - builder:
327     name: qtip-fetch-os-cred
328     builders:
329         - shell: |
330             !include-raw ../../utils/fetch_os_creds.sh