-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker.buildArg.* properties not taken into account in OpenShift plugins #2904
Comments
I think this issue is happening because we're only modifying Image Build Config in case of Code for extracting build args from properties is here in BuildService: Line 197 in ae8c283
This gets called by DockerBuildService that is one of the implementations of AbstractImageBuildService . Other implementations are OpenShiftBuildService, JibBuildService, BuildPackBuildService. This issue can be fixed by moving the logic upwards before build is delegated to Build Strategy specific Build Service implementations. Maybe it can be moved in Lines 58 to 64 in 41b05b4
|
…ass BuildArgResolverUtil Related to eclipse-jkube#2904 It's better to move code for resolving build args from different sources to a dedicated class. It doesn't look like BuildService is the right place for this. This way we can also use it from other BuildServices of other build strategies. Signed-off-by: Rohan Kumar <[email protected]>
…ass BuildArgResolverUtil Related to eclipse-jkube#2904 It's better to move code for resolving build args from different sources to a dedicated class. It doesn't look like BuildService is the right place for this. This way we can also use it from other BuildServices of other build strategies. Signed-off-by: Rohan Kumar <[email protected]>
…ass BuildArgResolverUtil Related to eclipse-jkube#2904 It's better to move code for resolving build args from different sources to a dedicated class. It doesn't look like BuildService is the right place for this. This way we can also use it from other BuildServices of other build strategies. Signed-off-by: Rohan Kumar <[email protected]>
…ass BuildArgResolverUtil Related to #2904 It's better to move code for resolving build args from different sources to a dedicated class. It doesn't look like BuildService is the right place for this. This way we can also use it from other BuildServices of other build strategies. Signed-off-by: Rohan Kumar <[email protected]>
Describe the bug
The JKube Openshift Maven plugin fails to recognize specified Docker build-arg when they are injected into a Dockerfile from Maven properties. This issue manifests specifically when using Maven properties and does not occur with the XML/Gradle DSL configuration since #2895.
This issue occurs despite the JKube documentation confirming that build arguments can be specified either via the plugin configuration or as Maven properties.
Eclipse JKube version
SNAPSHOT
Component
OpenShift Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
Set Up the Dockerfile:
Place the following content in
src/main/docker/Dockerfile
:Configure the JKube Plugin:
Insert the JKube Openshift Maven plugin configuration into your
pom.xml
:Define the Build Argument:
Define the build argument for the Docker image in your
pom.xml
:Execute the Build Command:
Execute the build using the following Maven command:
Error Observation:
The build process fails, yielding the following output:
Expected behavior
The
docker.buildArg.FILE_EXTENSION
property should be properly processed, enabling the substitution of${FILE_EXTENSION}
in the Dockerfile and ensuring the successful build of the Docker image with the specified configurations.Runtime
OpenShift
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: