tmielke opened a new pull request, #25405:
URL: https://github.com/apache/camel/pull/25405

   # Description
   
   ## Summary
   
   Three test-infra modules that build containers from Dockerfiles 
(`camel-test-infra-smb`, `camel-test-infra-cli`, `camel-test-infra-hivemq`) had 
their base images hardcoded in Java constants or Dockerfile `ARG` defaults, 
bypassing `container.properties`. 
   This meant the images could not be overridden via system properties or 
platform-specific keys, and environments using a private registry proxy 
(`hub.image.name.prefix`) could not redirect the pulls.
   
   This PR externalizes the base image references into `container.properties` 
using a consistent pattern across all three modules:
   
     - **container.properties** — declares the base image (e.g., 
`smb.service.from.image=mirror.gcr.io/fedora:43`)
     - **Dockerfile** — uses `ARG FROMIMAGE=<default>` / `FROM $FROMIMAGE` 
(default preserved for standalone `docker build`)
     - **Java** — resolves the property via `LocalPropertyResolver`, wraps with 
`TestUtils.prependHubImageNamePrefixIfNeeded()`, and passes it via
     `.withBuildArg("FROMIMAGE", ...)`
   
   ### Per-module details
   
   **camel-test-infra-smb** — New `container.properties` and 
`SmbProperties.SMB_FROM_IMAGE` constant. `SmbContainer` now resolves the base 
image from properties instead of hardcoding it.
   
   **camel-test-infra-cli** — New `container.properties` (includes the existing 
"run integration tests locally" warning). `CliBuiltContainer` now uses 
`LocalPropertyResolver` instead of `System.getProperty` with a hardcoded 
fallback constant.
   
   **camel-test-infra-hivemq** — The Sparkplug TCK Dockerfile hardcoded `ARG 
HIVEMQ_VERSION=2024.6` and the Java code never passed a build arg. Added 
`hivemq.sparkplug.from.image` to the existing `container.properties` and wired 
`withBuildArg` in `LocalHiveMQSparkplugTCKInfraService`. The standard HiveMQ 
service (`LocalHiveMQInfraService`) already used `container.properties` 
correctly and was not changed.
   
   ## Test plan
   
     - [x] Build all three modules: `mvn -DskipTests install` in each module 
directory
     - [x] Verify system property override works (e.g., 
`-Dsmb.service.from.image=...`)
     - [x] Run integration tests for camel-smb, camel-cli, and camel-mqtt 
(HiveMQ Sparkplug) components
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to