forked from fabric8io/docker-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (BuildService) : Image Build Config BuildArgs should be passed wh…
…ile pulling images (fabric8io#1756) Fixes regression introduced by fabric8io#1731 In fabric8io#1731, we added support for specifying docker build args from maven/system properties. However, I missed it in review that build args specified in plugin image build configuration are no longer passed to autoPullBaseImage. Ensure we merge image build configuration build args with args provided via maven/system properties before passing them to autoPullBaseImage Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
e8c5826
commit 8fa0c7b
Showing
6 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.fabric8.dmp.itests</groupId> | ||
<artifactId>dmp-it-parent</artifactId> | ||
<version>0.45-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>dmp-it-dockerfile-base-as-arg-buildconfig</artifactId> | ||
<version>0.45-SNAPSHOT</version> | ||
<name>dmp-it-dockerfile-base-as-arg-buildconfig</name> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>fabric8:dmp-it-dockerfile-base-as-arg-buildconfig</name> | ||
<build> | ||
<dockerFile>Dockerfile</dockerFile> | ||
<args> | ||
<FROM_IMAGE>openjdk:21-slim</FROM_IMAGE> | ||
</args> | ||
</build> | ||
</image> | ||
</images> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>build</id> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
<phase>install</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
2 changes: 2 additions & 0 deletions
2
it/dockerfile-base-as-arg-buildconfig/src/main/docker/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ARG FROM_IMAGE | ||
FROM ${FROM_IMAGE} AS jlink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/test/resources/io/fabric8/maven/docker/util/Dockerfile_from_build_arg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ARG FROM_IMAGE | ||
FROM ${FROM_IMAGE} AS jlink |