mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-22 04:40:16 +00:00
ci: use correct repo and branch
fix tests to actually test the correct repository and branch
This commit is contained in:
parent
e5b9486c52
commit
9485852c2c
2 changed files with 37 additions and 9 deletions
24
.travis.yml
24
.travis.yml
|
@ -52,12 +52,14 @@ jobs:
|
|||
dist: bionic
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=openvpn
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -o
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -o
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
@ -67,12 +69,14 @@ jobs:
|
|||
dist: bionic
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=wireguard
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -w
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -w
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
@ -82,12 +86,14 @@ jobs:
|
|||
dist: focal
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=openvpn
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -o
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -o
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
@ -97,12 +103,14 @@ jobs:
|
|||
dist: focal
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=wireguard
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -w
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -w
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
@ -112,12 +120,14 @@ jobs:
|
|||
dist: jammy
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=openvpn
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -o
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_openvpn.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -o
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
@ -127,12 +137,14 @@ jobs:
|
|||
dist: jammy
|
||||
virt: vm
|
||||
arch: amd64
|
||||
env:
|
||||
- VPNPROTO=wireguard
|
||||
before_script:
|
||||
- sudo chmod +x ciscripts/*.sh
|
||||
- ./ciscripts/pre_checks.sh
|
||||
- ./ciscripts/startup.sh -w
|
||||
script:
|
||||
- sudo ./auto_install/install.sh --unattended ciscripts/ci_wireguard.conf
|
||||
- ./ciscripts/test_install.sh
|
||||
- ./ciscripts/test.sh -w
|
||||
after_fail:
|
||||
- sudo journalctl -xe
|
||||
|
|
16
ciscripts/test_install.sh
Normal file
16
ciscripts/test_install.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]]; then
|
||||
echo "Pull Request, testing branch $TRAVIS_PULL_REQUEST_BRANCH on $TRAVIS_PULLREQUEST_SLUG"
|
||||
sudo ./auto_install/install.sh --giturl https://github.com/"${TRAVIS_PULL_REQUEST_SLUG}" \
|
||||
--gitbranch "${TRAVIS_PULL_REQUEST_BRANCH}" \
|
||||
--unattended ciscripts/ci_"${VPNPROTO}".conf
|
||||
else
|
||||
if [[ "$TRAVIS_BRANCH" == "test" ]]; then
|
||||
echo "Testing PiVPN Test branch"
|
||||
sudo TESTING= ./auto_install/install.sh --unattended ciscripts/ci_"${VPNPROTO}".conf
|
||||
else
|
||||
echo "Testing PiVPN Master branch"
|
||||
sudo ./autoinstall.sh --unattended ciscripts/ci_"${VPNPROTO}".conf
|
||||
fi
|
||||
fi
|
Loading…
Reference in a new issue