2021-01-26 15:34:06 +00:00
|
|
|
language: shell
|
|
|
|
|
|
|
|
addons:
|
|
|
|
hosts:
|
|
|
|
- pivpn.test
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- lint
|
2022-08-05 06:43:45 +00:00
|
|
|
- style
|
2021-01-26 15:34:06 +00:00
|
|
|
- test
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- test
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: lint
|
|
|
|
name: "Shellcheck lint"
|
2022-03-09 19:13:11 +00:00
|
|
|
dist: focal
|
2022-08-05 06:43:45 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- shellcheck
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
script:
|
2022-08-05 06:43:45 +00:00
|
|
|
- shellcheck -x auto_install/install.sh
|
2022-08-06 03:35:30 +00:00
|
|
|
- find ciscripts/ -type f -regex '.*\.sh' -exec shellcheck -x {} \;
|
2022-08-05 20:39:33 +00:00
|
|
|
- find scripts/ -type f -exec shellcheck -x {} \;
|
2022-08-05 06:43:45 +00:00
|
|
|
|
|
|
|
- stage: style
|
|
|
|
name: "Shell Style Guide"
|
|
|
|
dist: xenial
|
|
|
|
addons:
|
|
|
|
snaps:
|
|
|
|
- shfmt
|
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
|
|
|
script:
|
2022-08-06 03:15:28 +00:00
|
|
|
- shfmt -d -i 2 -ci -sr -bn auto_install/install.sh
|
2022-08-06 03:35:30 +00:00
|
|
|
- find ciscripts/ -type f -regex '.*\.sh' -exec shfmt -d -i 2 -ci -sr -bn {} \;
|
2022-08-06 03:15:28 +00:00
|
|
|
- find scripts/ -type f -exec shfmt -d -i 2 -ci -sr -bn {} \;
|
2021-01-26 15:34:06 +00:00
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "OpenVPN Xenial & Commands"
|
|
|
|
dist: xenial
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -o
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
2021-02-06 21:46:08 +00:00
|
|
|
after_script:
|
2021-01-26 15:34:06 +00:00
|
|
|
- systemctl status openvpn
|
|
|
|
- pivpn add -n foo nopass -d 180
|
|
|
|
- pivpn add -p "$RANDOM$RANDOM" -n bar -d 180
|
|
|
|
- pivpn add -o -n foo
|
|
|
|
- pivpn -bk
|
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
2021-01-28 00:33:03 +00:00
|
|
|
- pivpn -r foo -y
|
2021-01-26 15:34:06 +00:00
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "Wireguard Xenial & Commands"
|
|
|
|
dist: xenial
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -w
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
2021-02-06 21:46:08 +00:00
|
|
|
after_script:
|
|
|
|
- systemctl status wg-quick@wg0
|
2021-01-26 15:34:06 +00:00
|
|
|
- pivpn add -n foo
|
|
|
|
- pivpn -qr foo
|
|
|
|
- pivpn -bk
|
2021-01-28 00:33:03 +00:00
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
2021-01-26 15:34:06 +00:00
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
|
|
|
- pivpn -r foo -y
|
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "OpenVPN Bionic & Commands"
|
|
|
|
dist: bionic
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -o
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
|
|
|
- systemctl status openvpn
|
|
|
|
- pivpn add -n foo nopass -d 180
|
|
|
|
- pivpn add -p "$RANDOM$RANDOM" -n bar -d 180
|
|
|
|
- pivpn add -o -n foo
|
|
|
|
- pivpn -bk
|
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
2021-01-28 00:33:03 +00:00
|
|
|
- pivpn -r foo -y
|
2021-01-26 15:34:06 +00:00
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "Wireguard Bionic & Commands"
|
|
|
|
dist: bionic
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo apt update -y
|
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -w
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
|
|
|
- systemctl status wg-quick@wg0
|
|
|
|
- pivpn add -n foo
|
|
|
|
- pivpn -qr foo
|
|
|
|
- pivpn -bk
|
2021-01-28 00:33:03 +00:00
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
2021-01-26 15:34:06 +00:00
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
|
|
|
- pivpn -r foo -y
|
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "OpenVPN Focal & Commands"
|
|
|
|
dist: focal
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -o
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
|
|
|
- systemctl status openvpn
|
|
|
|
- pivpn add -n foo nopass -d 180
|
|
|
|
- pivpn add -p "$RANDOM$RANDOM" -n bar -d 180
|
|
|
|
- pivpn add -o -n foo
|
|
|
|
- pivpn -bk
|
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
2021-01-28 00:33:03 +00:00
|
|
|
- pivpn -r foo -y
|
2021-01-26 15:34:06 +00:00
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|
|
|
|
|
|
|
|
- stage: test
|
|
|
|
name: "Wireguard Focal & Commands"
|
|
|
|
dist: focal
|
2022-03-09 19:13:11 +00:00
|
|
|
virt: vm
|
|
|
|
arch: amd64
|
2021-01-26 15:34:06 +00:00
|
|
|
before_script:
|
|
|
|
- cat /etc/os-release
|
|
|
|
- uname -a
|
2022-03-09 19:13:11 +00:00
|
|
|
- ip a
|
2021-01-26 15:34:06 +00:00
|
|
|
- sudo chmod +x ciscripts/startup.sh
|
|
|
|
- ./ciscripts/startup.sh -w
|
|
|
|
script:
|
|
|
|
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
|
|
|
- systemctl status wg-quick@wg0
|
|
|
|
- pivpn add -n foo
|
|
|
|
- pivpn -qr foo
|
|
|
|
- pivpn -bk
|
2021-01-28 00:33:03 +00:00
|
|
|
- ls ~pi/pivpnbackup/ | grep backup
|
2021-01-26 15:34:06 +00:00
|
|
|
- pivpn -l
|
|
|
|
- pivpn -c
|
|
|
|
- pivpn -r foo -y
|
|
|
|
after_fail:
|
|
|
|
- sudo journalctl -xe
|