Skip to content

Commit

Permalink
HSEARCH-4674 Remove maven docker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Nov 8, 2023
1 parent 244dcd0 commit 9fb4831
Show file tree
Hide file tree
Showing 24 changed files with 3 additions and 150 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,14 @@ 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',
java: {
version: 17
},
maven: {
args: '-Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true'
args: '-Dtest.elasticsearch.skip=true'
}
}
steps:
Expand Down
10 changes: 2 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 and all container startups:
`./mvnw clean install -Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true`.
If you don't have that, you can skip the Elasticsearch tests and only run tests against H2 database (without using DB containers):
`./mvnw clean install -Dtest.elasticsearch.skip=true`.

Note: the produced JARs are compatible with Java 8 and later,
regardless of the JDK used to build Hibernate Search.
Expand Down Expand Up @@ -346,12 +346,6 @@ 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:
Expand Down
24 changes: 0 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -540,30 +540,6 @@ stage('Non-default environments') {
'''
String mavenDockerArgs = ""
def startedContainers = false
// DB2 setup is super slow (~5 to 15 minutes).
// We can't afford to do that once per module,
// so we start DB2 here, once and for all.
if ( buildEnv.dbName == 'db2' ) {
// Prevent the actual build from starting the DB container
mavenBuildAdditionalArgs += " -Dtest.database.run.db2.skip=true"
// Pick a module that doesn't normally execute the docker-maven-plugin,
// but that has the configuration necessary to start the DB container:
// that way, the maven-docker-plugin won't try to remove our container
// when we execute maven another time to run the tests.
// (This works because maven-docker-plugin filters containers to stop
// based on the Maven GAV coordinates of the Maven project that started that container,
// which are attached to the container thanks to a container label).
mavenDockerArgs = """ \
-pl build/parents/integrationtest \
-P$buildEnv.mavenProfile \
-Dtest.database.run.db2.skip=false \
"""
// Cleanup just in case some containers were left over from a previous build.
sh "mvn docker:stop $mavenDockerArgs"
pullContainerImages mavenDockerArgs
sh "mvn docker:start $mavenDockerArgs"
startedContainers = true
}
try {
mavenNonDefaultBuild buildEnv, """ \
-Pdist \
Expand Down
3 changes: 0 additions & 3 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@

<!-- Test settings -->

<!-- Containers executions tests properties -->
<test.containers.run.skip>false</test.containers.run.skip>

<!-- Lucene tests properties -->

<!-- To skip all Lucene tests from the CLI -->
Expand Down
27 changes: 0 additions & 27 deletions build/parents/integrationtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,6 @@
</build>

<profiles>
<!-- The profiles `skippingAllTests` and `skippingIntegrationTests` are currently duplicates,
as one can't trigger the profile activation on either/or property -->
<profile>
<id>skippingAllTests</id>
<activation>
<property>
<name>skipTests</name>
</property>
</activation>
<properties>
<!-- This is to avoid starting containers for each module needing integration test -->
<test.containers.run.skip>true</test.containers.run.skip>
</properties>
</profile>
<profile>
<id>skippingIntegrationTests</id>
<activation>
<property>
<name>skipITs</name>
</property>
</activation>
<properties>
<!-- This is to avoid starting containers for each module needing integration test -->
<test.containers.run.skip>true</test.containers.run.skip>
</properties>
</profile>

<!-- =============================== -->
<!-- Elasticsearch IT profiles -->
<!-- =============================== -->
Expand Down
4 changes: 0 additions & 4 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@

<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions integrationtest/backend/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/java/modules/orm-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/java/modules/orm-lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/java/modules/pojo-standalone-lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 0 additions & 5 deletions integrationtest/mapper/orm-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 0 additions & 5 deletions integrationtest/mapper/orm-envers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 0 additions & 5 deletions integrationtest/mapper/orm-jakarta-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/mapper/orm-outbox-polling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/mapper/orm-realbackend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/mapper/orm-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 0 additions & 5 deletions integrationtest/mapper/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/mapper/pojo-standalone-realbackend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
4 changes: 0 additions & 4 deletions integrationtest/performance/backend/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions integrationtest/showcase/library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 0 additions & 5 deletions integrationtest/v5migrationhelper/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@
<version.surefire.plugin.java-version.asm>9.6</version.surefire.plugin.java-version.asm>
<version.jacoco.plugin>0.8.11</version.jacoco.plugin>
<version.com.buschmais.jqassistant.plugin>2.0.8</version.com.buschmais.jqassistant.plugin>
<version.docker.maven.plugin>0.43.4</version.docker.maven.plugin>
<version.moditect.plugin>1.1.0</version.moditect.plugin>
<version.sonar.plugin>3.10.0.2594</version.sonar.plugin>
<version.scripting.plugin>3.0.0</version.scripting.plugin>
Expand Down Expand Up @@ -927,11 +926,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${version.docker.maven.plugin}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down

0 comments on commit 9fb4831

Please sign in to comment.