You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation on https://eclipse.dev/jkube/docs/kubernetes-maven-plugin/#property-buildargs, it should be possible to pass build arguments from properties using the format: <docker.buildArg.myBuildArg>myValue</docker.buildArg.myBuildArg>. This method functions correctly except when the build arguments are used within the 'FROM' statement of a Dockerfile. In such cases, JKube attempts to pre-pull the image without incorporating the specified build arguments, leading to a failure in the build process.
Eclipse JKube version
1.16.2
Component
Kubernetes Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
Prepare the Dockerfile:
Save the following content in src/main/docker/Dockerfile:
ARG IMAGEVERSION
FROM docker.io/alpine:${IMAGEVERSION} as builder
ARG IMAGEVERSION
RUN touch test-${IMAGEVERSION}.txt
FROM docker.io/alpine:${IMAGEVERSION}
COPY --from=builder /test-${IMAGEVERSION}.txt /test.txt
ENTRYPOINT ["ls"]
Configure JKube Plugin in pom.xml:
Add the JKube Kubernetes Maven plugin configuration to your pom.xml:
Execute the Build:
Run the following command in your project directory:
mvn k8s:build
Observe the Error:
The build fails with the following error message:
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.17-SNAPSHOT:build (default-cli) on project jkube-maven-sample-node-selector: Failed to execute the build: Error while trying to build the image: Unable to check image [docker.io/alpine:${IMAGEVERSION}] : {"message":"invalid reference format"} (Bad Request: 400) -> [Help 1]
Expected behavior
The build should complete without errors
Runtime
other (please specify in additional context)
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
According to the documentation on https://eclipse.dev/jkube/docs/kubernetes-maven-plugin/#property-buildargs, it should be possible to pass build arguments from properties using the format:
<docker.buildArg.myBuildArg>myValue</docker.buildArg.myBuildArg>
. This method functions correctly except when the build arguments are used within the 'FROM' statement of a Dockerfile. In such cases, JKube attempts to pre-pull the image without incorporating the specified build arguments, leading to a failure in the build process.Eclipse JKube version
1.16.2
Component
Kubernetes Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
Prepare the Dockerfile:
Save the following content in
src/main/docker/Dockerfile
:Configure JKube Plugin in
pom.xml
:Add the JKube Kubernetes Maven plugin configuration to your
pom.xml
:Define Build Argument in
pom.xml
:Specify the Docker build argument for the image version:
Execute the Build:
Run the following command in your project directory:
Observe the Error:
The build fails with the following error message:
Expected behavior
The build should complete without errors
Runtime
other (please specify in additional context)
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: