forked from canonical/spread-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspread.yaml
More file actions
104 lines (91 loc) · 3.21 KB
/
spread.yaml
File metadata and controls
104 lines (91 loc) · 3.21 KB
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
# This spread setup is used to test spread with spread itself. For that, the
# spread interpreting this file is assumed to be working based on prior
# testing, while the spread code being shipped to the remote server is being
# verified for correctness. See the tests to have an idea of how that's done.
# Keep in mind that the logic in task.yaml is supposed to test the *built*
# spread, not the one running the task.yaml logic.
project: spread
environment:
GOCHANNEL: 1.24/stable
GOHOME: /home/test
GOPATH: $GOHOME
PATH: $GOHOME/bin:$PATH
CACHE_DISABLED: $(HOST:[ "$SEND_CACHE" = 1 ] && echo false || echo tests/cache)
backends:
google:
key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
location: snapd-spread/us-east1-b
halt-timeout: 2h
systems:
- ubuntu-22.04-64:
image: ubuntu-2204-64-virt-enabled
workers: 1
openstack:
key: '$(HOST: echo "$OS_CREDENTIALS_AMD64_PS7")'
plan: shared.small
halt-timeout: 2h
wait-timeout: 10m
groups: [default]
proxy: ingress-haproxy.ps7.canonical.com
cidr-port-rel: [10.151.96.0/21:5000]
volume-auto-delete: true
environment:
HTTP_PROXY: 'http://egress.ps7.internal:3128'
HTTPS_PROXY: 'http://egress.ps7.internal:3128'
http_proxy: 'http://egress.ps7.internal:3128'
https_proxy: 'http://egress.ps7.internal:3128'
no_proxy: '127.0.0.1,127.0.0.53,localhost'
NO_PROXY: '127.0.0.1,127.0.0.53,localhost'
NTP_SERVER: 'ntp.ps7.internal'
systems:
- ubuntu-22.04-64:
image: snapd-spread/ubuntu-22.04-64
exclude:
- .spread-reuse.yaml
- tests/.spread-reuse.yaml
- $CACHE_DISABLED
path: /home/test/src/github.com/snapcore/spread
kill-timeout: 10m
warn-timeout: 2m
suites:
tests/:
summary: Integration tests
prepare: |
DEBS="jq git qemu-kvm tree"
if ! dpkg -l $DEBS; then
apt update
apt install -y $DEBS
fi
if [ -n "${http_proxy:-}" ]; then
snap set system proxy.http="$http_proxy"
fi
if [ -n "${https_proxy:-}" ]; then
snap set system proxy.https="$https_proxy"
fi
snap install lxd
lxd waitready
if [ -n "${http_proxy:-}" ]; then
lxd.lxc config set core.proxy_http "$http_proxy"
lxd.lxc profile set default environment.http_proxy "$http_proxy"
fi
if [ -n "${https_proxy:-}" ]; then
lxd.lxc config set core.proxy_https "$https_proxy"
lxd.lxc profile set default environment.https_proxy "$https_proxy"
fi
if [ -n "${no_proxy:-}" ]; then
lxd.lxc profile set default environment.no_proxy "$no_proxy"
fi
lxd init --auto
# Either use pregenerated spread if exists or build it
mkdir -p "$GOHOME/bin"
if [ -x ./bin/spread ]; then
mv -f ./bin/spread "$GOHOME/bin/spread"
else
# Cache Go deb with: cd tests/cache && godeb download $GOVERSION
if ! snap list go; then
snap install go --classic --channel "$GOCHANNEL"
fi
/snap/bin/go build -o spread-plus cmd/spread/main.go
mv -f ./spread-plus "$GOHOME/bin/spread"
fi
# vim:ts=4:sw=4:et