Skip to content

Commit

Permalink
FISH-8129 Split JDK21 image generation into separate profile
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Pielage <[email protected]>
  • Loading branch information
Pandrex247 committed Dec 7, 2023
1 parent cbcee3a commit 5cb65e5
Showing 1 changed file with 54 additions and 6 deletions.
60 changes: 54 additions & 6 deletions appserver/extras/docker-images/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@
<filter token="docker.payara.tag" value="${docker.payara.tag}-jdk17"/>
</filterset>
</copy>
<copy file="src/main/docker/Dockerfile" toFile="target/antrun/Dockerfile.jdk21">
<filterset>
<filter token="docker.java.image" value="${docker.java.repository}:${docker.jdk21.tag}"/>
<filter token="docker.payara.tag" value="${docker.payara.tag}-jdk21"/>
</filterset>
</copy>
</target>
</configuration>
</execution>
Expand Down Expand Up @@ -215,6 +209,60 @@
</assembly>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Split into a separate profile for when we want to update images for distributions that don't support JDK 21 -->
<profile>
<id>generate-jdk21-docker-image</id>
<activation>
<file>
<!-- Essentially - Skip this aggregator pom -->
<exists>src/main/docker/Dockerfile</exists>
</file>
</activation>
<build>
<plugins>
<!-- Required until https://github.com/fabric8io/docker-maven-plugin/issues/859 is resolved -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>filter-dockerfiles</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy file="src/main/docker/Dockerfile" toFile="target/antrun/Dockerfile.jdk21">
<filterset>
<filter token="docker.java.image" value="${docker.java.repository}:${docker.jdk21.tag}"/>
<filter token="docker.payara.tag" value="${docker.payara.tag}-jdk21"/>
</filterset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<images>
<image>
<name>${docker.payara.repository}</name>
<build>
Expand Down

0 comments on commit 5cb65e5

Please sign in to comment.