From 335aa7115381368abf20a782ef76b8421344a4c9 Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Fri, 9 Aug 2024 08:35:32 +0530 Subject: [PATCH 1/2] Update docker command to docker-compose v2 --- ballerina/build.gradle | 8 ++++---- ballerina/tests/resources/docker/docker-compose.yml | 2 -- examples/resources/docker/docker-compose.yml | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index d7841cd..fee4ec0 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -95,9 +95,9 @@ task startMongodbServer() { println("Starting mongodb server...") exec { if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/docker-compose.yml up && exit %%ERRORLEVEL%%" + commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/docker-compose.yml up && exit %%ERRORLEVEL%%" } else { - commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/docker-compose.yml up -d" + commandLine 'sh', '-c', "docker compose -f tests/resources/docker/docker-compose.yml up -d" } } } @@ -108,9 +108,9 @@ task stopMongodbServer() { println("Stopping mongodb server...") exec { if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/docker-compose.yml down && exit %%ERRORLEVEL%%" + commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/docker-compose.yml down && exit %%ERRORLEVEL%%" } else { - commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/docker-compose.yml down" + commandLine 'sh', '-c', "docker compose -f tests/resources/docker/docker-compose.yml down" } } } diff --git a/ballerina/tests/resources/docker/docker-compose.yml b/ballerina/tests/resources/docker/docker-compose.yml index 68330b0..b52ef7e 100644 --- a/ballerina/tests/resources/docker/docker-compose.yml +++ b/ballerina/tests/resources/docker/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: mongo-no-auth: image: mongo:4.2 diff --git a/examples/resources/docker/docker-compose.yml b/examples/resources/docker/docker-compose.yml index 8a1a25e..df14b7e 100644 --- a/examples/resources/docker/docker-compose.yml +++ b/examples/resources/docker/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: mongodb: image: mongo:4.2 From 119eeb78eb6d213f45733f8ba2bb248f1a2eb939 Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Fri, 9 Aug 2024 08:37:52 +0530 Subject: [PATCH 2/2] Update GraalVM workflow to use docker-compose v2 --- .github/workflows/build-with-bal-test-graalvm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-with-bal-test-graalvm.yml b/.github/workflows/build-with-bal-test-graalvm.yml index d188185..78454ee 100644 --- a/.github/workflows/build-with-bal-test-graalvm.yml +++ b/.github/workflows/build-with-bal-test-graalvm.yml @@ -55,7 +55,7 @@ jobs: - name: Start MongoDB Server run: | cd ballerina/tests/resources/docker - docker-compose up -d + docker compose up -d - name: Test with GraalVM run: | @@ -65,4 +65,4 @@ jobs: - name: Stop MongoDB Server run: | cd ballerina/tests/resources/docker - docker-compose down + docker compose down