feat(ossupport): Jammy Support & CI Updates

Add support for Ubuntu Jammy (22.04)
Add CI tests for Ubuntu Jammy
Remove CI tests for Ubuntu Xenial
Rename CI tests stages
Add new CI Scripts to get pipeline code more "DRY"
Update CI Scripts to exit on error with /bin/bash -e
Add semantic-release settings
Add CI Release step for PiVPN automated versioning
This commit is contained in:
4s3ti 2022-08-17 21:47:50 +02:00
parent f59c693ba6
commit 5d0cc9e072
6 changed files with 152 additions and 123 deletions

5
ciscripts/pre_checks.sh Normal file
View file

@ -0,0 +1,5 @@
#/bin/bash -e
cat /etc/os-release
uname -a
ip a

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
interface=$(ip -o link \
| awk '{print $2}' \

View file

@ -1,14 +1,53 @@
#!/bin/bash
#!/bin/bash -e
if command -v systemctl > /dev/null; then
systemctl status openvpn
elif command -v rc-service > /dev/null; then
rc-service openvpn status
fi
# Tests multiple pivpn commands
pivpn add -n foo
pivpn -qr foo
pivpn -bk
pivpn -l
pivpn -c
pivpn -r foo -y
testopenvpn() {
if command -v systemctl > /dev/null; then
systemctl status openvpn
elif command -v rc-service > /dev/null; then
rc-service openvpn status
fi
pivpn add -n foo nopass -d 180
pivpn add -p "$RANDOM$RANDOM" -n bar -d 180
pivpn add -o -n foo
pivpn -bk
sudo ls ~pi/pivpnbackup/ | grep backup
pivpn -l
pivpn -c
pivpn -r foo -y
exit 0
}
testwireguard() {
if command -v systemctl > /dev/null; then
systemctl status wg-quick@wg0
elif command -v rc-service > /dev/null; then
rc-service wg-quick status
fi
pivpn add -n foo
pivpn -qr foo
pivpn -bk
sudo ls ~pi/pivpnbackup/ | grep backup
pivpn -l
pivpn -c
pivpn -r foo -y
exit 0
}
while true; do
case "${1}" in
-o | --openvpn)
testopenvpn
;;
-w | --wireguard)
testwireguard
;;
*)
err "unknown VPN protocol"
exit 1
;;
esac
done