dashboard/integration/ci.sh

38 lines
514 B
Bash
Executable File

#!/bin/bash
set -Exeuo pipefail
source integration/lib.sh
init() {
if is_ci
then
cp dashboard/local_settings.ci.py dashboard/local_settings.py
else
docker_compose_down || true
docker_compose_up
sed -i /localhost.*/d ~/.ssh/known_hosts
setup_env
sleep 5
# wait_for_env
fi
forgejo_root
support_repo_init
fleet_repo_init
}
teardown() {
if ! is_ci
then
docker_compose_down
teardown_env
sed -i /localhost.*/d ~/.ssh/known_hosts
fi
}
new_fleet_repo() {
new_fleet_repo_init $2
}
$1 $@