add vstf test suite in bottlenecks daily job
[releng.git] / jjb / bottlenecks / bottlenecks.yml
1 ####################################
2 # Job configuration for bottlenecks
3 ####################################
4 - project:
5     name: bottlenecks
6     jobs:
7         - 'bottlenecks-verify-{stream}'
8         - 'bottlenecks-daily-{installer}-{suite}-{pod}-{stream}'
9         - 'bottlenecks-{suite}-upload-artifacts-{stream}'
10     pod:
11         - lf:
12             node: 'opnfv-jump-2'
13             installer_type: 'fuel'
14             installer_ip: '10.20.0.2'
15
16     installer:
17         - 'fuel'
18
19     suite:
20         - 'rubbos'
21         - 'vstf'
22
23 # only master branch is enabled at the moment to keep no of jobs sane
24     stream:
25         - master:
26             branch: '{stream}'
27             gs-pathname: ''
28 #        - brahmaputra:
29 #            branch: 'stable/{stream}'
30 #            gs-pathname: '/{stream}'
31
32     project: 'bottlenecks'
33 ###############################
34 # Job templates
35 ##############################
36 - job-template:
37     name: 'bottlenecks-verify-{stream}'
38
39     parameters:
40         - project-parameter:
41             project: '{project}'
42         - gerrit-parameter:
43             branch: '{branch}'
44         - 'opnfv-build-defaults'
45
46     scm:
47         - gerrit-trigger-scm:
48             credentials-id: '{ssh-credentials}'
49             refspec: '$GERRIT_REFSPEC'
50             choosing-strategy: 'gerrit'
51
52     triggers:
53         - gerrit:
54             trigger-on:
55                 - patchset-created-event:
56                     exclude-drafts: 'false'
57                     exclude-trivial-rebase: 'false'
58                     exclude-no-code-change: 'false'
59                 - draft-published-event
60                 - comment-added-contains-event:
61                     comment-contains-value: 'recheck'
62                 - comment-added-contains-event:
63                     comment-contains-value: 'reverify'
64             projects:
65               - project-compare-type: 'ANT'
66                 project-pattern: '{project}'
67                 branches:
68                   - branch-compare-type: 'ANT'
69                     branch-pattern: '**/{branch}'
70                 forbidden-file-paths:
71                   - compare-type: ANT
72                     pattern: 'docs/**|.gitignore'
73
74     builders:
75         - shell: |
76             echo "Nothing to verify!"
77
78 - job-template:
79     name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
80
81     node: ericsson-build
82
83     concurrent: true
84
85     properties:
86         - throttle:
87             enabled: true
88             max-total: 1
89             max-per-node: 1
90
91     parameters:
92         - project-parameter:
93             project: '{project}'
94         - 'ericsson-ca-build-1-defaults'
95         - bottlenecks-parameter:
96             gs-pathname: '{gs-pathname}'
97             suite: '{suite}'
98
99     scm:
100         - git-scm:
101             credentials-id: '{ssh-credentials}'
102             refspec: ''
103             branch: '{branch}'
104
105     builders:
106         - 'bottlenecks-builder-upload-artifact'
107         - 'bottlenecks-workspace-cleanup'
108
109 - job-template:
110     name: 'bottlenecks-daily-{installer}-{suite}-{pod}-{stream}'
111
112     disabled: false
113
114     node: '{node}'
115
116     parameters:
117         - project-parameter:
118             project: '{project}'
119         - 'opnfv-jump-2-defaults'
120         - string:
121             name: POD_NAME
122             default: '{pod}'
123             description: "POD where the job runs"
124         - string:
125             name: INSTALLER_TYPE
126             default: '{installer_type}'
127             description: "Installer name that is used for deployment."
128         - string:
129             name: INSTALLER_IP
130             default: '{installer_ip}'
131             description: "Installer IP."
132         - string:
133             name: GERRIT_REFSPEC_DEBUG
134             default: ''
135             description: "Gerrit refspec for debug."
136
137     scm:
138         - git-scm:
139             credentials-id: '{ssh-credentials}'
140             refspec: ''
141             branch: '{branch}'
142
143     triggers:
144         - 'bottlenecks-trigger-{pod}'
145
146     builders:
147         - 'bottlenecks-fetch-os-creds'
148         - 'bottlenecks-run-{suite}'
149
150     publishers:
151         - email:
152             recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com liyiting@huawei.com
153
154 ####################
155 # parameter macros
156 ####################
157 - parameter:
158     name: bottlenecks-parameter
159     parameters:
160         - string:
161            name: CACHE_DIR
162            default: $WORKSPACE/cache/{suite}
163            description: "the cache to store packages downloaded from public IP"
164         - string:
165            name: SUITE_URL
166            default: gs://artifacts.opnfv.org/bottlenecks/{suite}{gs-pathname}
167            description: "LF artifacts url for storage of bottlenecks packages"
168         - string:
169            name: PACKAGE_URL
170            default: http://205.177.226.235:9999/bottlenecks/{suite}/
171            description: "the url where we store the packages used for bottlenecks rubbos"
172
173 ###################################
174 #builders for bottlenecks project
175 ###################################
176 - builder:
177     name: bottlenecks-fetch-os-creds
178     builders:
179         - shell:
180             !include-raw ../../utils/fetch_os_creds.sh
181
182 - builder:
183     name: bottlenecks-run-rubbos
184     builders:
185         - shell: |
186             #!/bin/bash
187             set -o errexit
188
189             echo "Bottlenecks: rubbos running now..."
190             cd $WORKSPACE
191             ./ci/run.sh $GERRIT_REFSPEC_DEBUG
192
193 - builder:
194     name: bottlenecks-run-vstf
195     builders:
196         - shell: |
197             #!/bin/bash
198             set -o errexit
199
200             echo "Bottlenecks: vstf running now..."
201             #need FIX
202             echo "hello world from bottlenecks vstf"
203
204 - builder:
205     name: bottlenecks-builder-upload-artifact
206     builders:
207         - shell: |
208             #!/bin/bash
209             set -o errexit
210
211             echo "Bottlenecks ${suite}: upload to artifacts from the public IP"
212
213             [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR
214
215             for file in $(curl -s $PACKAGE_URL |
216                                grep href |
217                                sed 's/.*href="//' |
218                                sed 's/".*//' |
219                                grep '^[a-zA-Z].*'); do
220                  curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file
221                  gsutil cp $CACHE_DIR/$file $SUITE_URL
222             done
223
224 - builder:
225     name: bottlenecks-workspace-cleanup
226     builders:
227         - shell: |
228             #!/bin/bash
229             set -o errexit
230
231             echo "Bottlenecks: cleanup cache used for storage downloaded packages"
232
233             /bin/rm -rf $WORKSPACE
234
235 #######################
236 #trigger macros
237 #######################
238 - trigger:
239     name: 'bottlenecks-trigger-lf'
240     triggers:
241         - timed: '0 6 * * *'
242         - gerrit:
243             trigger-on:
244                 - patchset-created-event:
245                     exclude-drafts: 'false'
246                     exclude-trivial-rebase: 'false'
247                     exclude-no-code-change: 'false'
248                 - draft-published-event
249                 - comment-added-contains-event:
250                     comment-contains-value: 'recheck'
251                 - comment-added-contains-event:
252                     comment-contains-value: 'reverify'
253             projects:
254               - project-compare-type: 'ANT'
255                 project-pattern: '{project}'
256                 branches:
257                   - branch-compare-type: 'ANT'
258                     branch-pattern: '**/{branch}'
259                 forbidden-file-paths:
260                   - compare-type: ANT
261                     pattern: 'docs/**|.gitignore'