5 - 'yardstick-daily-{stream}'
13 # stream: branch with - in place of / (eg. stable-helium)
14 # branch: branch (eg. stable/helium)
23 name: 'yardstick-daily-{stream}'
25 # Job template for daily builders
28 # stream: branch with - in place of / (eg. stable)
29 # branch: branch (eg. stable)
33 project-type: freestyle
34 varsetabove: '{somevar}'
37 daysToKeep: '{build-days-to-keep}'
38 numToKeep: '{build-num-to-keep}'
39 artifactDaysToKeep: '{build-artifact-days-to-keep}'
40 artifactNumToKeep: '{build-artifact-num-to-keep}'
47 default: https://gerrit.opnfv.org/gerrit/$PROJECT
48 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
52 credentials-id: '{ssh-credentials}'
57 - ssh-agent-credentials:
58 user: '{ssh-credentials}'
70 echo "Hello world from yardstick {somevar} daily"
76 name: 'yardstick-verify'
78 project-type: freestyle
85 artifactDaysToKeep: -1
95 default: https://gerrit.opnfv.org/gerrit/$PROJECT
96 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
100 credentials-id: '{ssh-credentials}'
101 refspec: '$GERRIT_REFSPEC'
102 choosing-strategy: 'gerrit'
105 - ssh-agent-credentials:
106 user: '{ssh-credentials}'
111 - patchset-created-event:
112 exclude-drafts: 'false'
113 exclude-trivial-rebase: 'false'
114 exclude-no-code-change: 'false'
115 - draft-published-event
116 - comment-added-contains-event:
117 comment-contains-value: 'recheck'
118 - comment-added-contains-event:
119 comment-contains-value: 'reverify'
121 - project-compare-type: 'ANT'
122 project-pattern: 'yardstick'
124 - branch-compare-type: 'ANT'
125 branch-pattern: '**/master'
129 echo "Running unit tests..."
134 name: 'yardstick-merge'
136 # builder-merge job to run JJB update
138 # This job's purpose is to update all the JJB
140 project-type: freestyle
147 artifactDaysToKeep: -1
157 default: https://gerrit.opnfv.org/gerrit/$PROJECT
158 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
161 - gerrit-trigger-scm:
162 credentials-id: '{ssh-credentials}'
164 choosing-strategy: 'default'
167 - ssh-agent-credentials:
168 user: '{ssh-credentials}'
173 - change-merged-event
174 - comment-added-contains-event:
175 comment-contains-value: 'remerge'
177 - project-compare-type: 'ANT'
178 project-pattern: 'yardstick'
180 - branch-compare-type: 'ANT'
181 branch-pattern: '**/master'
185 echo "Running unit tests..."
190 name: 'yardstick-{pod}'
192 project-type: freestyle
204 credentials-id: '{ssh-credentials}'
211 artifactDaysToKeep: -1
212 artifactNumToKeep: -1
217 ########################
219 ########################
229 echo "Yardstick: prepare Yardstick environment"
231 # source openstack vars
232 source $HOME/yardstick/opnfv-openrc.sh
234 # check if cirros-0.3.3 image is already available
235 # if not, create the image
236 echo "Yardstick: configure the image"
237 IMAGE_NAME=cirros-0.3.3
238 if [[ ! $(nova image-show $IMAGE_NAME > /dev/null 2>&1) ]]; then
239 echo "Image $IMAGE_NAME doesn't exist. Creating image $IMAGE_NAME"
240 glance image-create --name cirros-0.3.3 --is-public true --disk-format qcow2 --container-format bare --file $HOME/yardstick/cirros-0.3.3-x86_64-disk.img
242 echo "Image $IMAGE_NAME exists. Proceeding with yardstick."
246 echo "Yardstick: setup virtualenv"
248 virtualenv $WORKSPACE/yardstick_venv
249 source $WORKSPACE/yardstick_venv/bin/activate
250 python setup.py develop
253 echo "Yardstick: execute ping scenario"
254 yardstick -v -d samples/ping.yaml
257 echo "Yardstick: cleanup"
258 glance image-delete $IMAGE_NAME"
261 echo "Yardstick: done!"