-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
32 lines (29 loc) · 1.57 KB
/
tox.ini
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
[tox]
skipsdist = True
envlist = bashate,build-and-test
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
passenv = http_proxy https_proxy HTTP_PROXY HTTPS_PROXY SNAPCRAFT_PROVIDER
install_command =
pip install {opts} {packages}
deps =
-r{toxinidir}/test-requirements.txt
[testenv:bashate]
allowlist_externals = /bin/sh
commands = sh -c "ls -1 src/retrofit/*.sh src/elements/*/*.d/* | xargs bashate"
[testenv:build-and-test]
# Note that this is done to validate the ``snapcraft.yaml`` and build only.
# actual building and publishing is handled on commit by https://build.snapcraft.io.
allowlist_externals = /usr/bin/echo /snap/bin/snapcraft /usr/bin/sudo
commands =
snapcraft snap --provider={env:SNAPCRAFT_PROVIDER:lxd} -o built.snap
sudo snap install --dangerous --devmode built.snap
sudo snap connect octavia-diskimage-retrofit:fuse-support
sudo snap connect octavia-diskimage-retrofit:kvm
sudo wget -O /var/snap/octavia-diskimage-retrofit/common/tmp/bionic.img https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
sudo wget -O /var/snap/octavia-diskimage-retrofit/common/tmp/focal.img https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img
echo "Retrofitting bionic image"
sudo sh -c "cd /var/snap/octavia-diskimage-retrofit/common/tmp && octavia-diskimage-retrofit bionic.img bionic-amphora.qcow2"
echo "Retrofitting focal image"
sudo sh -c "cd /var/snap/octavia-diskimage-retrofit/common/tmp && octavia-diskimage-retrofit focal.img focal-amphora.qcow2"