This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feat/llmao
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git


The following commit(s) were added to refs/heads/feat/llmao by this push:
     new 2029e25  fix: include all Maven versions in the Docker image
2029e25 is described below

commit 2029e25f9462f5e69ca7dd48b3d70fc38fadbcbf
Author: Robert Munteanu <[email protected]>
AuthorDate: Mon Oct 12 18:47:36 2026 +0100

    fix: include all Maven versions in the Docker image
---
 README.md                                           |  8 +++++---
 resources/org/apache/sling/jenkins/llmao/Dockerfile | 21 +++++++++++++++++----
 resources/org/apache/sling/jenkins/llmao/run-pi.sh  |  1 +
 vars/slingOsgiBundleBuild.groovy                    |  4 ++--
 4 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index 0aaee61..d08a842 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,9 @@ The resulting Git diff is printed to stdout in the Jenkins 
build log, including
 
 The `ubuntu` agent needs Bash, Git, and access to a **local Docker daemon**. 
The daemon must see the project and temporary workspaces at the same absolute 
paths for bind mounts; containerized executors must share those paths with the 
Docker host. The job also requires the Jenkins Pipeline Utility Steps plugin 
(`writeJSON`/`readJSON`). No host Node.js, Java, Maven, Pi installation, or 
Jenkins Docker Pipeline plugin is required.
 
-The library builds `sling-llmao-pi:1.1.0-maven21-99e61abc` from its 
[Dockerfile](resources/org/apache/sling/jenkins/llmao/Dockerfile), pinning the 
official Node 24 and Maven/Temurin 21 images by digest and Pi at version 
`1.1.0`. The image includes Java 21, Maven 3.9.16, an `mvn21` wrapper, Git, 
curl, Python, and ripgrep. Other JDK versions and release credentials are not 
included. Docker's layer cache avoids reinstalling tools on subsequent runs. An 
uncached build needs Docker Hub, npm,  [...]
+The library builds `sling-llmao-pi:1.1.0-jdks8-21-v2` from its 
[Dockerfile](resources/org/apache/sling/jenkins/llmao/Dockerfile), pinning the 
official Node 24, Maven/Temurin 21, and Temurin 8/11/17 images by digest and Pi 
at version `1.1.0`. The image includes JDKs 8, 11, 17, and 21, Maven 3.9.16, 
Git, curl, Python, ripgrep, and `fd` (Ubuntu's `fd-find` exposed under the name 
Pi expects). Release credentials are not included. Docker's layer cache avoids 
reinstalling tools on subsequent r [...]
+
+Java 21 remains the default for `java` and `mvn`. The `mvn8`, `mvn11`, 
`mvn17`, and `mvn21` wrappers select the corresponding JDK through `JAVA_HOME` 
and `PATH` for that invocation only. Pi is told which wrappers are available 
and decides which JDK to use. `MAVEN_ARGS='-B -ntp'` applies batch mode and 
suppresses download-progress output for Maven and all wrappers, even when a 
skill invokes `mvn clean verify` without those flags.
 
 Image building happens before credential binding. The container receives 
`LLMAO_PAT` from the Jenkins environment, not as a token value in its command 
line or configuration files. It runs as the Jenkins user's UID/GID with a 
writable project mount and read-only `.git` and input mounts. Its private 
configuration, skills checkout, and Maven home/cache live in container-local 
`/tmp`; host credentials and the Docker socket are not mounted. The Pi process 
is bounded to 25 minutes within a 30- [...]
 
@@ -115,8 +117,8 @@ python3 tests/pi-docker.py
 These stub Jenkins steps and Docker/Pi output; they require no credentials or 
LLMAO access. To exercise the real Docker image and Pi CLI against a local mock 
gateway and a fixture skills repository:
 
 ```sh
-docker build --tag sling-llmao-pi:1.1.0-maven21-99e61abc 
resources/org/apache/sling/jenkins/llmao
+docker build --tag sling-llmao-pi:1.1.0-jdks8-21-v2 
resources/org/apache/sling/jenkins/llmao
 python3 tests/pi-docker.py --integration
 ```
 
-The integration test exercises skill discovery/loading, real 
read/edit/write/shell tool calls, Java/Maven availability, environment-token 
authentication, model selection, tracked/new-file diffs, SUCCESS/FAILURE 
mapping, malformed/empty answers, API errors, cancellation, and container 
removal. It uses only disposable fixture projects and does not call LLMAO or 
update the real project. A real Jenkins run is still required to validate 
gateway access and the actual parent-POM migration.
+The integration test exercises skill discovery/loading, real 
read/edit/write/find/shell tool calls, all four Maven/JDK wrappers, Maven 
batch-mode settings, environment-token authentication, model selection, 
tracked/new-file diffs, SUCCESS/FAILURE mapping, malformed/empty answers, API 
errors, cancellation, and container removal. It uses only disposable fixture 
projects and does not call LLMAO or update the real project. A real Jenkins run 
is still required to validate gateway access and t [...]
diff --git a/resources/org/apache/sling/jenkins/llmao/Dockerfile 
b/resources/org/apache/sling/jenkins/llmao/Dockerfile
index 2f7d66f..d437c12 100644
--- a/resources/org/apache/sling/jenkins/llmao/Dockerfile
+++ b/resources/org/apache/sling/jenkins/llmao/Dockerfile
@@ -17,19 +17,32 @@
 
 FROM 
node:24-bookworm-slim@sha256:d6aa754f16b3197301076f047b5def2f02ea1dbbc2ca920407d46d7ec7f87b20
 AS node
 
