1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
# vim: sw=4 ts=4 et
# QA Jenkins Jobs
# Copyright 2017 Canonical Ltd.
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
- project:
name: snapcore-qa-tests-setup
node: iso-testing
jobs:
- snapcore-qa-tests-setup
- project:
# Requires: Post Build Script plugin.
name: snapcore-qa-tests
model:
- pc-amd64
- pc-i386
jobs:
- snapcore-candidate-{model}-spread
- snapcore-candidate-upgrade-{model}-spread
- builder:
name: snap-vm
builders:
- shell: |
export CHANNEL={channel}
if [ -f ~/.proxy_info ] ; then
. ~/.proxy_info
fi
cd snapcore-qa-tests/autospread
export USER="{user}"
IMAGE="{image}"
if [ -z "$IMAGE" ] ; then
sudo ./create-image.sh -k ~/.ssh/id_rsa.pub -c {channel} -m {model}
IMAGE=ubuntu-core-16-{model}.img
fi
# Get the latest version of spread
export GOPATH=$WORKSPACE/go
go get -u github.com/snapcore/spread/cmd/spread
export PATH=$GOPATH/bin:$PATH
./spread-vm.sh $IMAGE {upgrade}
- job-template:
name: snapcore-candidate-{model}-spread
description: |
This job runs the spread tests on an image built from candidate snaps for the {model} model
Defined in lp:qa-jenkins-jobs
node: iso-testing
triggers:
- daily:
builders:
- clear-artifacts:
- branch-bzr-project:
project-url: 'lp:snapcore-qa-tests'
project-name: 'snapcore-qa-tests'
- snap-vm:
user: 'qa'
image: ''
channel: 'candidate'
model: '{model}'
upgrade: ''
publishers:
- archive:
artifacts: 'spread-output'
allow-empty: 'true'
- job-template:
name: snapcore-candidate-upgrade-{model}-spread
description: |
This job runs the spread tests on released ubuntu core 16 image upgrade to current candidate for the {model} model
Defined in lp:qa-jenkins-jobs
node: iso-testing
triggers:
- daily:
builders:
- clear-artifacts:
- branch-bzr-project:
project-url: 'lp:snapcore-qa-tests'
project-name: 'snapcore-qa-tests'
- snap-vm:
user: 'nuclearbob'
image: '/var/cache/auto-upgrade-testing/ubuntu-core-16-{model}.img'
channel: 'candidate'
model: ''
upgrade: '-upgrade'
publishers:
- archive:
artifacts: 'spread-output'
allow-empty: 'true'
- job:
name: 'snapcore-qa-tests-setup'
description: |
This job ensures we have everything needed to run snapcore-qa-tests
It can be run again to update to the latest versions of dependencies
Defined in lp:qa-jenkins-jobs
node: iso-testing
builders:
- clear-artifacts:
- branch-bzr-project:
project-url: 'lp:snapcore-qa-tests'
project-name: 'snapcore-qa-tests'
- shell: |
cd snapcore-qa-tests/autospread
./setup.sh
- job:
name: snapcore-autopkgtest-createvm
description: |
Create Ubuntu cloud image based VM for autopkgtest-virt-qemu to use with snapd tests
triggers:
- daily:
project-type: matrix
axes:
- axis:
type: slave
name: nodes
values:
- venonat-upgrade
- axis:
type: user-defined
name: RELEASE
values:
- trusty
- xenial
- yakkety
- zesty
- axis:
type: user-defined
name: ARCH
values:
- amd64
- i386
builders:
- clear-artifacts:
- shell: |
IMGDIR="$HOME/autopkgtest_images/"
mkdir -p "$IMGDIR"
autopkgtest-buildvm-ubuntu-cloud -r $RELEASE -a $ARCH -v -o $IMGDIR
|