jjb: move ssh wrappers to releng-defaults.yaml
[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-serial-{pod}'
9         - 'qtip-ssl-parallel-{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-us-testing-bm-1'
19            installer_type: 'fuel'
20            installer_ip: '10.20.0.2'
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     triggers:
75         - timed: 'H H * * *'
76
77     prebuilders:
78         - test-macro
79
80     builders:
81         - shell: |
82             pwd
83             find .
84             echo "Hello world from qtip {somevar} daily"
85
86     postbuilders:
87         - test-macro
88
89 - job-template:
90     name: 'qtip-verify'
91
92     project-type: freestyle
93
94     logrotate:
95         daysToKeep: 30
96         numToKeep: 10
97         artifactDaysToKeep: -1
98         artifactNumToKeep: -1
99
100     parameters:
101         - project-parameter:
102             project: '{project}'
103         - gerrit-parameter:
104             branch: 'master'
105     scm:
106         - gerrit-trigger-scm:
107             credentials-id: '{ssh-credentials}'
108             refspec: '$GERRIT_REFSPEC'
109             choosing-strategy: 'gerrit'
110
111     triggers:
112         - gerrit:
113             trigger-on:
114                 - patchset-created-event:
115                     exclude-drafts: 'false'
116                     exclude-trivial-rebase: 'false'
117                     exclude-no-code-change: 'false'
118                 - draft-published-event
119                 - comment-added-contains-event:
120                     comment-contains-value: 'recheck'
121                 - comment-added-contains-event:
122                     comment-contains-value: 'reverify'
123             projects:
124               - project-compare-type: 'ANT'
125                 project-pattern: 'qtip'
126                 branches:
127                   - branch-compare-type: 'ANT'
128                     branch-pattern: '**/master'
129
130     builders:
131         - shell: |
132             pwd
133             find .
134             echo "verify logic goes here"
135
136 - job-template:
137     name: 'qtip-merge'
138
139     # builder-merge job to run JJB update
140     #
141     # This job's purpose is to update all the JJB
142
143     project-type: freestyle
144
145     logrotate:
146         daysToKeep: 30
147         numToKeep: 40
148         artifactDaysToKeep: -1
149         artifactNumToKeep: 5
150
151     parameters:
152         - project-parameter:
153             project: '{project}'
154         - gerrit-parameter:
155             branch: 'master'
156
157     scm:
158         - gerrit-trigger-scm:
159             credentials-id: '{ssh-credentials}'
160             refspec: ''
161             choosing-strategy: 'default'
162
163     triggers:
164         - gerrit:
165             trigger-on:
166                 - change-merged-event
167                 - comment-added-contains-event:
168                     comment-contains-value: 'remerge'
169             projects:
170               - project-compare-type: 'ANT'
171                 project-pattern: 'qtip'
172                 branches:
173                     - branch-compare-type: 'ANT'
174                       branch-pattern: '**/master'
175
176     builders:
177         - shell: |
178             pwd
179             find .
180             echo "merge logic goes here"
181
182 - job-template:
183     name: 'qtip-dhrystone-serial-{pod}'
184
185     project-type: freestyle
186
187     disabled: false
188
189     node: '{node}'
190
191     logrotate:
192       daysToKeep: 30
193       numToKeep: 10
194       artifactDaysToKeep: -1
195       artifactNumToKeep: -1
196
197     parameters:
198       - project-parameter:
199           project: '{project}'
200       - string:
201           name: INSTALLER_TYPE
202           default: '{installer_type}'
203           description: "Installer name that is used for deployment."
204       - string:
205           name: INSTALLER_IP
206           default: '{installer_ip}'
207           description: "Installer IP"
208       - string:
209           name: GIT_BASE
210           default: https://gerrit.opnfv.org/gerrit/$PROJECT
211           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
212
213     scm:
214        - git-scm:
215            credentials-id: '{ssh-credentials}'
216            refspec: ''
217            branch: master
218
219     builders:
220         - 'qtip-fetch-os-cred'
221         - 'qtip-dhrystone-serial'
222
223     triggers:
224       - timed: '0 20 * * *'
225
226 - job-template:
227     name: 'qtip-ssl-parallel-{pod}'
228
229
230     project-type: freestyle
231
232     disabled: false
233
234     node: '{node}'
235
236     logrotate:
237       daysToKeep: 30
238       numToKeep: 10
239       artifactDaysToKeep: -1
240       artifactNumToKeep: -1
241
242     parameters:
243       - project-parameter:
244           project: '{project}'
245       - string:
246           name: INSTALLER_TYPE
247           default: '{installer_type}'
248           description: "Installer name that is used for deployment."
249       - string:
250           name: INSTALLER_IP
251           default: '{installer_ip}'
252           description: "IP address of the installer"
253       - string:
254           name: GIT_BASE
255           default: https://gerrit.opnfv.org/gerrit/$PROJECT
256           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
257
258     scm:
259        - git-scm:
260            credentials-id: '{ssh-credentials}'
261            refspec: ''
262            branch: master
263
264     builders:
265       - 'qtip-fetch-os-cred'
266       - 'qtip-ssl-parallel'
267
268     triggers:
269       - timed: "@midnight"
270
271 ###########################
272 #biuilder macros
273 ###########################
274 - builder:
275     name: qtip-dhrystone-serial
276
277     builders:
278         - shell: |
279             #! /bin/bash
280             if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
281                echo "Unable to access file $HOME/opnfv-openrc.sh"
282                exit 1
283             fi
284             source $HOME/opnfv-openrc.sh
285             cd $WORKSPACE
286             echo "Running QTIP dhrystone with First Test case"
287             python qtip.py -s compute -b dhrystone_serial.yaml
288
289
290 - builder:
291     name: qtip-ssl-parallel
292
293     builders:
294         - shell: |
295             #!/bin/bash
296             if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
297                echo "Unable to access file $HOME/opnfv-openrc.sh"
298                exit 1
299             fi
300             source $HOME/opnfv-openrc.sh
301             cd $WORKSPACE
302             echo "Running QTIP dhrystone with Second Test case"
303             python qtip.py -s compute -b ssl_parallel.yaml
304
305
306 - builder:
307     name: qtip-fetch-os-cred
308     builders:
309         - shell:
310             !include-raw ../../utils/fetch_os_creds.sh