Files
dokku/.github/commands/ci-setup
Jose Diaz-Gonzalez 5846301a48 tests: make it possible to specify an alternative base domain for tests
When developing Dokku, it is useful to use a real domain to test actual functionality. This is impossible if the domain is hardcoded to dokku.me in testing.
2023-08-05 20:58:26 -04:00

34 lines
845 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
set -x
DOKKU_DOMAIN=${DOKKU_DOMAIN:="dokku.me"}
echo "=====> set hostname"
hostname
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
sudo hostname "$DOKKU_DOMAIN"
echo "$DOKKU_DOMAIN" | sudo tee /etc/hostname
hostname
sudo cat /etc/hostname
echo "=====> resolve $DOKKU_DOMAIN"
sudo apt -qq -y --no-install-recommends install net-tools
if [[ "$DOKKU_DOMAIN" == "dokku.me" ]]; then
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
ifconfig
sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
fi
echo "=====> install ci-dependencies"
make ci-dependencies
echo "=====> setup tests"
./tests/ci/setup.sh
echo "=====> dokku cleanup:skip"
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
echo "=====> dokku report"
dokku report