+FROM 
eclipse-temurin:8-jdk-noble@sha256:55cdca1740b7bcfc1dc207744bd280e1ff2b7829475185745e1b5d19c3e42f97
 AS jdk8
+FROM 
eclipse-temurin:11-jdk-noble@sha256:82b78cb38df84009971601d16667cd1af118c281a79ae5064bf42ab8279d9f77
 AS jdk11
+FROM 
eclipse-temurin:17-jdk-noble@sha256:fb79620c3f6ee8f1c7530a8dc4fd49e3b410bcef037694ad4858a1553bac4170
 AS jdk17
+
 FROM 
maven:3.9-eclipse-temurin-21@sha256:99e61abcff91a9b1333463bd8451fb18495d6eba9250ac66a338b518f8278320
 
 COPY --from=node /usr/local/ /usr/local/
+COPY --from=jdk8 /opt/java/openjdk/ /opt/java/jdk8/
+COPY --from=jdk11 /opt/java/openjdk/ /opt/java/jdk11/
+COPY --from=jdk17 /opt/java/openjdk/ /opt/java/jdk17/
 
 RUN apt-get update \
-    && apt-get install -y --no-install-recommends bash ca-certificates curl 
git python3 ripgrep \
-    && rm -rf /var/lib/apt/lists/*
+    && apt-get install -y --no-install-recommends bash ca-certificates curl 
fd-find git python3 ripgrep \
+    && rm -rf /var/lib/apt/lists/* \
+    && ln -s /usr/bin/fdfind /usr/local/bin/fd
 
 RUN npm install --global --ignore-scripts --no-audit --no-fund \
     @earendil-works/[email protected]
 
-RUN printf '#!/bin/sh\nexec mvn "$@"\n' > /usr/local/bin/mvn21 \
-    && chmod +x /usr/local/bin/mvn21
+RUN for version in 8 11 17 21; do \
+      home="/opt/java/jdk$version"; \
+      if [ "$version" = 21 ]; then home=/opt/java/openjdk; fi; \
+      printf '#!/bin/sh\nexport JAVA_HOME=%s\nexport 
PATH="$JAVA_HOME/bin:$PATH"\nexec /usr/share/maven/bin/mvn "$@"\n' "$home" \
+        > "/usr/local/bin/mvn$version"; \
+      chmod +x "/usr/local/bin/mvn$version"; \
+    done
 
 # The Maven entrypoint writes to a root-owned home; initialize a private home
 # in run-pi.sh instead so arbitrary Jenkins executor UIDs can run the image.
diff --git a/resources/org/apache/sling/jenkins/llmao/run-pi.sh 
b/resources/org/apache/sling/jenkins/llmao/run-pi.sh
index a964950..bb867ff 100644
--- a/resources/org/apache/sling/jenkins/llmao/run-pi.sh
+++ b/resources/org/apache/sling/jenkins/llmao/run-pi.sh
@@ -26,6 +26,7 @@ export PI_OFFLINE=1 PI_SKIP_VERSION_CHECK=1 PI_TELEMETRY=0
 export GIT_OPTIONAL_LOCKS=0
 export MAVEN_CONFIG="$HOME/.m2"
 export MAVEN_OPTS="-Duser.home=$HOME"
+export MAVEN_ARGS='-B -ntp'
 mkdir -p "$HOME" "$PI_CODING_AGENT_DIR"
 cp /inputs/models.json /inputs/settings.json "$PI_CODING_AGENT_DIR/"
 git config --global --add safe.directory /workspace
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index e30d4fc..eba66ca 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -205,7 +205,7 @@ def runLlmaoOnlyBuild(def globalConfig, Map params) {
                 ).trim()
                 withEnv([
                     "LLMAO_CONTAINER=${containerName}",
-                    'LLMAO_IMAGE=sling-llmao-pi:1.1.0-maven21-99e61abc',
+                    'LLMAO_IMAGE=sling-llmao-pi:1.1.0-jdks8-21-v2',
                     "LLMAO_MODEL=${llmaoConfig.llmaoModel}",
                     "LLMAO_WORKSPACE=${projectWorkspace}"
                 ]) {
@@ -220,7 +220,7 @@ def runLlmaoOnlyBuild(def globalConfig, Map params) {
                             dir('inputs') {
                                 writeFile file: 'run-pi.sh', text: 
libraryResource('org/apache/sling/jenkins/llmao/run-pi.sh')
                                 writeFile file: 'tool-output-logger.mjs', 
text: libraryResource('org/apache/sling/jenkins/llmao/tool-output-logger.mjs')
-                                writeFile file: 'system-prompt.txt', text: 
'You are a coding assistant working on the checked-out project. Follow the 
relevant supplied Apache Sling skills; use update-sling-parent-pom for parent 
POM upgrades. Complete the requested update and its required verification. Do 
not stage, unstage, commit, push, switch branches, or change Git metadata. 
Respond with exactly SUCCESS if the update and verification succeeded, or 
FAILURE otherwise. Do not include pun [...]
+                                writeFile file: 'system-prompt.txt', text: 
'You are a coding assistant working on the checked-out project. Follow the 
relevant supplied Apache Sling skills; use update-sling-parent-pom for parent 
POM upgrades. Complete the requested update and its required verification. Java 
21 is the default; mvn8, mvn11, mvn17, and mvn21 run Maven with the 
corresponding JDK. Do not stage, unstage, commit, push, switch branches, or 
change Git metadata. Respond with exactl [...]
                                 writeFile file: 'prompt_input.txt', text: 
contextData, encoding: 'UTF-8'
                                 writeJSON file: 'models.json', json: [
                                     providers: [llmao: [

Reply via email to