blob: 65bd73d2142afe3cf1cf74a63e2886742dbe8815 (
plain)
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
|
image: debian:sid-slim
shellcheck:
stage: test
script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install shellcheck
- shellcheck debvm-*
codespell:
stage: test
script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install codespell
- codespell debvm-*
simpletest:
stage: test
parallel:
matrix:
- RELEASE: ['stable', 'testing', 'unstable']
script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm sleepenh
- ssh-keygen -f ~/.ssh/id -N ''
- ./debvm-create -k ~/.ssh/id.pub -r $RELEASE
- timeout 120s ./debvm-run -s 2222 &
- |
set -x
timeout=5
ts=$(sleepenh 0 || [ $? -eq 1 ])
for i in $(seq 10); do
rv=0
ssh -o StrictHostKeyChecking=no -o ConnectTimeout="$timeout" -i ~/.ssh/id -p 2222 root@localhost echo success || rev=$?
test $rv -eq 0 && break
ts=$(sleepenh "$ts" "$timeout" || [ $? -eq 1 ]);
if test $i -eq 10; then
echo "timeout reached" >&2
exit 1
fi
done
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/id -p 2222 root@localhost poweroff
|