This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 5db74fc91f0c camel-test-infra-cli: make base image configurable
5db74fc91f0c is described below
commit 5db74fc91f0cfd1f0df9ba92b53009416372ea63
Author: Marco Carletti <[email protected]>
AuthorDate: Tue Apr 21 09:52:46 2026 +0200
camel-test-infra-cli: make base image configurable
---
.../java/org/apache/camel/test/infra/cli/common/CliProperties.java | 4 ++++
.../org/apache/camel/test/infra/cli/services/CliBuiltContainer.java | 6 ++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git
a/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/common/CliProperties.java
b/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/common/CliProperties.java
index 914246208c5f..fc3ed92ec8b1 100644
---
a/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/common/CliProperties.java
+++
b/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/common/CliProperties.java
@@ -43,6 +43,10 @@ public final class CliProperties {
public static final String SKIP_INSTALL = "cli.service.skip.install";
+ public static final String FROM_IMAGE = "cli.service.from.image";
+
+ public static final String DELETE_IMAGE_ON_EXIT =
"cli.service.delete.image.on.exit";
+
private CliProperties() {
}
}
diff --git
a/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/services/CliBuiltContainer.java
b/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/services/CliBuiltContainer.java
index bbdf855b6457..133858ed737c 100644
---
a/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/services/CliBuiltContainer.java
+++
b/test-infra/camel-test-infra-cli/src/main/java/org/apache/camel/test/infra/cli/services/CliBuiltContainer.java
@@ -24,6 +24,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
+import org.apache.camel.test.infra.cli.common.CliProperties;
import org.apache.camel.test.infra.common.TestUtils;
import org.junit.platform.commons.util.StringUtils;
import org.slf4j.Logger;
@@ -76,7 +77,7 @@ public class CliBuiltContainer extends
GenericContainer<CliBuiltContainer> {
super(new ImageFromDockerfile(
"localhost/camel-cli:" + params.getCamelRef() + "-" +
params.getCamelJBangVersion()
+ (params.getKeepContainerRunning() ?
"-R" : ""),
- false)
+
Boolean.parseBoolean(System.getProperty(CliProperties.DELETE_IMAGE_ON_EXIT,
"false")))
.withFileFromPath("Dockerfile",
StringUtils.isNotBlank(params.getDockerFile())
? Path.of(params.getDockerFile())
:
Path.of(MountableFile.forClasspathResource("org/apache/camel/test/infra/cli/services/Dockerfile")
@@ -85,7 +86,8 @@ public class CliBuiltContainer extends
GenericContainer<CliBuiltContainer> {
"org/apache/camel/test/infra/cli/services/entrypoint.sh")
.withFileFromClasspath("99-ssh-jbang.conf",
"org/apache/camel/test/infra/cli/services/99-ssh-jbang.conf")
- .withBuildArg(FROM_IMAGE_ARG,
TestUtils.prependHubImageNamePrefixIfNeeded(FROM_IMAGE_NAME))
+ .withBuildArg(FROM_IMAGE_ARG,
TestUtils.prependHubImageNamePrefixIfNeeded(
+ System.getProperty(CliProperties.FROM_IMAGE,
FROM_IMAGE_NAME)))
.withBuildArg(CAMEL_REF_ARG, params.getCamelRef())
.withBuildArg(KEEP_RUNNING_ARG,
String.valueOf(params.getKeepContainerRunning()))
.withBuildArg(SSH_PASSWORD_ARG, params.getSshPassword())