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

Proposed by Max Brustkern
Status: Merged
Approved by: Sergio Cazzolato
Approved revision: 186
Merged at revision: 173
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/footprint-job
Merge into: lp:qa-jenkins-jobs
Diff against target: 109 lines (+64/-11)
1 file modified
jobs/iso-testing/jobs.yaml (+64/-11)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/footprint-job
Reviewer Review Type Date Requested Status
Sergio Cazzolato Approve
platform-qa-bot continuous-integration Approve
Review via email: mp+305146@code.launchpad.net

Commit message

Add iso footprint job

Description of the change

Add iso footprint job

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
186. By Max Brustkern

Further tweaks

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

code lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jobs/iso-testing/jobs.yaml'
2--- jobs/iso-testing/jobs.yaml 2016-06-22 02:07:18 +0000
3+++ jobs/iso-testing/jobs.yaml 2016-09-09 17:29:18 +0000
4@@ -17,27 +17,30 @@
5
6 # The project stanza describes all jobs and parameters
7 - project:
8- name: iso-testing-setup
9+ name: 'iso-testing-setup'
10 node: 'iso-testing'
11 jobs:
12 - 'iso-testing-setup'
13
14 - project:
15- name: iso-testing
16+ name: 'iso-testing'
17 flavor: # Additional flavors can be added here
18- - ubuntu
19+ - 'ubuntu'
20 release: # Additional releases can be added here
21- - trusty
22- - xenial
23- - yakkety
24+ - 'trusty'
25+ - 'xenial'
26+ - 'yakkety'
27 dev-release: # Current development release has different download path
28- - yakkety
29+ - 'yakkety'
30 lts-release: # All lts releases which should be tested go here
31- - trusty
32- - xenial
33+ - 'trusty'
34+ - 'xenial'
35 arch: # Mostly likely different jobs would be needed for other arches
36- - amd64
37- - i386
38+ - 'amd64'
39+ - 'i386'
40+ variant: # desktop or server
41+ - 'desktop'
42+ - 'server'
43 desktop-test: # Currently this is all non-default desktop test cases
44 - 'default_btrfs'
45 - 'default_de'
46@@ -75,6 +78,7 @@
47 - 'ubuntu-{release}-server-{arch}-smoke-default'
48 - '{flavor}-{release}-desktop-{arch}-smoke-{desktop-test}'
49 - 'ubuntu-{release}-server-{arch}-smoke-{server-test}'
50+ - '{flavor}-{release}-{variant}-{arch}-iso-disk-footprint'
51 - 'mark-pending-current'
52
53 # builder stanzas describe reusable build steps
54@@ -443,6 +447,55 @@
55 - archive-artifacts
56 - mark-junit
57
58+- job-template:
59+ # TODO: setup job with /data/footprint and install p7zip-fill
60+ # TODO: look into exit statuses of footprint scripts in qakit
61+ name: '{flavor}-{release}-{variant}-{arch}-iso-disk-footprint'
62+ description: |
63+ Check the footprint of daily images
64+ Defined in lp:qa-jenkins-jobs
65+
66+ node: 'iso-testing'
67+ triggers:
68+ - reverse:
69+ jobs: '{flavor}-{release}-{variant}-{arch}-iso-download'
70+ result: 'success'
71+ builders:
72+ - shell: |
73+ echo "Creating results dir"
74+ export OUTPUTDIR=$WORKSPACE/results
75+ rm -rf $OUTPUTDIR
76+ mkdir -p $OUTPUTDIR
77+ export DATADIR=/data/footprint/{flavor}-{release}-{variant}-{arch}
78+ mkdir -p $DATADIR
79+
80+ echo "Downloading QAKIT"
81+ rm -rf qakit
82+ bzr branch lp:qakit qakit
83+ export PYTHONPATH=qakit
84+
85+ echo "Setting up grafana"
86+ export CARBON_SERVER=10.25.236.71
87+ export CARBON_PORT=2003
88+
89+ echo "Getting build id"
90+ ISO="/data/iso/{flavor}/{release}-{variant}-{arch}.iso"
91+ BUILD_ID=$(bsdtar -x -f $ISO -O \./.disk/info | sed 's/[^(]*(\([0-9.]*\))/\1/')
92+
93+ echo "Find previous results"
94+ PREVIOUS=$(ls $DATADIR | grep -v $BUILD_ID | tail -1)
95+ if [ -n "$PREVIOUS" ] ; then
96+ PREVARGS="-P $DATADIR/$PREVIOUS"
97+ else
98+ echo "Warning: no previous data found">&2
99+ fi
100+
101+ echo "Running iso footprint"
102+ ./qakit/disk_footprint/iso_footprint.sh -d /data/iso/{flavor}/{release}-{variant}-{arch}.iso -D $OUTPUTDIR $PREVARGS
103+
104+ echo "Moving old data"
105+ mv $OUTPUTDIR/* $DATADIR/
106+
107 - job:
108 name: 'mark-pending-current'
109 description: |

Subscribers

People subscribed via source and target branches