Skip to content

Commit

Permalink
Merge pull request #1764 from ktock/bump-docker-compose
Browse files Browse the repository at this point in the history
CI: Use docker compose instead of docker-compose
  • Loading branch information
AkihiroSuda authored Aug 26, 2024
2 parents 1dac5ef + ac58863 commit d8b2478
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions script/benchmark/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ echo "Logging to >>> ${LOG_FILE} (will finally be stored under ${OUTPUTDIR})"
echo "Benchmarking..."
FAIL=
if ! ( cd "${CONTEXT}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} \
docker compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} \
"${BENCHMARKING_NODE}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker exec \
-e BENCHMARK_RUNTIME_MODE -e BENCHMARK_SAMPLES_NUM -e BENCHMARK_PROFILE \
-i "${BENCHMARKING_CONTAINER}" \
Expand Down Expand Up @@ -165,7 +165,7 @@ if [ "${FAIL}" != "true" ] ; then
fi

echo "Cleaning up environment..."
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
if [ "${FAIL}" == "true" ] ; then
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions script/cri-containerd/test-stargz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LOG_FILE=$(mktemp)
MIRROR_TMP=$(mktemp -d)
function cleanup {
ORG_EXIT_CODE="${1}"
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v || true
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v || true
rm -rf "${TMP_CONTEXT}" || true
rm "${DOCKER_COMPOSE_YAML}" || true
rm "${CONTAINERD_CONFIG}" || true
Expand Down Expand Up @@ -90,7 +90,7 @@ volumes:
critest-prepare-containerd-data:
critest-prepare-containerd-stargz-grpc-data:
EOF
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate

CONNECTED=
for i in $(seq 100) ; do
Expand Down
4 changes: 2 additions & 2 deletions script/cri-o/test-stargz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LOG_FILE=$(mktemp)
MIRROR_TMP=$(mktemp -d)
function cleanup {
ORG_EXIT_CODE="${1}"
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v || true
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v || true
rm -rf "${TMP_CONTEXT}" || true
rm "${DOCKER_COMPOSE_YAML}" || true
rm "${CRIO_CONFIG}" || true
Expand Down Expand Up @@ -109,7 +109,7 @@ volumes:
critest-prepare-containerd-data:
critest-prepare-containerd-stargz-grpc-data:
EOF
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate

retry docker exec "${PREPARE_NODE_NAME}" curl -k --head "http://${REGISTRY_HOST}:5000/v2/"

Expand Down
6 changes: 3 additions & 3 deletions script/criauth/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ EOF
cp "${REPO}/script/criauth/mirror.sh" "${MIRROR_TMP}/mirror.sh"
if ! ( cd "${CONTEXT}" && \
docker network create "${REGISTRY_NETWORK}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker exec "${PREPARE_NODE_NAME}" /bin/bash /tools/mirror.sh \
"${TESTIMAGE_ORIGIN}" "${TESTIMAGE}" ) ; then
echo "Failed to prepare private registry"
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker network rm "${REGISTRY_NETWORK}"
exit 1
fi
Expand All @@ -126,7 +126,7 @@ if ! ( "${CONTEXT}"/run-kind.sh "${KIND_CLUSTER_NAME}" \
"${KIND_KUBECONFIG}" "${TESTIMAGE}" ) ; then
FAIL=true
fi
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
kind delete cluster --name "${KIND_CLUSTER_NAME}"
docker network rm "${REGISTRY_NETWORK}"

Expand Down
6 changes: 3 additions & 3 deletions script/integration/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ EOF
echo "Testing..."
FAIL=
if ! ( cd "${CONTEXT}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} \
docker compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} \
"${CONTAINERD_NODE}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up --abort-on-container-exit ) ; then
docker compose -f "${DOCKER_COMPOSE_YAML}" up --abort-on-container-exit ) ; then
FAIL=true
fi
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
if [ "${FAIL}" == "true" ] ; then
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions script/k3s/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ EOF
cp "${REPO}/script/k3s/mirror.sh" "${MIRROR_TMP}/mirror.sh"
if ! ( cd "${CONTEXT}" && \
docker network create "${REGISTRY_NETWORK}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker exec "${PREPARE_NODE_NAME}" /bin/bash /tools/mirror.sh \
"${TESTIMAGE_ORIGIN}" "${TESTIMAGE}" ) ; then
echo "Failed to prepare private registry"
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker network rm "${REGISTRY_NETWORK}"
exit 1
fi
Expand All @@ -127,7 +127,7 @@ if ! ( "${CONTEXT}"/run-k3s.sh "${K3S_CLUSTER_NAME}" \
"${K3S_KUBECONFIG}" "${TESTIMAGE}" ) ; then
FAIL=true
fi
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
k3d cluster delete "${K3S_CLUSTER_NAME}"
docker network rm "${REGISTRY_NETWORK}"

Expand Down
6 changes: 3 additions & 3 deletions script/kind/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ EOF
cp "${REPO}/script/kind/mirror.sh" "${MIRROR_TMP}/mirror.sh"
if ! ( cd "${CONTEXT}" && \
docker network create "${REGISTRY_NETWORK}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker compose -f "${DOCKER_COMPOSE_YAML}" up -d --force-recreate && \
docker exec "${PREPARE_NODE_NAME}" /bin/bash /tools/mirror.sh \
"${TESTIMAGE_ORIGIN}" "${TESTIMAGE}" ) ; then
echo "Failed to prepare private registry"
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker network rm "${REGISTRY_NETWORK}"
exit 1
fi
Expand All @@ -127,7 +127,7 @@ if ! ( "${CONTEXT}"/run-kind.sh "${KIND_CLUSTER_NAME}" \
"${KIND_KUBECONFIG}" "${TESTIMAGE}" ) ; then
FAIL=true
fi
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
kind delete cluster --name "${KIND_CLUSTER_NAME}"
docker network rm "${REGISTRY_NETWORK}"

Expand Down
6 changes: 3 additions & 3 deletions script/optimize/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ volumes:
EOF
local FAIL=
if ! ( cd "${CONTEXT}" && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} testenv_opt && \
docker-compose -f "${DOCKER_COMPOSE_YAML}" up --abort-on-container-exit ) ; then
docker compose -f "${DOCKER_COMPOSE_YAML}" build ${DOCKER_BUILD_ARGS:-} testenv_opt && \
docker compose -f "${DOCKER_COMPOSE_YAML}" up --abort-on-container-exit ) ; then
FAIL=true
fi
docker-compose -f "${DOCKER_COMPOSE_YAML}" down -v
docker compose -f "${DOCKER_COMPOSE_YAML}" down -v
if [ "${FAIL}" == "true" ] ; then
exit 1
fi
Expand Down

0 comments on commit d8b2478

Please sign in to comment.