886074593f60923db21ec095a9b1f3158163189d
[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     # stream:    branch with - in place of / (eg. stable-helium)
12     # branch:    branch (eg. stable/helium)
13
14     pod:
15         - dell-build:
16            node: 'dell-us-testing-bm-1'
17            installer_type: 'fuel'
18            installer_ip: '10.20.0.2'
19
20     stream:
21         - master:
22             branch: 'master'
23
24     project: 'qtip'
25     somevar: 'foo'
26
27 - job-template:
28     name: qtip-test
29
30     builders:
31         - shell: |
32             echo "Hello world from qtip"
33
34 - job-template:
35     name: 'qtip-daily-{stream}'
36
37     # Job template for daily builders
38     #
39     # Required Variables:
40     #     stream:    branch with - in place of / (eg. stable)
41     #     branch:    branch (eg. stable)
42
43     varsetabove: '{somevar}'
44
45     parameters:
46         - project-parameter:
47             project: '{project}'
48
49     scm:
50         - git-scm:
51             credentials-id: '{ssh-credentials}'
52             refspec: ''
53             branch: '{branch}'
54
55     triggers:
56         - timed: 'H H * * *'
57
58     prebuilders:
59         - test-macro
60
61     builders:
62         - shell: |
63             pwd
64             find .
65             echo "Hello world from qtip {somevar} daily"
66
67     postbuilders:
68         - test-macro
69
70 - job-template:
71     name: 'qtip-verify'
72
73     parameters:
74         - project-parameter:
75             project: '{project}'
76         - gerrit-parameter:
77             branch: 'master'
78     scm:
79         - gerrit-trigger-scm:
80             credentials-id: '{ssh-credentials}'
81             refspec: '$GERRIT_REFSPEC'
82             choosing-strategy: 'gerrit'
83
84     triggers:
85         - gerrit:
86             trigger-on:
87                 - patchset-created-event:
88                     exclude-drafts: 'false'
89                     exclude-trivial-rebase: 'false'
90                     exclude-no-code-change: 'false'
91                 - draft-published-event
92                 - comment-added-contains-event:
93                     comment-contains-value: 'recheck'
94                 - comment-added-contains-event:
95                     comment-contains-value: 'reverify'
96             projects:
97               - project-compare-type: 'ANT'
98                 project-pattern: 'qtip'
99                 branches:
100                   - branch-compare-type: 'ANT'
101                     branch-pattern: '**/master'
102
103     builders:
104         - shell: |
105             pwd
106             find .
107             echo "verify logic goes here"
108
109 - job-template:
110     name: 'qtip-merge'
111
112     # builder-merge job to run JJB update
113     #
114     # This job's purpose is to update all the JJB
115
116     parameters:
117         - project-parameter:
118             project: '{project}'
119         - gerrit-parameter:
120             branch: 'master'
121
122     scm:
123         - gerrit-trigger-scm:
124             credentials-id: '{ssh-credentials}'
125             refspec: ''
126             choosing-strategy: 'default'
127
128     triggers:
129         - gerrit:
130             trigger-on:
131                 - change-merged-event
132                 - comment-added-contains-event:
133                     comment-contains-value: 'remerge'
134             projects:
135               - project-compare-type: 'ANT'
136                 project-pattern: 'qtip'
137                 branches:
138                     - branch-compare-type: 'ANT'
139                       branch-pattern: '**/master'
140
141     builders:
142         - shell: |
143             pwd
144             find .
145             echo "merge logic goes here"
146
147 - job-template:
148     name: 'qtip-dhrystone-serial-{pod}'
149
150     disabled: false
151
152     node: '{node}'
153
154     parameters:
155       - project-parameter:
156           project: '{project}'
157       - string:
158           name: INSTALLER_TYPE
159           default: '{installer_type}'
160           description: "Installer name that is used for deployment."
161       - string:
162           name: INSTALLER_IP
163           default: '{installer_ip}'
164           description: "Installer IP"
165       - string:
166           name: GIT_BASE
167           default: https://gerrit.opnfv.org/gerrit/$PROJECT
168           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
169
170     scm:
171        - git-scm:
172            credentials-id: '{ssh-credentials}'
173            refspec: ''
174            branch: master
175
176     builders:
177         - 'qtip-fetch-os-cred'
178         - 'qtip-dhrystone-serial'
179
180     triggers:
181       - timed: '0 20 * * *'
182
183 - job-template:
184     name: 'qtip-ssl-parallel-{pod}'
185
186     disabled: false
187
188     node: '{node}'
189
190     parameters:
191       - project-parameter:
192           project: '{project}'
193       - string:
194           name: INSTALLER_TYPE
195           default: '{installer_type}'
196           description: "Installer name that is used for deployment."
197       - string:
198           name: INSTALLER_IP
199           default: '{installer_ip}'
200           description: "IP address of the installer"
201       - string:
202           name: GIT_BASE
203           default: https://gerrit.opnfv.org/gerrit/$PROJECT
204           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
205
206     scm:
207        - git-scm:
208            credentials-id: '{ssh-credentials}'
209            refspec: ''
210            branch: master
211
212     builders:
213       - 'qtip-fetch-os-cred'
214       - 'qtip-ssl-parallel'
215
216     triggers:
217       - timed: '0 0,11,18 * * *'
218
219 ###########################
220 #biuilder macros
221 ###########################
222 - builder:
223     name: qtip-dhrystone-serial
224
225     builders:
226         - shell: |
227             #! /bin/bash
228             if [[ ! -f $WORKSPACE/opnfv-stack.sh ]]; then
229                echo "Unable to access file $WO:qRKSPACE/opnfv-openrc.sh"
230                exit 1
231             fi
232             source $WORKSPACE/opnfv-stack.sh
233             cd $WORKSPACE
234             echo "Running QTIP dhrystone with First Test case"
235             python qtip.py -s compute -b dhrystone_serial.yaml
236
237 - builder:
238     name: qtip-ssl-parallel
239
240     builders:
241         - shell: |
242             #!/bin/bash
243             if [[ ! -f $WORKSPACE/opnfv-stack.sh ]]; then
244                echo "Unable to access file $WORKSPACE/opnfv-openrc.sh"
245                exit 1
246             fi
247             source $WORKSPACE/opnfv-stack.sh
248             cd $WORKSPACE
249             echo "Running QTIP dhrystone with Second Test case"
250             python qtip.py -s compute -b ssl_parallel.yaml
251
252 - builder:
253     name: qtip-fetch-os-cred
254     builders:
255         - shell: |
256             echo $HOME
257             echo $WORKSPACE
258             cd $WORKSPACE
259             git clone https://gerrit.opnfv.org/gerrit/releng
260             cd $WORKSPACE/releng/utils
261             #./fetch_os_creds.sh                  #To test the problem with creating the file in $HOME
262             ./fetch_os_creds.sh -d $WORKSPACE/opnfv-stack.sh    #To test if  the file can be created in $WORKSPACE