Merge lp:~canonical-platform-qa/qa-jenkins-jobs/add-vis-job into lp:qa-jenkins-jobs

Proposed by Allan LeSage
Status: Merged
Approved by: Max Brustkern
Approved revision: 56
Merged at revision: 158
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/add-vis-job
Merge into: lp:qa-jenkins-jobs
Diff against target: 78 lines (+68/-0)
2 files modified
jobs/vis/jobs.yaml (+36/-0)
jobs/vis/vis.sh (+32/-0)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/add-vis-job
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
platform-qa-bot continuous-integration Approve
Review via email: mp+297236@code.launchpad.net

Commit message

Add a basic 'vis' job which stores Jenkins build/test info from qakit in a mongo instance, generates HTML graphics and rsyncs to cranberry.

Description of the change

Add a basic 'vis' job which stores Jenkins build/test info from qakit in a mongo instance, generates HTML graphics and rsyncs to cranberry.

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

I think right now, auto updates would overwrite the default rsync password. Can we setup an ssh key or store a credentials file on the jenkins slave and source that as part of the job? Other than that, looks good to me.

review: Needs Information
Revision history for this message
Allan LeSage (allanlesage) wrote :

Explain more about "auto updates would overwrite the default rsync password." I'd prefer not to set up a key.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

I think every time the jobs get deployed, they'll deploy this:
       - string:
           name: RSYNC_PASSWORD
           default:
description: The rsync password used to send vis data to cranberry via role account
and set the default value for RSYNC_PASSWORD to be blank again.

Revision history for this message
Allan LeSage (allanlesage) wrote :

Ok, the rsync password enables rsync to a "role account" on cranberry, can you explain or do you know how a key would help in this case?

Revision history for this message
Max Brustkern (nuclearbob) wrote :

We should still be able to use a password if you want, we'll just want a file with something like:
export RSYNC_PASSWORD=whatever
and then in the job:
. /path/to/that/file

A passwordless key is theoretically marginally more secure than that since it involves more encryption, but for something that's always on the internal network, it shouldn't make much difference.

Revision history for this message
Allan LeSage (allanlesage) wrote :

Path to which file?

Revision history for this message
Max Brustkern (nuclearbob) wrote :

The file that contains the password.

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
53. By Allan LeSage

Merge trunk.

54. By Allan LeSage

Updates.

Revision history for this message
Allan LeSage (allanlesage) wrote :

Moved to a password-file as suggested, also updated for new datatables-based vis.

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

A few diff questions, but I think this looks pretty much good.

55. By Allan LeSage

Merge trunk.

56. By Allan LeSage

Max' suggestions.

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Max Brustkern (nuclearbob) wrote :

Ship it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'jobs/vis'
2=== added file 'jobs/vis/jobs.yaml'
3--- jobs/vis/jobs.yaml 1970-01-01 00:00:00 +0000
4+++ jobs/vis/jobs.yaml 2016-07-11 17:50:59 +0000
5@@ -0,0 +1,36 @@
6+# vim: sw=4 ts=4 et
7+
8+# QA Jenkins Jobs
9+# Copyright 2016 Canonical Ltd.
10+
11+# This program is free software: you can redistribute it and/or modify it
12+# under the terms of the GNU General Public License version 3, as published
13+# by the Free Software Foundation.
14+
15+# This program is distributed in the hope that it will be useful, but
16+# WITHOUT ANY WARRANTY; without even the implied warranties of
17+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18+# PURPOSE. See the GNU General Public License for more details.
19+
20+# You should have received a copy of the GNU General Public License along
21+# with this program. If not, see <http://www.gnu.org/licenses/>.
22+
23+- project:
24+ name: vis
25+ jobs:
26+ - 'vis'
27+
28+- job:
29+ name: 'vis'
30+ description: |
31+ Retrieve Jenkins build data, generate HTML representation of test status.
32+ parameters:
33+ - string:
34+ name: QAKIT_BRANCH
35+ default: lp:qakit
36+ description: Launchpad branch from which to run qakit scripts.
37+ builders:
38+ - shell:
39+ !include-raw: 'vis.sh'
40+ triggers:
41+ - timed: "@hourly"
42
43=== added file 'jobs/vis/vis.sh'
44--- jobs/vis/vis.sh 1970-01-01 00:00:00 +0000
45+++ jobs/vis/vis.sh 2016-07-11 17:50:59 +0000
46@@ -0,0 +1,32 @@
47+
48+export https_proxy="https://squid.internal:3128/"
49+
50+virtualenv --python=python3 ve3
51+. ve3/bin/activate
52+pip3 install jenkinsapi
53+pip3 install bson
54+pip3 install pymongo
55+
56+rm -rf qakit
57+bzr branch $QAKIT_BRANCH qakit
58+cd qakit
59+
60+python3 qakit/vis/retrieve_jenkins_results.py -v --mongo-host $MONGO_HOST --jenkins-url https://platform-qa-jenkins.ubuntu.com/ -p ust_
61+
62+mkdir -p ${WORKSPACE}/results
63+rm -rf ${WORKSPACE}/results/*
64+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc-proposed_krillin_sanity.html ust_rc-proposed_krillin_sanity
65+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc-proposed_krillin_regression.html ust_rc-proposed_krillin_regression
66+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc-proposed_arale_sanity.html ust_rc-proposed_arale_sanity
67+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc-proposed_arale_regression.html ust_rc-proposed_arale_regression
68+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc_krillin_sanity.html ust_rc_krillin_sanity
69+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc_krillin_regression.html ust_rc_krillin_regression
70+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc_arale_sanity.html ust_rc_arale_sanity
71+python3 qakit/vis/visualize.py --mongo-host $MONGO_HOST -o ${WORKSPACE}/results/ust_rc_arale_regression.html ust_rc_arale_regression
72+
73+deactivate
74+
75+rsync -avz --delete --password-file $JENKINS_HOME/.secret/cranberry-rsync-password --ignore-times $WORKSPACE/results/* jenkaas-qa-sync@cranberry.canonical.com::jenkaas-qa-reports/vis
76+
77+# also do a deployment
78+rsync -avz --delete --password-file $JENKINS_HOME/.secret/cranberry-rsync-password --ignore-times $WORKSPACE/qakit/vis/*.html jenkaas-qa-sync@cranberry.canonical.com::jenkaas-qa-reports/vis

Subscribers

People subscribed via source and target branches