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
commit c6deff05ff30bd1a6fecdfa7107d24a4939afbae Author: Robert Munteanu <[email protected]> AuthorDate: Mon Oct 12 19:38:16 2026 +0100 feat: only try updating to the last parent pom version This should simplify execution and keeps the docker image slim. --- README.md | 10 +++++----- resources/org/apache/sling/jenkins/llmao/Dockerfile | 17 +++-------------- vars/slingOsgiBundleBuild.groovy | 4 ++-- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 70bdcfd..eaefdf0 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ slingOsgiBundleBuild( llmaoOnly: true, llmaoRebuildFrequency: '', // Manual only; switch to '@weekly' for scheduling. llmaoModel: 'gemma4-26b', - llmaoInput: 'Update this project to the next parent pom verion and respond only with SUCCESS or FAILURE' + llmaoInput: 'Update this project to the most recent released parent POM version and respond only with SUCCESS or FAILURE' ) ``` @@ -115,9 +115,9 @@ These are **observed token totals**, not billing records: interrupted requests a 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-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 [...] +The library builds `sling-llmao-pi:1.1.0-jdk21-v3` 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 only JDK 21, plus 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 runs. An uncached build need [...] -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. +Java 21 is the only available JDK. Both `mvn` and the `mvn21` wrapper use it, and Pi is told to use these commands. No `mvn8`, `mvn11`, or `mvn17` wrappers are installed. `MAVEN_ARGS='-B -ntp'` applies batch mode and suppresses download-progress output for both Maven commands, 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 writable project and usage-report mounts 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 minu [...] @@ -135,8 +135,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-jdks8-21-v2 resources/org/apache/sling/jenkins/llmao +docker build --tag sling-llmao-pi:1.1.0-jdk21-v3 resources/org/apache/sling/jenkins/llmao python3 tests/pi-docker.py --integration ``` -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, multi-turn token/cache totals, retries, missing/zero usage, cancellation, and container removal. It uses only disposable fixture projects and does not call LLMAO or update the real project. A real Je [...] +The integration test exercises skill discovery/loading, real read/edit/write/find/shell tool calls, Java 21 with both Maven commands and the absence of older JDKs/wrappers, Maven batch-mode settings, environment-token authentication, model selection, tracked/new-file diffs, SUCCESS/FAILURE mapping, malformed/empty answers, API errors, multi-turn token/cache totals, retries, missing/zero usage, cancellation, and container removal. It uses only disposable fixture projects and does not call [...] diff --git a/resources/org/apache/sling/jenkins/llmao/Dockerfile b/resources/org/apache/sling/jenkins/llmao/Dockerfile index d437c12..461637e 100644 --- a/resources/org/apache/sling/jenkins/llmao/Dockerfile +++ b/resources/org/apache/sling/jenkins/llmao/Dockerfile @@ -17,16 +17,9 @@ 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 fd-find git python3 ripgrep \ @@ -36,13 +29,9 @@ RUN apt-get update \ RUN npm install --global --ignore-scripts --no-audit --no-fund \ @earendil-works/[email protected] -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 +RUN printf '#!/bin/sh\nexport JAVA_HOME=/opt/java/openjdk\nexport PATH="$JAVA_HOME/bin:$PATH"\nexec /usr/share/maven/bin/mvn "$@"\n' \ + > /usr/local/bin/mvn21 \ + && chmod +x /usr/local/bin/mvn21 # 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/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy index 44bdc58..90006ce 100644 --- a/vars/slingOsgiBundleBuild.groovy +++ b/vars/slingOsgiBundleBuild.groovy @@ -207,7 +207,7 @@ def runLlmaoOnlyBuild(def globalConfig, Map params) { def reportDirectory = "outputs/${containerName}" withEnv([ "LLMAO_CONTAINER=${containerName}", - 'LLMAO_IMAGE=sling-llmao-pi:1.1.0-jdks8-21-v2', + 'LLMAO_IMAGE=sling-llmao-pi:1.1.0-jdk21-v3', "LLMAO_MODEL=${llmaoConfig.llmaoModel}", "LLMAO_WORKSPACE=${projectWorkspace}", "LLMAO_REPORT_DIR=${pwd()}/${reportDirectory}" @@ -224,7 +224,7 @@ def runLlmaoOnlyBuild(def globalConfig, Map params) { 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: 'usage-reporter.mjs', text: libraryResource('org/apache/sling/jenkins/llmao/usage-reporter.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. 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: '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 upgrades to the most recent released parent POM version. Complete the requested update and its required verification. Java 21 is the only available JDK; mvn and mvn21 both run Maven with Java 21. Do not stage, unstage, commit, push, switch branches, or change Git metadat [...] writeFile file: 'prompt_input.txt', text: contextData, encoding: 'UTF-8' writeJSON file: 'models.json', json: [ providers: [llmao: [
