Merge lp:~canonical-platform-qa/qa-jenkins-jobs/performance-jobs into lp:qa-jenkins-jobs
- performance-jobs
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Max Brustkern |
Approved revision: | 211 |
Merged at revision: | 206 |
Proposed branch: | lp:~canonical-platform-qa/qa-jenkins-jobs/performance-jobs |
Merge into: | lp:qa-jenkins-jobs |
Diff against target: |
272 lines (+170/-59) 4 files modified
jobs/macros.yaml (+14/-7) jobs/performance/jobs.yaml (+156/-0) scripts/performance/run_performance_qakit.sh (+0/-21) scripts/performance/run_performance_tests.sh (+0/-31) |
To merge this branch: | bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/performance-jobs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Max Brustkern (community) | Approve | ||
platform-qa-bot | continuous-integration | Approve | |
Review via email: mp+316625@code.launchpad.net |
Commit message
jobs for performance tests execution
Description of the change
platform-qa-bot (platform-qa-bot) wrote : | # |
- 206. By Sergio Cazzolato
-
Adding triggers and wrappers
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:206
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
- 207. By Sergio Cazzolato
-
Fix for device ip in job
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:207
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
Max Brustkern (nuclearbob) wrote : | # |
Some diff questions, but in general I think this will work well.
Sergio Cazzolato (sergio-j-cazzolato) wrote : | # |
Answers and questions in diff
Max Brustkern (nuclearbob) wrote : | # |
Responded!
- 208. By Sergio Cazzolato
-
reusing grafana setup between perf and tests
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:208
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
Max Brustkern (nuclearbob) wrote : | # |
I get an error when attempting a deployment:
./scripts/
+ dirname ./scripts/
+ cd ./scripts
+ pwd
+ JOB_PATH=
+ ARGS=update
+ make -C /home/max/
make: Entering directory '/home/
make -C auto-upgrade-
make[1]: Entering directory '/home/
../../scripts/
make[1]: Leaving directory '/home/
make: Leaving directory '/home/
+ python -m jenkins_jobs.cmd update -r /home/max/
INFO:root:Updating jobs in ['/home/
/usr/lib/
DeprecationWa
Traceback (most recent call last):
File "/usr/lib/
"__main__", fname, loader, pkg_name)
File "/usr/lib/
exec code in run_globals
File "/usr/lib/
main()
File "/usr/lib/
execute(
File "/usr/lib/
n_workers=
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
data = local_yaml.
File "/usr/lib/
return yaml.load(stream, functools.
File "/usr/lib/
return loader.
File "/usr/lib/
node = self.get_
File "/usr/lib/
document = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
- 209. By Sergio Cazzolato
-
Minor fixes
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:209
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
- 210. By Sergio Cazzolato
-
Fixing issues
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:210
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
- 211. By Sergio Cazzolato
-
minor fix on parameters
platform-qa-bot (platform-qa-bot) wrote : | # |
PASSED: Continuous integration, rev:211
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild:
https:/
Max Brustkern (nuclearbob) wrote : | # |
If you've tested the deployment of these, they should be ready to go.
Sergio Cazzolato (sergio-j-cazzolato) wrote : | # |
I tested the deployment and there are no errors now.
Preview Diff
1 | === modified file 'jobs/macros.yaml' |
2 | --- jobs/macros.yaml 2017-02-03 18:18:46 +0000 |
3 | +++ jobs/macros.yaml 2017-02-08 00:13:12 +0000 |
4 | @@ -20,21 +20,29 @@ |
5 | cat media_info |
6 | |
7 | - builder: |
8 | - name: grafana-upload |
9 | + name: grafana-setup |
10 | builders: |
11 | - shell: | |
12 | - if [ -z "$BUILDSTAMP" ] ; then |
13 | - BUILDSTAMP=$(grep -o '([0-9.]\+)' media_info | tr -d '()') |
14 | - fi |
15 | bzr branch lp:custom-grafana-integration $WORKSPACE/grafana-integration |
16 | - export GRAFANA_INTEGRATION_PATH=$WORKSPACE/grafana-integration |
17 | + cat > $WORKSPACE/grafana.conf <<EOF |
18 | export MONGO_HOST=10.25.236.10 |
19 | export MONGO_PORT=27017 |
20 | export CARBON_HOST=10.25.236.71 |
21 | export CARBON_PORT=2003 |
22 | export MSG_CHUNK_SIZE=500 |
23 | export MSG_WAIT=30 |
24 | - ### Add global_info |
25 | + export GRAFANA_INTEGRATION_PATH=$WORKSPACE/grafana-integration |
26 | + EOF |
27 | + |
28 | +- builder: |
29 | + name: grafana-upload |
30 | + builders: |
31 | + - grafana-setup: |
32 | + - shell: | |
33 | + source $WORKSPACE/grafana.conf |
34 | + if [ -z "$BUILDSTAMP" ] ; then |
35 | + BUILDSTAMP=$(grep -o '([0-9.]\+)' media_info | tr -d '()') |
36 | + fi |
37 | cat > global_info.json <<EOF |
38 | {{ |
39 | "device": "{device}", |
40 | @@ -46,7 +54,6 @@ |
41 | "build": "$BUILDSTAMP" |
42 | }} |
43 | EOF |
44 | - ### Run grafana integration and send data to grafana server ### |
45 | $GRAFANA_INTEGRATION_PATH/run_script sync-tests -rt xunit -rf {xunit_file} -if global_info.json -m tests_01 -t $(date +%s) |
46 | |
47 | - publisher: # This publisher archives all job artifacts |
48 | |
49 | === added directory 'jobs/performance' |
50 | === added file 'jobs/performance/jobs.yaml' |
51 | --- jobs/performance/jobs.yaml 1970-01-01 00:00:00 +0000 |
52 | +++ jobs/performance/jobs.yaml 2017-02-08 00:13:12 +0000 |
53 | @@ -0,0 +1,156 @@ |
54 | +# vim: sw=4 ts=4 et |
55 | + |
56 | +# QA Jenkins Jobs |
57 | +# Copyright 2017 Canonical Ltd. |
58 | + |
59 | +# This program is free software: you can redistribute it and/or modify it |
60 | +# under the terms of the GNU General Public License version 3, as published |
61 | +# by the Free Software Foundation. |
62 | + |
63 | +# This program is distributed in the hope that it will be useful, but |
64 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
65 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
66 | +# PURPOSE. See the GNU General Public License for more details. |
67 | + |
68 | +# You should have received a copy of the GNU General Public License along |
69 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
70 | + |
71 | +# The project stanza describes all jobs and parameters |
72 | +- project: |
73 | + name: performance-desktop |
74 | + device: 'desktop' |
75 | + model: |
76 | + - amd-gfx |
77 | + - intel-gfx |
78 | + - nvidia-gfx |
79 | + release: |
80 | + - xenial |
81 | + - zesty |
82 | + arch: 'amd64' |
83 | + unity8-mode: |
84 | + - deb |
85 | + - snap |
86 | + jobs: |
87 | + - 'kpi-tests-{device}-{model}-{release}-{arch}-unity8-{unity8-mode}' |
88 | + |
89 | +- project: |
90 | + name: performance-board |
91 | + device: 'board' |
92 | + model: 'dragonboard' |
93 | + arch: 'arm64' |
94 | + release: 'core_16' |
95 | + unity8-mode: 'snap' |
96 | + jobs: |
97 | + - 'kpi-tests-{device}-{model}-{release}-{arch}-unity8-{unity8-mode}' |
98 | + |
99 | +# builder stanzas describe reusable build steps |
100 | +- builder: |
101 | + name: setup-env |
102 | + builders: |
103 | + - shell: | |
104 | + rm -rf * |
105 | + mkdir $WORKSPACE/results |
106 | + |
107 | +- builder: |
108 | + name: branch-bzr-project |
109 | + builders: |
110 | + - shell: | |
111 | + bzr branch {project-url} {project-name} |
112 | + |
113 | +- builder: |
114 | + name: run-performance-tests |
115 | + builders: |
116 | + - shell: | |
117 | + set -ex |
118 | + BUILDID=$(date +%Y%m%d) |
119 | + cat > job.json <<EOF |
120 | + {{ |
121 | + "job_queue": "$DEVICE_QUEUE", |
122 | + "provision_data": {{ |
123 | + "distro": "{release}" |
124 | + }}, |
125 | + "test_data": {{ |
126 | + "test_cmds": [ |
127 | + "bzr branch $PERFORMANCE_TESTS_BRANCH ubuntu-performance-tests", |
128 | + "mkdir artifacts", |
129 | + "cd ubuntu-performance-tests && KPI_OS_BUILD=$BUILDID KPI_DEVICE_IP={{device_ip}} $ITER_PARAMS $EXEC_PARAMS $ENV_PARAMS ./run_tests desktop", |
130 | + "cp ubuntu-performance-tests/tests/tests.log artifacts" |
131 | + ] |
132 | + }} |
133 | + }} |
134 | + EOF |
135 | + python3 qakit/qakit/testflinger/runner.py -d job.json -o testflinger.log -t 7200 -a artifacts.tgz |
136 | + tar -xzf artifacts.tgz |
137 | + cp artifacts/tests.log $WORKSPACE/results/tests.log |
138 | + |
139 | +- builder: |
140 | + name: sync-grafana |
141 | + builders: |
142 | + - grafana-setup |
143 | + - shell: | |
144 | + set -ex |
145 | + source $WORKSPACE/grafana.conf |
146 | + $GRAFANA_INTEGRATION_PATH/run_script sync-perf -l $WORKSPACE/results/tests.log -m performance_01 -t $(date +%s) |
147 | + |
148 | +- job-template: |
149 | + name: kpi-tests-{device}-{model}-{release}-{arch}-unity8-{unity8-mode} |
150 | + description: | |
151 | + Run performance tests |
152 | + Defined in lp:qa-jenkins-jobs |
153 | + node: 'jenkins-slave-2' |
154 | + triggers: |
155 | + - timed: 'H H * * *' |
156 | + wrappers: |
157 | + - timeout: |
158 | + timeout: 180 |
159 | + fail: true |
160 | + parameters: |
161 | + - string: |
162 | + name: PERFORMANCE_TESTS_BRANCH |
163 | + default: lp:ubuntu-performance-tests |
164 | + description: "Launchpad branch of ubuntu-performance-tests from which to run tests." |
165 | + - string: |
166 | + name: QAKIT_BRANCH |
167 | + default: lp:qakit |
168 | + description: Launchpad branch of qakit project to use testflinger. |
169 | + - string: |
170 | + name: GRAFANA_INTEGRATION_BRANCH |
171 | + default: lp:custom-grafana-integration |
172 | + description: "Launchpad branch of custom-grafana-integration project to process the performnace results." |
173 | + - string: |
174 | + name: RELEASE |
175 | + default: '{release}' |
176 | + description: "The given alternate distro will be used if specified." |
177 | + - string: |
178 | + name: DEVICE_QUEUE |
179 | + default: '{model}' |
180 | + description: "The device where it is going to be executed." |
181 | + - string: |
182 | + name: ITER_PARAMS |
183 | + default: KPI_DEFAULT_RETRIES=1 KPI_APPLAUNCH_RETRIES=0 KPI_WEBBROWSER_RETRIES=0 KPI_DROMAEO_RETRIES=0 |
184 | + description: "Iterations for tests" |
185 | + - string: |
186 | + name: EXECUTION_PARAMETERS |
187 | + default: KPI_SSH_TIMEOUT=600000 KPI_USER=ubuntu |
188 | + description: "Parametes used to execute the tests" |
189 | + - string: |
190 | + name: ENV_PARAMS |
191 | + default: KPI_DEVICE_TYPE={device} KPI_DEVICE_MODEL={model} KPI_OS_RELEASE={release} KPI_OS_ARCH={arch} KPI_UNITY8_MODE={unity8-mode} |
192 | + description: "Environment parameters" |
193 | + builders: |
194 | + - setup-env: |
195 | + - branch-bzr-project: |
196 | + project-url: '$QAKIT_BRANCH' |
197 | + project-name: 'qakit' |
198 | + - branch-bzr-project: |
199 | + project-url: '$PERFORMANCE_TESTS_BRANCH' |
200 | + project-name: 'ubuntu-performance' |
201 | + - run-performance-tests: |
202 | + device: '{device}' |
203 | + model: '{model}' |
204 | + release: '{release}' |
205 | + arch: '{arch}' |
206 | + unity8-mode: '{unity8-mode}' |
207 | + - sync-grafana: |
208 | + publishers: |
209 | + - archive-artifacts |
210 | |
211 | === removed directory 'scripts/performance' |
212 | === removed file 'scripts/performance/run_performance_qakit.sh' |
213 | --- scripts/performance/run_performance_qakit.sh 2016-09-21 22:09:51 +0000 |
214 | +++ scripts/performance/run_performance_qakit.sh 1970-01-01 00:00:00 +0000 |
215 | @@ -1,21 +0,0 @@ |
216 | -#!/bin/bash |
217 | - |
218 | -# QA Jenkins Jobs |
219 | -# Copyright 2016 Canonical Ltd. |
220 | -# |
221 | -# This program is free software: you can redistribute it and/or modify it |
222 | -# under the terms of the GNU General Public License version 3, as published |
223 | -# by the Free Software Foundation. |
224 | -# |
225 | -# This program is distributed in the hope that it will be useful, but |
226 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
227 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
228 | -# PURPOSE. See the GNU General Public License for more details. |
229 | -# |
230 | -# You should have received a copy of the GNU General Public License along |
231 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
232 | - |
233 | -set -ex |
234 | - |
235 | -python3 $QAKIT_PATH/qakit/prodenv/perf/sync_perf.py save $KPI_LOG |
236 | -python3 $QAKIT_PATH/qakit/prodenv/perf/sync_perf.py update -b $BUILD_NUMBER -c $CHANNEL -d $DEVICE |
237 | |
238 | === removed file 'scripts/performance/run_performance_tests.sh' |
239 | --- scripts/performance/run_performance_tests.sh 2016-08-25 19:48:42 +0000 |
240 | +++ scripts/performance/run_performance_tests.sh 1970-01-01 00:00:00 +0000 |
241 | @@ -1,31 +0,0 @@ |
242 | -#!/bin/bash |
243 | - |
244 | -# QA Jenkins Jobs |
245 | -# Copyright 2016 Canonical Ltd. |
246 | -# |
247 | -# This program is free software: you can redistribute it and/or modify it |
248 | -# under the terms of the GNU General Public License version 3, as published |
249 | -# by the Free Software Foundation. |
250 | -# |
251 | -# This program is distributed in the hope that it will be useful, but |
252 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
253 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
254 | -# PURPOSE. See the GNU General Public License for more details. |
255 | -# |
256 | -# You should have received a copy of the GNU General Public License along |
257 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
258 | - |
259 | -set -ex |
260 | - |
261 | -cd $PERFORMANCE_TESTS_PATH |
262 | -export PYTHONPATH=$PERFORMANCE_TESTS_PATH |
263 | - |
264 | -if [ $RUN_TESTS = true ]; then |
265 | - python3 kpi/runner.py -k applaunch -s $ANDROID_SERIAL -i $APPLAUNCH_ITERS -w 15 |
266 | - python3 kpi/runner.py -k reboot -s $ANDROID_SERIAL -i $REBOOT_ITERS |
267 | - python3 kpi/runner.py -k idlecputime -s $ANDROID_SERIAL -i $CPU_ITERS -t 120 |
268 | - python3 kpi/runner.py -k webbrowser -s $ANDROID_SERIAL -i $WEB_BROWSER_ITERS |
269 | - python3 kpi/runner.py -k dashqmlmetrics -s $ANDROID_SERIAL -i $DASH_ITERS -t |
270 | -else |
271 | - python3 kpi/runner.py -k fake -s $ANDROID_SERIAL |
272 | -fi |
PASSED: Continuous integration, rev:205 /platform- qa-jenkins. ubuntu. com/job/ qa-jenkins- jobs-ci/ 76/ /platform- qa-jenkins. ubuntu. com/job/ build-xenial- amd64-package/ 242 /platform- qa-jenkins. ubuntu. com/job/ build-xenial- amd64-package/ 242/artifact/ work/output/ *zip*/output. zip /platform- qa-jenkins. ubuntu. com/job/ build-xenial- i386-package/ 240 /platform- qa-jenkins. ubuntu. com/job/ build-xenial- i386-package/ 240/artifact/ work/output/ *zip*/output. zip /platform- qa-jenkins. ubuntu. com/job/ generic- update- mp/1555/ console
https:/
Executed test runs:
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
None: https:/
Click here to trigger a rebuild: /platform- qa-jenkins. ubuntu. com/job/ qa-jenkins- jobs-ci/ 76/rebuild
https:/