aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2024-10-01 12:01:40 +0200
committerEgor Tensin <egor@tensin.name>2024-10-01 12:01:43 +0200
commit56fe88d1764cd2e463c21a85e322ce423ad93654 (patch)
tree97a914986b5f8b3e18dd622075b9d657694fb0a3
parentrequirements.txt: bump dependencies (diff)
downloadcgitize-master.tar.gz
cgitize-master.zip
t/i/docker: fix GitHub CI runsHEADv5.1.2master
The newest Ubuntu ditched docker-compose completely in favour of `docker compose`.
Diffstat (limited to '')
-rwxr-xr-xtest/integration/docker/test.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh
index d5a7c79..15ffb3e 100755
--- a/test/integration/docker/test.sh
+++ b/test/integration/docker/test.sh
@@ -17,6 +17,12 @@ readonly client_key_password='password'
readonly output_dir="$script_dir/cgitize/output"
readonly frontend_host=localhost
+if command -v docker-compose > /dev/null 2>&1; then
+ readonly docker_compose=docker-compose
+else
+ readonly docker_compose='docker compose'
+fi
+
dump() {
local prefix="${FUNCNAME[0]}"
[ "${#FUNCNAME[@]}" -gt 1 ] && prefix="${FUNCNAME[1]}"
@@ -159,12 +165,12 @@ docker_build() {
echo Building Docker images
echo ----------------------------------------------------------------------
- docker-compose build --progress plain
+ $docker_compose build --progress plain
}
docker_cleanup() {
dump 'cleaning up Docker data'
- docker-compose down --rmi all --volumes
+ $docker_compose down --rmi all --volumes
# Use `docker system prune` as well?
}
@@ -180,7 +186,7 @@ run_git_server() {
echo Running the Git server
echo ----------------------------------------------------------------------
- docker-compose up -d git_server
+ $docker_compose up -d git_server
}
run_cgitize() {
@@ -194,7 +200,7 @@ run_cgitize() {
return 1
fi
dump "SSH_AUTH_SOCK: $SSH_AUTH_SOCK"
- docker-compose run --rm cgitize
+ $docker_compose run --rm cgitize
}
run_frontend() {
@@ -203,7 +209,7 @@ run_frontend() {
echo Running the frontend
echo ----------------------------------------------------------------------
- docker-compose up -d frontend
+ $docker_compose up -d frontend
sleep 2
}