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 3b2f798  fix: add missing docker/pi resources
3b2f798 is described below

commit 3b2f7988611c37e148876c73812acd8681e9ccbd
Author: Robert Munteanu <[email protected]>
AuthorDate: Mon Oct 12 17:16:02 2026 +0100

    fix: add missing docker/pi resources
---
 .../org/apache/sling/jenkins/llmao/Dockerfile      | 21 +++++++++++++
 .../org/apache/sling/jenkins/llmao/run-docker.sh   | 32 +++++++++++++++++++
 resources/org/apache/sling/jenkins/llmao/run-pi.sh | 36 ++++++++++++++++++++++
 3 files changed, 89 insertions(+)

diff --git a/resources/org/apache/sling/jenkins/llmao/Dockerfile 
b/resources/org/apache/sling/jenkins/llmao/Dockerfile
new file mode 100644
index 0000000..b6edaee
--- /dev/null
+++ b/resources/org/apache/sling/jenkins/llmao/Dockerfile
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM 
node:24-bookworm-slim@sha256:d6aa754f16b3197301076f047b5def2f02ea1dbbc2ca920407d46d7ec7f87b20
+
+RUN npm install --global --ignore-scripts --no-audit --no-fund \
+    @earendil-works/[email protected]
diff --git a/resources/org/apache/sling/jenkins/llmao/run-docker.sh 
b/resources/org/apache/sling/jenkins/llmao/run-docker.sh
new file mode 100644
index 0000000..ab494bb
--- /dev/null
+++ b/resources/org/apache/sling/jenkins/llmao/run-docker.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set +x
+set -eu
+
+# Docker containers outlive their client process unless explicitly stopped.
+trap 'docker rm --force "$LLMAO_CONTAINER" >/dev/null 2>&1 || true' EXIT HUP 
INT TERM
+
+docker run --rm --init \
+    --name "$LLMAO_CONTAINER" \
+    --user "$(id -u):$(id -g)" \
+    --read-only --tmpfs /tmp:rw,nosuid,nodev,mode=1777 \
+    --env LLMAO_PAT --env LLMAO_MODEL \
+    --mount "type=bind,source=$(pwd)/inputs,target=/inputs,readonly" \
+    --workdir /tmp \
+    "$LLMAO_IMAGE" sh /inputs/run-pi.sh
diff --git a/resources/org/apache/sling/jenkins/llmao/run-pi.sh 
b/resources/org/apache/sling/jenkins/llmao/run-pi.sh
new file mode 100644
index 0000000..f15a58e
--- /dev/null
+++ b/resources/org/apache/sling/jenkins/llmao/run-pi.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set +x
+set -eu
+
+# No host configuration, stored credentials, sessions, or automatic updates.
+export HOME=/tmp/pi-home
+export PI_CODING_AGENT_DIR=/tmp/pi-agent
+export PI_OFFLINE=1 PI_SKIP_VERSION_CHECK=1 PI_TELEMETRY=0
+mkdir -p "$HOME" "$PI_CODING_AGENT_DIR"
+cp /inputs/models.json /inputs/settings.json "$PI_CODING_AGENT_DIR/"
+
+# Print mode emits only the final assistant text to stdout; errors use stderr.
+exec timeout --kill-after=5s 120s pi \
+    --provider llmao --model "$LLMAO_MODEL" \
+    --print --no-tools --no-session \
+    --no-extensions --no-mcp --no-skills --no-prompt-templates \
+    --no-context-files --no-approve \
+    --system-prompt /inputs/system-prompt.txt \
+    < /inputs/prompt_input.txt

Reply via email to