pivpn/ciscripts/test_install.sh
4s3ti 9485852c2c
ci: use correct repo and branch
fix tests to actually test the correct repository and branch
2022-08-25 01:33:09 +02:00

16 lines
656 B
Bash

#!/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