Skip to content

Commit

Permalink
chore(ci): use docker compose over docker-compose (#1853)
Browse files Browse the repository at this point in the history
This should hopefully fix some CI breakage for us, same as in Compass.

Refs: mongodb-js/compass@a322429
  • Loading branch information
addaleax authored Mar 4, 2024
1 parent 0d669ed commit ae4d16e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/connectivity-tests/test/kerberos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ set -x
export KERBEROS_JUMPHOST_DOCKERFILE=${KERBEROS_JUMPHOST_DOCKERFILE:-Dockerfile.node20}

FAILED=no
docker-compose \
docker compose \
-f "$TEST_TMPDIR/test-envs/docker/kerberos/docker-compose.yaml" \
-f "$CONNECTIVITY_TEST_SOURCE_DIR/kerberos/docker-compose.kerberos.yaml" \
--no-ansi \
up --build --exit-code-from kerberos_jumphost --abort-on-container-exit || FAILED=yes

docker-compose \
docker compose \
-f "$TEST_TMPDIR/test-envs/docker/kerberos/docker-compose.yaml" \
-f "$CONNECTIVITY_TEST_SOURCE_DIR/kerberos/docker-compose.kerberos.yaml" \
--no-ansi \
Expand Down
4 changes: 2 additions & 2 deletions packages/connectivity-tests/test/ldap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ function try_connect_connection_string() {
}

function test_for_version() {
MONGODB_VERSION="$1" docker-compose -f docker/ldap/docker-compose.yaml up -d
MONGODB_VERSION="$1" docker compose -f docker/ldap/docker-compose.yaml up -d

sleep 10 # let mongod start up
FAILED_EXPLICIT=$(try_connect_explicit '[email protected]' 'Password1!')
FAILED_CONNECTION_STRING=$(try_connect_connection_string 'mongodb://writer%40EXAMPLE.COM:Password1!@localhost:30017/$external?authMechanism=PLAIN' '[email protected]')

MONGODB_VERSION="$1" docker-compose -f docker/ldap/docker-compose.yaml down
MONGODB_VERSION="$1" docker compose -f docker/ldap/docker-compose.yaml down

if [ $FAILED_EXPLICIT = yes ]; then
ANY_FAILED=yes
Expand Down
8 changes: 4 additions & 4 deletions packages/connectivity-tests/test/localhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ function try_connect_connection_string() {
}

function test_for_version() {
MONGODB_VERSION="$1" docker-compose -f docker/enterprise/docker-compose.yaml up -d
MONGODB_VERSION="$1" docker compose -f docker/enterprise/docker-compose.yaml up -d

sleep 10 # let mongod start up
FAILED_EXPLICIT=$(try_connect_explicit)
FAILED_CONNECTION_STRING=$(try_connect_connection_string)

MONGODB_VERSION="$1" docker-compose -f docker/enterprise/docker-compose.yaml down
MONGODB_VERSION="$1" docker compose -f docker/enterprise/docker-compose.yaml down

if [ $FAILED_EXPLICIT = yes ]; then
ANY_FAILED=yes
Expand All @@ -41,7 +41,7 @@ function try_connect_ipv4only_dualstackhostname() {
else
INNER_MONGOSH="/host/${MONGOSH}"
fi
MONGODB_VERSION="5.0" docker-compose -f docker/enterprise/docker-compose.yaml up -d
MONGODB_VERSION="5.0" docker compose -f docker/enterprise/docker-compose.yaml up -d

DOCKER_BASE_IMG=ubuntu:$("${MONGOSH}" --quiet --nodb --eval 'b = buildInfo(); b.sharedOpenssl && b.opensslVersion.startsWith("1.") ? "20.04" : "22.04"')
# Use a second docker container to be able to modify /etc/hosts easily
Expand All @@ -63,7 +63,7 @@ EOF
echo "Localhost test with ipv4-only access failed"
fi

MONGODB_VERSION="5.0" docker-compose -f docker/enterprise/docker-compose.yaml down
MONGODB_VERSION="5.0" docker compose -f docker/enterprise/docker-compose.yaml down
}

ANY_FAILED=no
Expand Down

0 comments on commit ae4d16e

Please sign in to comment.