Run yardstick against orange-pod2 joid
[releng.git] / jjb / yardstick / yardstick-ci-jobs.yml
1 ###################################
2 # job configuration for functest
3 ###################################
4 - project:
5     name: yardstick
6
7     project: '{name}'
8
9 #--------------------------------
10 # BRANCH ANCHORS
11 #--------------------------------
12     master: &master
13         stream: master
14         branch: '{stream}'
15         gs-pathname: ''
16     brahmaputra: &brahmaputra
17         stream: brahmaputra
18         branch: 'stable/{stream}'
19         gs-pathname: '{stream}'
20 #--------------------------------
21 # POD, INSTALLER, AND BRANCH MAPPING
22 #--------------------------------
23 #        brahmaputra
24 #--------------------------------
25     pod:
26         - opnfv-jump-2:
27             installer: fuel
28             <<: *brahmaputra
29         - intel-pod5:
30             installer: joid
31             <<: *brahmaputra
32 #--------------------------------
33 #        master
34 #--------------------------------
35         - ericsson-pod1:
36             installer: fuel
37             <<: *master
38         - ericsson-pod2:
39             installer: fuel
40             <<: *master
41         - intel-pod6:
42             installer: joid
43             <<: *master
44         - huawei-us-deploy-bare-1:
45             installer: compass
46             <<: *master
47         - zte-build-1:
48             installer: fuel
49             <<: *master
50         - orange-pod2:
51             installer: joid
52             <<: *master
53 #--------------------------------
54     loop:
55         - daily
56
57     jobs:
58         - 'yardstick-{installer}-{pod}-{loop}-{stream}'
59
60 ################################
61 # job templates
62 ################################
63 - job-template:
64     name: 'yardstick-{installer}-{pod}-{loop}-{stream}'
65
66     disabled: false
67
68     wrappers:
69         - build-name:
70             name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
71
72     parameters:
73         - project-parameter:
74             project: '{project}'
75         - '{pod}-defaults'
76         - '{installer}-defaults'
77         - 'yardstick-params-{pod}'
78         - string:
79             name: YARDSTICK_SUITE_NAME
80             default: opnfv_${{NODE_NAME}}_{loop}.yaml
81             description: 'Path to test suite'
82
83     scm:
84         - git-scm:
85             credentials-id: '{ssh-credentials}'
86             refspec: ''
87             branch: '{branch}'
88
89     builders:
90         - 'yardstick-cleanup'
91         - 'yardstick-fetch-os-creds'
92         - 'yardstick-daily'
93
94     publishers:
95         - email:
96             recipients: ana.cunha@ericsson.com jorgen.w.karlsson@ericsson.com
97
98 ########################
99 # builder macros
100 ########################
101 - builder:
102     name: yardstick-daily
103     builders:
104         - shell: |
105             #!/bin/bash
106             set -o errexit
107
108             echo "Yardstick: Run benchmark test suites ..."
109
110             # Pull the latest image
111             docker pull opnfv/yardstick
112
113             docker run \
114                --privileged=true \
115                 --rm \
116                 -t \
117                 -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \
118                 -e "INSTALLER_IP=${INSTALLER_IP}" \
119                 -e "POD_NAME=${NODE_NAME}" \
120                 -e "EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" \
121                 -e "YARDSTICK_BRANCH=${GERRIT_BRANCH}" \
122                 opnfv/yardstick \
123                 run_tests.sh $YARDSTICK_DB_BACKEND \
124                 $YARDSTICK_SUITE_NAME
125
126             echo "Yardstick: done!"
127
128 - builder:
129     name: yardstick-fetch-os-creds
130     builders:
131         - shell:
132             !include-raw ../../utils/fetch_os_creds.sh
133
134 - builder:
135     name: yardstick-cleanup
136     builders:
137         - shell: |
138             #!/bin/bash
139
140             echo "Cleaning up docker containers/images..."
141
142             # Remove previous running containers if exist
143             if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then
144                 echo "Removing existing opnfv/yardstick containers..."
145                 docker ps | grep opnfv/yardstick | awk '{print $1}' | xargs docker stop
146                 docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm
147             fi
148
149             # Remove existing images if exist
150             if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then
151                 echo "Docker images to remove:"
152                 docker images | head -1 && docker images | grep opnfv/yardstick
153                 image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}'))
154                 for tag in "${image_tags[@]}"; do
155                     echo "Removing docker image opnfv/yardstick:$tag..."
156                     docker rmi opnfv/yardstick:$tag
157                 done
158             fi
159 ########################
160 # parameter macros
161 ########################
162 - parameter:
163     name: 'yardstick-params-intel-pod5'
164     parameters:
165         - string:
166             name: YARDSTICK_DB_BACKEND
167             default: ''
168             description: 'Arguments to use in order to choose the backend DB'
169
170 - parameter:
171     name: 'yardstick-params-intel-pod6'
172     parameters:
173         - string:
174             name: YARDSTICK_DB_BACKEND
175             default: ''
176             description: 'Arguments to use in order to choose the backend DB'
177
178 - parameter:
179     name: 'yardstick-params-ericsson-pod1'
180     parameters:
181         - string:
182             name: YARDSTICK_DB_BACKEND
183             default: ''
184             description: 'Arguments to use in order to choose the backend DB'
185
186 - parameter:
187     name: 'yardstick-params-ericsson-pod2'
188     parameters:
189         - string:
190             name: YARDSTICK_DB_BACKEND
191             default: ''
192             description: 'Arguments to use in order to choose the backend DB'
193
194 - parameter:
195     name: 'yardstick-params-opnfv-jump-2'
196     parameters:
197         - string:
198             name: YARDSTICK_DB_BACKEND
199             default: '-r 213.77.62.197'
200             description: 'Arguments to use in order to choose the backend DB'
201
202 - parameter:
203     name: 'yardstick-params-huawei-us-deploy-bare-1'
204     parameters:
205         - string:
206             name: YARDSTICK_DB_BACKEND
207             default: ''
208             description: 'Arguments to use in order to choose the backend DB'
209
210 - parameter:
211     name: 'yardstick-params-zte-build-1'
212     parameters:
213         - string:
214             name: YARDSTICK_DB_BACKEND
215             default: ''
216             description: 'Arguments to use in order to choose the backend DB'
217
218 - parameter:
219     name: 'yardstick-params-orange-pod2'
220     parameters:
221         - string:
222             name: YARDSTICK_DB_BACKEND
223             default: ''
224             description: 'Arguments to use in order to choose the backend DB'