From c2382846287029ce24cca15817a96021a8161f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 20 Sep 2023 11:39:18 +0200 Subject: [PATCH] Skip docker-maven-plugin completely on GitHub Action's Windows VMs --- .github/workflows/build.yml | 6 +++++- CONTRIBUTING.md | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3e89a5d3fc..c6862ae4635 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,10 @@ jobs: # We can't start Linux containers on GitHub Actions' Windows VMs, # so we can't run Elasticsearch tests. # See https://github.com/actions/runner-images/issues/1143#issuecomment-972929995 + # For some reason docker-maven-plugin will error out with "All pipe instances are busy" + # on GitHub Actions' Windows VMs (when using Bash?), + # so we also explicitly disable docker-maven-plugin. + # See https://github.com/fabric8io/docker-maven-plugin/issues/548#issuecomment-255477600 - { name: "Windows JDK 17", runs-on: 'windows-latest', @@ -71,7 +75,7 @@ jobs: version: 17 }, maven: { - args: '-Dtest.elasticsearch.skip=true' + args: '-Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true' } } steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5b7df5e97f0..63f41aeb387 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -223,8 +223,8 @@ and run unit tests and integration tests. ``` Note: on Windows, you will need a Docker install able to run Linux containers. -If you don't have that, you can skip the Elasticsearch tests: -`./mvnw clean install -Dtest.elasticsearch.skip=true`. +If you don't have that, you can skip the Elasticsearch tests and all container startups: +`./mvnw clean install -Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true`. Note: the produced JARs are compatible with Java 8 and later, regardless of the JDK used to build Hibernate Search. @@ -346,6 +346,12 @@ you can skip all Elasticsearch tests (and thus the Elasticsearch container start ./mvnw clean install -Dtest.elasticsearch.skip=true ``` +On Windows, you might need to also skip all docker container features: + +```bash +./mvnw clean install -Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true +``` + Alternatively, you can prevent the build from launching an Elasticsearch server automatically and run Elasticsearch-related tests against your own server using the `test.elasticsearch.connection.uris` property: