2023-09-17 01:59:08 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
2023-09-18 20:44:19 +05:30
|
|
|
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2023-09-17 01:59:08 +05:30
|
|
|
set -Exeuo pipefail
|
|
|
|
|
|
|
|
source integration/lib.sh
|
|
|
|
|
|
|
|
init() {
|
|
|
|
# if is_ci
|
|
|
|
# then
|
|
|
|
# echo "[*] CI environment detected"
|
|
|
|
# else
|
|
|
|
docker_compose_up
|
|
|
|
setup_env
|
|
|
|
sleep 5
|
|
|
|
# wait_for_env
|
|
|
|
# fi
|
|
|
|
forgejo_root
|
|
|
|
init_users_repo
|
|
|
|
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 $@
|