diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ee232e9fc1e..8995552a13f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -362,6 +362,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in Java driver where connection pool was not removing dead connections under certain error conditions. * Raised handshake exceptions for Java driver for `NoHostAvailableException` situations. * The default logging level for Gremlin Console in Windows is set to the same WARN level as for Linux. +* Updated to Docker Compose V2 with `docker-compose` changed to `docker compose` in pom and script files. * Add command line option `-l` to change logging level for Gremlin Console in Windows. [[release-3-6-7]] diff --git a/docker/build.sh b/docker/build.sh index 1b299d5c342..d495ff5de1c 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -106,7 +106,7 @@ EOF function check_status { status=$? - [ "$1" == "down" ] && docker-compose down + [ "$1" == "down" ] && docker compose down popd > /dev/null [ $status -ne 0 ] && exit $status } @@ -128,7 +128,7 @@ docker run -p 80:80 ${TINKERPOP_DOCKER_OPTS} ${REMOVE_CONTAINER} \ check_status if [ -n "${RUN_TESTS}" ]; then - # If testing, then build base server which is required by the following docker-compose. + # If testing, then build base server which is required by the following docker compose. pushd ${ABS_PROJECT_HOME}/gremlin-server > /dev/null docker build -f ./Dockerfile --build-arg GREMLIN_SERVER_DIR=target/apache-tinkerpop-gremlin-server-${GREMLIN_SERVER}-standalone -t tinkerpop/gremlin-server:${GREMLIN_SERVER} . check_status @@ -136,7 +136,7 @@ fi if [ -n "${INCLUDE_GO}" ] && [ -n "${RUN_TESTS}" ]; then pushd ${ABS_PROJECT_HOME}/gremlin-go > /dev/null - docker-compose up --build --exit-code-from gremlin-go-integration-tests + docker compose up --build --exit-code-from gremlin-go-integration-tests check_status "down" fi @@ -145,19 +145,19 @@ if [ -n "${INCLUDE_PYTHON}" ] && [ -n "${RUN_TESTS}" ]; then export BUILD_DIR=$(pwd)/target/python3/ mkdir -p ${BUILD_DIR} cp -r ./src/main/python/* ${BUILD_DIR} - docker-compose up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests + docker compose up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests check_status "down" fi if [ -n "${INCLUDE_DOTNET}" ] && [ -n "${RUN_TESTS}" ]; then pushd ${ABS_PROJECT_HOME}/gremlin-dotnet/test > /dev/null - docker-compose up --build --exit-code-from gremlin-dotnet-integration-tests + docker compose up --build --exit-code-from gremlin-dotnet-integration-tests check_status "down" fi if [ -n "${INCLUDE_JAVASCRIPT}" ] && [ -n "${RUN_TESTS}" ]; then pushd ${ABS_PROJECT_HOME}/gremlin-javascript/src/main/javascript/gremlin-javascript > /dev/null - docker-compose up --build --exit-code-from gremlin-js-integration-tests + docker compose up --build --exit-code-from gremlin-js-integration-tests check_status "down" fi diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc index 3026abec7da..d9f8ab4801d 100644 --- a/docs/src/dev/developer/development-environment.asciidoc +++ b/docs/src/dev/developer/development-environment.asciidoc @@ -352,7 +352,7 @@ go build Docker allows you to test the driver without installing any dependencies. The following command can be used to run docker: [source,text] -docker-compose up --exit-code-from gremlin-go-integration-tests +docker compose up --exit-code-from gremlin-go-integration-tests See the <> section for more information on release manager configurations. @@ -635,12 +635,12 @@ your Platform: * Run Maven commands, e.g. `mvn clean install` inside of project folder e.g. `tinkerpop/gremlin-go`, or `mvn clean install -pl gremlin-go` inside of `tinkerpop` (platform-agnostic - recommended) -* Add `GREMLIN_SERVER=` and `HOME=` to an `.env` file inside project folder and run `docker-compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic). -* Run `GREMLIN_SERVER= docker-compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux. -* Run `$env:GREMLIN_SERVER="";$env:HOME=$env:USERPROFILE;docker-compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell. +* Add `GREMLIN_SERVER=` and `HOME=` to an `.env` file inside project folder and run `docker compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic). +* Run `GREMLIN_SERVER= docker compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux. +* Run `$env:GREMLIN_SERVER="";$env:HOME=$env:USERPROFILE;docker compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell. -You should see exit code 0 upon successful completion of the test suites. Run `docker-compose down` to remove the -service containers (not needed if you executed Maven commands or `run.sh`), or `docker-compose down --rmi all` to +You should see exit code 0 upon successful completion of the test suites. Run `docker compose down` to remove the +service containers (not needed if you executed Maven commands or `run.sh`), or `docker compose down --rmi all` to remove the service containers while deleting all used images. Note for running docker with MacOS on ARM processors: Docker's performance is extremely poor on ARM Mac's in its diff --git a/gremlin-dotnet/docker-compose.yml b/gremlin-dotnet/docker-compose.yml index 7c84aa00210..7f5efab9dfa 100644 --- a/gremlin-dotnet/docker-compose.yml +++ b/gremlin-dotnet/docker-compose.yml @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -version: "3.8" - services: gremlin-server-test-dotnet: diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml index edcd258f07a..3a6b5300a93 100644 --- a/gremlin-dotnet/test/pom.xml +++ b/gremlin-dotnet/test/pom.xml @@ -102,8 +102,9 @@ limitations under the License. ${user.home} - docker-compose + docker + compose up --build --exit-code-from @@ -120,8 +121,9 @@ limitations under the License. ${skipTests} - docker-compose + docker + compose down diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml index a12e4f2dac0..07c49a7a15e 100644 --- a/gremlin-go/docker-compose.yml +++ b/gremlin-go/docker-compose.yml @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -version: "3.8" - services: gremlin-server-test: diff --git a/gremlin-go/driver/README.md b/gremlin-go/driver/README.md index bbae31ec9e2..652432805b4 100644 --- a/gremlin-go/driver/README.md +++ b/gremlin-go/driver/README.md @@ -132,11 +132,11 @@ The docker compose environment variable `HOME` specifies the user home directory There are different ways to launch the test suite and set the `GREMLIN_SERVER` environment variable depending on your Platform: - Run Maven commands, e.g. `mvn clean install` inside of `tinkerpop/gremlin-go`, or `mvn clean install -pl gremlin-go` inside of `tinkerpop` (platform-agnostic - recommended) - Run the `run.sh` script, which sets `GREMLIN_SERVER` by default. Run `./run.sh -h` for usage information (Unix/Linux - recommended). -- Add `GREMLIN_SERVER=` and `HOME=` to an `.env` file inside `gremlin-go` and run `docker-compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic). -- Run `GREMLIN_SERVER= docker-compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux. -- Run `$env:GREMLIN_SERVER="";$env:HOME=$env:USERPROFILE;docker-compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell. +- Add `GREMLIN_SERVER=` and `HOME=` to an `.env` file inside `gremlin-go` and run `docker compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic). +- Run `GREMLIN_SERVER= docker compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux. +- Run `$env:GREMLIN_SERVER="";$env:HOME=$env:USERPROFILE;docker compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell. -You should see exit code 0 upon successful completion of the test suites. Run `docker-compose down` to remove the service containers (not needed if you executed Maven commands or `run.sh`), or `docker-compose down --rmi all` to remove the service containers while deleting all used images. +You should see exit code 0 upon successful completion of the test suites. Run `docker compose down` to remove the service containers (not needed if you executed Maven commands or `run.sh`), or `docker compose down --rmi all` to remove the service containers while deleting all used images. [go]: https://go.dev/dl/ [gomods]: https://go.dev/blog/using-go-modules diff --git a/gremlin-go/pom.xml b/gremlin-go/pom.xml index f020030e0d2..2affbfaf6bf 100644 --- a/gremlin-go/pom.xml +++ b/gremlin-go/pom.xml @@ -113,8 +113,9 @@ limitations under the License. ${user.home} - docker-compose + docker + compose up --build --exit-code-from @@ -131,8 +132,9 @@ limitations under the License. ${skipTests} - docker-compose + docker + compose down diff --git a/gremlin-go/run.sh b/gremlin-go/run.sh index 5f62072dda0..23a37638a60 100755 --- a/gremlin-go/run.sh +++ b/gremlin-go/run.sh @@ -48,8 +48,8 @@ ABS_PROJECT_HOME=$(dirname $(realpath "$0"))/.. export ABS_PROJECT_HOME # Passes current gremlin server version into docker compose as environment variable -docker-compose up --build --exit-code-from gremlin-go-integration-tests +docker compose up --build --exit-code-from gremlin-go-integration-tests EXIT_CODE=$? # Removes all service containers -docker-compose down +docker compose down exit $EXIT_CODE diff --git a/gremlin-javascript/pom.xml b/gremlin-javascript/pom.xml index bf722c94f0c..c8eab64f833 100644 --- a/gremlin-javascript/pom.xml +++ b/gremlin-javascript/pom.xml @@ -256,8 +256,9 @@ limitations under the License. ${user.home} - docker-compose + docker + compose up --build --exit-code-from @@ -275,8 +276,9 @@ limitations under the License. ${skipTests} - docker-compose + docker + compose down ./src/main/javascript/gremlin-javascript diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/docker-compose.yml b/gremlin-javascript/src/main/javascript/gremlin-javascript/docker-compose.yml index 65fc6758820..54b8392088e 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/docker-compose.yml +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/docker-compose.yml @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -version: "3.8" - services: gremlin-server-test-js: diff --git a/gremlin-python/docker-compose.yml b/gremlin-python/docker-compose.yml index 8b46dff2ad7..b03ec9cf896 100644 --- a/gremlin-python/docker-compose.yml +++ b/gremlin-python/docker-compose.yml @@ -15,8 +15,6 @@ # specific language governing permissions and limitations # under the License. -version: "3.8" - services: gremlin-server-test-python: diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml index 1979c15f89a..f9bea3cc027 100644 --- a/gremlin-python/pom.xml +++ b/gremlin-python/pom.xml @@ -135,16 +135,16 @@ limitations under the License. - + - + - + - + @@ -156,7 +156,7 @@ limitations under the License. python-tests @@ -167,18 +167,18 @@ limitations under the License. ${skipTests} - + - + - + - +