Merge lp:~canonical-platform-qa/qa-jenkins-jobs/grafana-updates into lp:qa-jenkins-jobs

Proposed by Max Brustkern
Status: Needs review
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/grafana-updates
Merge into: lp:qa-jenkins-jobs
Diff against target: 127 lines (+51/-20)
2 files modified
jobs/iso-testing/jobs.yaml (+41/-10)
jobs/ubiquity/jobs.yaml (+10/-10)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/grafana-updates
Reviewer Review Type Date Requested Status
platform-qa-bot continuous-integration Approve
Canonical Platform QA Jenkins Pending
Review via email: mp+320980@code.launchpad.net

Commit message

Add grafana to iso testing

Description of the change

This branch adds grafana to iso testing.

Unmerged revisions

227. By Max Brustkern

Initial attempt at adding grafana to iso testing

226. By Max Brustkern

Moved grafana file generation to post-build steps

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 2017-03-20 17:24:56 +0000
3+++ jobs/iso-testing/jobs.yaml 2017-03-24 19:02:41 +0000
4@@ -117,8 +117,8 @@
5 }}
6 EOF
7 for file in $UTAH_LOG_FILE $UTAH_DEBUGLOG_FILE $UTAH_SSH_LOG_FILE; do
8- touch $file
9- chmod a+w $file
10+ touch $file
11+ chmod a+w $file
12 done
13
14 sudo -u utah -i UTAH_CONFIG_DIR=$UTAH_CONFIG_DIR $(./scripts/{test}.sh -i /var/cache/utah/iso/{release}-{variant}-{arch}.iso) -f /var/log/installer -x /etc/utah/bridged-network-vm.xml --outputpreseed > $LOG_DIR/utah-server-stdout.log
15@@ -130,13 +130,16 @@
16 # Move yaml file directory to the workspace since it's not a log file, but a
17 # results file
18 [ -n "$(find $LOG_DIR -name '*.yaml')" ] && mv $LOG_DIR/*.yaml $WORKSPACE
19- if [ "$RETCODE" -gt "100" ] ; then # utah client had an error, probably a test failure
20- exit $RETCODE
21- elif [ "$RETCODE" -eq "0" ] ; then
22- echo "<testsuite><testcase classname=\"utah\" name=\"utah\"></testcase></testsuite>" > $WORKSPACE/utah.xml
23- else
24- echo "<testsuite><testcase classname=\"utah\" name=\"utah\"><failure>utah exited with status $RETCODE</failure></testcase></testsuite>" > $WORKSPACE/utah.xml
25- fi
26+ case $(ls *.yaml | wc -l) in
27+ 0) # No yaml file, probably provisioning problem
28+ echo "<testsuite><testcase classname=\"utah\" name=\"utah\"><failure>utah exited with status $RETCODE</failure></testcase></testsuite>" > $WORKSPACE/utah.xml
29+ exit $RETCODE;;
30+ 1) # Normal behavior, write xunit file
31+ yaml2xunit.py *.yaml $WORKSPACE/utah.xml;;
32+ *) # More than one test log currently not supported
33+ echo "<testsuite><testcase classname=\"utah\" name=\"utah\"><failure>More than one test log found</failure></testcase></testsuite>" > $WORKSPACE/utah.xml
34+ exit 200;;
35+ esac
36
37
38 - builder: # This step runs iso static validation
39@@ -199,7 +202,7 @@
40 sudo apt-get install -y --force-yes download-latest-test-iso dl-ubuntu-test-iso utah
41 [ -d /data/iso ] || sudo mkdir /data/iso
42 sudo chown -R jenkins:jenkins /data/iso
43- pip3 install --user junit_xml
44+ pip install --user junit_xml
45
46 # On the staging server, we can add
47 # ppa:canonical-platform-qa-jenkins/canonical-platform-qa-jenkins-staging
48@@ -370,6 +373,20 @@
49 publishers:
50 - archive-artifacts
51 - trigger-mark-pending-current
52+ - postbuildscript:
53+ builders:
54+ - grafana-info:
55+ device: 'vm'
56+ model: ''
57+ os: '{flavor}'
58+ release: '{release}'
59+ arch: '{arch}'
60+ class: 'iso-testing'
61+ conf: ''
62+ - grafana-tests-upload:
63+ results_type: 'xunit'
64+ results_file: 'utah.xml'
65+ info_file: 'global_info.json'
66 - mark-junit
67
68
69@@ -425,6 +442,20 @@
70 test: '{desktop-test}'
71 publishers:
72 - archive-artifacts
73+ - postbuildscript:
74+ builders:
75+ - grafana-info:
76+ device: 'vm'
77+ model: ''
78+ os: '{flavor}'
79+ release: '{release}'
80+ arch: '{arch}'
81+ class: 'ubiquity'
82+ conf: ''
83+ - grafana-tests-upload:
84+ results_type: 'xunit'
85+ results_file: 'utah.xml'
86+ info_file: 'global_info.json'
87 - mark-junit
88
89 - job-template:
90
91=== modified file 'jobs/ubiquity/jobs.yaml'
92--- jobs/ubiquity/jobs.yaml 2017-02-14 16:52:02 +0000
93+++ jobs/ubiquity/jobs.yaml 2017-03-24 19:02:41 +0000
94@@ -118,16 +118,6 @@
95 arch: '{arch}'
96 test: '{test}'
97 ubiquity_branch: '{ubiquity_branch}'
98- - generate-junit-files:
99- source_dir: 'results/var/local/autopilot/junit'
100- - grafana-info:
101- device: 'vm'
102- model: ''
103- os: '{flavor}'
104- release: '{release}'
105- arch: '{arch}'
106- class: 'ubiquity'
107- conf: ''
108
109 publishers:
110 - archive-artifacts
111@@ -135,6 +125,16 @@
112 results: 'results/var/local/autopilot/junit/*.xml'
113 - postbuildscript:
114 builders:
115+ - generate-junit-files:
116+ source_dir: 'results/var/local/autopilot/junit'
117+ - grafana-info:
118+ device: 'vm'
119+ model: ''
120+ os: '{flavor}'
121+ release: '{release}'
122+ arch: '{arch}'
123+ class: 'ubiquity'
124+ conf: ''
125 - grafana-tests-upload:
126 results_type: 'xunit'
127 results_file: 'results/var/local/autopilot/junit/*.xml'

Subscribers

People subscribed via source and target branches