Skip to content

Commit

Permalink
ap: Migrate to docker compose V2
Browse files Browse the repository at this point in the history
Azure Pipelines started to roll 20240401.4 Ubuntu image that doesn't
include docker-compose v1:

https://github.com/actions/runner-images/blob/ubuntu20/20240401.4/images/ubuntu/Ubuntu2004-Readme.md

See actions/runner-images#9557

Compose V1 to V2 migration guide:

https://docs.docker.com/compose/migrate/

Fixes: https://pagure.io/freeipa/issue/9566
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
  • Loading branch information
stanislavlevin committed Aug 19, 2024
1 parent d00808a commit 93cea41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ipatests/azure/scripts/azure-run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ IPA_TESTS_CLIENTS="${!IPA_TESTS_CLIENTS_VARNAME:-0}"
IPA_TESTS_REPLICAS_VARNAME="IPA_TESTS_REPLICAS_${PROJECT_ID}"
IPA_TESTS_REPLICAS="${!IPA_TESTS_REPLICAS_VARNAME:-0}"

IPA_TESTS_CONTROLLER="${PROJECT_ID}_master_1"
IPA_TESTS_CONTROLLER="${PROJECT_ID}-master-1"
IPA_TESTS_LOGSDIR="${IPA_TESTS_REPO_PATH}/ipa_envs/${IPA_TESTS_ENV_NAME}/${CI_RUNNER_LOGS_DIR}"

IPA_TESTS_DOMAIN="${IPA_TESTS_DOMAIN:-ipa.test}"
Expand Down Expand Up @@ -70,7 +70,7 @@ BUILD_REPOSITORY_LOCALPATH="$BUILD_REPOSITORY_LOCALPATH" \
IPA_DOCKER_IMAGE="${IPA_DOCKER_IMAGE:-freeipa-azure-builder}" \
IPA_NETWORK="${IPA_NETWORK:-ipanet}" \
IPA_IPV6_SUBNET="2001:db8:1:${PROJECT_ID}::/64" \
docker-compose -p "$PROJECT_ID" up \
docker compose -p "$PROJECT_ID" up \
--scale replica="$IPA_TESTS_REPLICAS" \
--scale client="$IPA_TESTS_CLIENTS" \
--force-recreate --remove-orphans -d
Expand Down Expand Up @@ -109,7 +109,7 @@ BUILD_REPOSITORY_LOCALPATH="$BUILD_REPOSITORY_LOCALPATH" \
IPA_DOCKER_IMAGE="${IPA_DOCKER_IMAGE:-freeipa-azure-builder}" \
IPA_NETWORK="${IPA_NETWORK:-ipanet}" \
IPA_IPV6_SUBNET="2001:db8:1:${PROJECT_ID}::/64" \
docker-compose -p "$PROJECT_ID" down
docker compose -p "$PROJECT_ID" down
popd

exit $tests_result
2 changes: 1 addition & 1 deletion ipatests/azure/scripts/setup_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def names(self):
names of containers within group
"""
if not hasattr(self, '_names'):
self._names = ['{}_{}_{}'.format(self.prefix, self.role, c)
self._names = ['{}-{}-{}'.format(self.prefix, self.role, c)
for c in range(1, self.num + 1)]
return self._names

Expand Down

0 comments on commit 93cea41

Please sign in to comment.