fix: downgrade to Java 17 for CI build compatibility
Some checks failed
CI / build (push) Successful in 26s
CI / docker (push) Successful in 57s
CI / deploy (push) Failing after 27s

Build container has JDK 17, not 21. Also replaced
Thread.ofVirtual() (Java 21) with standard Thread.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-03 09:50:38 +02:00
parent 5bbec1e52a
commit a4bc40b241
3 changed files with 7 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM maven:3.9-eclipse-temurin-21 AS backend-build FROM --platform=$BUILDPLATFORM maven:3.9-eclipse-temurin-17 AS backend-build
WORKDIR /build WORKDIR /build
COPY pom.xml . COPY pom.xml .
RUN mvn dependency:go-offline -B || true RUN mvn dependency:go-offline -B || true
@@ -14,7 +14,7 @@ RUN echo "//gitea.siegeln.net/api/packages/cameleer/npm/:_authToken=${REGISTRY_T
COPY ui/ . COPY ui/ .
RUN npm run build RUN npm run build
FROM eclipse-temurin:21-jre FROM eclipse-temurin:17-jre
WORKDIR /app WORKDIR /app
COPY --from=backend-build /build/target/cameleer-deploy-demo-*.jar /app/server.jar COPY --from=backend-build /build/target/cameleer-deploy-demo-*.jar /app/server.jar
COPY --from=ui-build /ui/dist /app/static COPY --from=ui-build /ui/dist /app/static

View File

@@ -18,7 +18,7 @@
<description>Demo: upload Camel JARs, build containers with agent injection, deploy to K8s</description> <description>Demo: upload Camel JARs, build containers with agent injection, deploy to K8s</description>
<properties> <properties>
<java.version>21</java.version> <java.version>17</java.version>
</properties> </properties>
<dependencies> <dependencies>

View File

@@ -103,7 +103,7 @@ public class DeployService {
buildLogs.put(name, Collections.synchronizedList(new ArrayList<>())); buildLogs.put(name, Collections.synchronizedList(new ArrayList<>()));
// Run pipeline async // Run pipeline async
Thread.ofVirtual().name("deploy-" + name).start(() -> { var thread = new Thread(() -> {
try { try {
runPipeline(name, jarFile.getBytes(), imageName, imageTag, resources, envVars); runPipeline(name, jarFile.getBytes(), imageName, imageTag, resources, envVars);
} catch (Exception e) { } catch (Exception e) {
@@ -111,7 +111,9 @@ public class DeployService {
appendLog(name, "FATAL: " + e.getMessage()); appendLog(name, "FATAL: " + e.getMessage());
apps.computeIfPresent(name, (k, v) -> v.withStatus(DeployStatus.FAILED, e.getMessage())); apps.computeIfPresent(name, (k, v) -> v.withStatus(DeployStatus.FAILED, e.getMessage()));
} }
}); }, "deploy-" + name);
thread.setDaemon(true);
thread.start();
return app; return app;
} }