Skip to content

CAMEL-21577: Fix test-infra modules not using container.properties for Dockerfile base images - #25405

Open
tmielke wants to merge 3 commits into
apache:mainfrom
tmielke:CAMEL-21577-camel-test-infra-use-container-properties
Open

CAMEL-21577: Fix test-infra modules not using container.properties for Dockerfile base images#25405
tmielke wants to merge 3 commits into
apache:mainfrom
tmielke:CAMEL-21577-camel-test-infra-use-container-properties

Conversation

@tmielke

@tmielke tmielke commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

  • Build all three modules: mvn -DskipTests install in each module directory
  • Verify system property override works (e.g., -Dsmb.service.from.image=...)
  • Run integration tests for camel-smb, camel-cli, and camel-mqtt (HiveMQ Sparkplug) components

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.

  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

AI-assisted contributions

  • 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.

Torsten Mielke and others added 3 commits August 6, 2026 10:21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t-infra-hivemq

The Sparkplug TCK Dockerfile hardcoded its base image via
ARG HIVEMQ_VERSION=2024.6, ignoring container.properties entirely.
Externalize it using the same pattern as camel-test-infra-smb and
camel-test-infra-cli: resolve the full image reference from
container.properties via LocalPropertyResolver, wrap it with
TestUtils.prependHubImageNamePrefixIfNeeded(), and pass it to the
Dockerfile as a FROMIMAGE build arg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • test-infra/camel-test-infra-cli
  • test-infra/camel-test-infra-hivemq
  • test-infra/camel-test-infra-smb

🔬 Scalpel shadow comparison — Scalpel: 14 tested, 29 compile-only — current: 14 all tested

Maveniverse Scalpel detected 43 affected modules (current approach: 14).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 14 modules (3 direct + 11 downstream), skip tests for 29 (generated code, meta-modules)

Modules Scalpel would test (14)
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
  • camel-smb
  • camel-tahu
  • camel-test-infra-all
  • camel-test-infra-cli
  • camel-test-infra-hivemq
  • camel-test-infra-smb
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
Modules with tests skipped (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (43 modules)
  • Camel :: All Components Sync point
  • Camel :: Assembly
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Suggest
  • Camel :: Component DSL
  • Camel :: Coverage
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: Integration Tests
  • Camel :: JBang :: Core
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Main
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: SMB
  • Camel :: Tahu
  • Camel :: Test Infra :: All test services
  • Camel :: Test Infra :: Cli (Camel CLI)
  • Camel :: Test Infra :: HiveMQ
  • Camel :: Test Infra :: Server Message Block
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants