From b14b5349d64210483a4445b43a001f07e3f37ecf Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 14:24:13 -0400 Subject: [PATCH 01/30] Keep post-deploy checks on the app that is supposed to answer. Restart a refused isolation port-forward until the probe deadline, and run the built PR image so intercept traffic can see the original override. Co-authored-by: Cursor --- .../conversion/tekton-dag-vue-fe/Dockerfile | 16 +++-- .../docker-entrypoint-wrap.sh | 3 + .../tekton-dag-vue-fe/nginx.conf.template | 4 +- .../tekton-dag-vue-fe/propagation_proxy.py | 61 ++++++++++++++++++ scripts/isolation_eval/cluster.py | 64 ++++++++++++++----- scripts/isolation_eval/test_cluster.py | 38 ++++++++++- tasks/deploy-intercept-mirrord.yaml | 2 - tasks/deploy-intercept.yaml | 2 - 8 files changed, 161 insertions(+), 29 deletions(-) create mode 100644 sample-repos/conversion/tekton-dag-vue-fe/docker-entrypoint-wrap.sh create mode 100644 sample-repos/conversion/tekton-dag-vue-fe/propagation_proxy.py diff --git a/sample-repos/conversion/tekton-dag-vue-fe/Dockerfile b/sample-repos/conversion/tekton-dag-vue-fe/Dockerfile index 566e9a7..3f90766 100644 --- a/sample-repos/conversion/tekton-dag-vue-fe/Dockerfile +++ b/sample-repos/conversion/tekton-dag-vue-fe/Dockerfile @@ -14,12 +14,20 @@ RUN npm ci COPY . . RUN npm run build -# Serve with nginx. /propagation is proxied to the BFF so curl validation -# (and the SPA) see the original override header hop-to-hop. +# Serve with nginx. /propagation is answered on localhost by +# propagation_proxy.py, which copies the incoming override into the hop +# report and nests the BFF response. FROM nginx:alpine ENV BFF_UPSTREAM=http://release-lifecycle-demo -ENV NGINX_ENVSUBST_FILTER=BFF_UPSTREAM -COPY nginx.conf.template /etc/nginx/templates/default.conf.template +ENV APP_NAME=demo-fe +ENV BAGGAGE_HEADER_NAME=x-dev-session +ENV BAGGAGE_KEY=dev-session +RUN apk add --no-cache python3 +COPY propagation_proxy.py /usr/local/bin/propagation_proxy.py +COPY nginx.conf.template /etc/nginx/conf.d/default.conf +COPY docker-entrypoint-wrap.sh /docker-entrypoint-wrap.sh +RUN chmod +x /docker-entrypoint-wrap.sh COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 +ENTRYPOINT ["/docker-entrypoint-wrap.sh"] CMD ["nginx", "-g", "daemon off;"] diff --git a/sample-repos/conversion/tekton-dag-vue-fe/docker-entrypoint-wrap.sh b/sample-repos/conversion/tekton-dag-vue-fe/docker-entrypoint-wrap.sh new file mode 100644 index 0000000..07d7a54 --- /dev/null +++ b/sample-repos/conversion/tekton-dag-vue-fe/docker-entrypoint-wrap.sh @@ -0,0 +1,3 @@ +#!/bin/sh +python3 /usr/local/bin/propagation_proxy.py & +exec /docker-entrypoint.sh "$@" diff --git a/sample-repos/conversion/tekton-dag-vue-fe/nginx.conf.template b/sample-repos/conversion/tekton-dag-vue-fe/nginx.conf.template index 4347ec8..0b04943 100644 --- a/sample-repos/conversion/tekton-dag-vue-fe/nginx.conf.template +++ b/sample-repos/conversion/tekton-dag-vue-fe/nginx.conf.template @@ -12,12 +12,10 @@ server { add_header Set-Cookie $dev_session_cookie always; location /propagation { - proxy_pass ${BFF_UPSTREAM}; + proxy_pass http://127.0.0.1:8081; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_set_header x-dev-session $http_x_dev_session; - proxy_set_header baggage $http_baggage; proxy_pass_request_headers on; } diff --git a/sample-repos/conversion/tekton-dag-vue-fe/propagation_proxy.py b/sample-repos/conversion/tekton-dag-vue-fe/propagation_proxy.py new file mode 100644 index 0000000..7d005da --- /dev/null +++ b/sample-repos/conversion/tekton-dag-vue-fe/propagation_proxy.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +"""Echo the original override on GET /propagation and nest the BFF hop.""" + +from __future__ import annotations + +import json +import os +import urllib.error +import urllib.request +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer + + +def _env(name: str, default: str = "") -> str: + return os.environ.get(name, default).strip() + + +APP_NAME = _env("APP_NAME", "demo-fe") +HEADER_NAME = _env("BAGGAGE_HEADER_NAME", "x-dev-session") +BAGGAGE_KEY = _env("BAGGAGE_KEY", "dev-session") +BFF_UPSTREAM = _env("BFF_UPSTREAM").rstrip("/") + + +def downstream_hop(session: str) -> list: + if not BFF_UPSTREAM or not session: + return [] + url = BFF_UPSTREAM + "/propagation" + headers = { + HEADER_NAME: session, + "baggage": f"{BAGGAGE_KEY}={session}", + } + req = urllib.request.Request(url, headers=headers) + try: + with urllib.request.urlopen(req, timeout=20) as resp: + payload = resp.read().decode("utf-8", "replace") + return [json.loads(payload)] + except (urllib.error.URLError, TimeoutError, json.JSONDecodeError, ValueError) as exc: + return [{"error": str(exc)}] + + +class Handler(BaseHTTPRequestHandler): + def do_GET(self) -> None: # noqa: N802 + session = self.headers.get(HEADER_NAME, "") or "" + body = json.dumps( + {"app": APP_NAME, "session": session, "hops": downstream_hop(session)} + ).encode() + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def log_message(self, fmt: str, *args: object) -> None: + return + + +def main() -> None: + ThreadingHTTPServer(("127.0.0.1", 8081), Handler).serve_forever() + + +if __name__ == "__main__": + main() diff --git a/scripts/isolation_eval/cluster.py b/scripts/isolation_eval/cluster.py index 67c7109..4b3840a 100644 --- a/scripts/isolation_eval/cluster.py +++ b/scripts/isolation_eval/cluster.py @@ -267,25 +267,51 @@ def _free_port() -> int: return port +def _start_port_forward(ns: str) -> tuple[subprocess.Popen, str]: + port = _free_port() + proc = subprocess.Popen( + ["kubectl", "-n", ns, "port-forward", "svc/entry", f"{port}:80"], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, + ) + return proc, f"http://127.0.0.1:{port}/" + + +def _port_forward_output(proc: subprocess.Popen) -> str: + if proc.stdout is None: + return "" + try: + return proc.stdout.read() or "" + except Exception: + return "" + + def curl_entry(ns: str, header: bool) -> str: """Hit svc/entry via kubectl port-forward. Nested Kind (Cloud Agent Docker-in-Docker) often cannot program ClusterIP iptables (missing xt_statistic). Port-forward goes through the API server to the pod and still exercises the intercept router on that pod. + + kubectl exits on the first refused connection (the router container can + be Ready before Python binds 8080). Restart the forward until the deadline + instead of recording that first refusal as the cell result. """ - port = _free_port() - pf = subprocess.Popen( - ["kubectl", "-n", ns, "port-forward", "svc/entry", f"{port}:80"], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - text=True, - ) - url = f"http://127.0.0.1:{port}/" + deadline = time.time() + 20 last_err = "port-forward never accepted a connection" + saw_dead_forward = False + pf: subprocess.Popen | None = None + url = "" try: - deadline = time.time() + 20 while time.time() < deadline: + if pf is None or pf.poll() is not None: + if pf is not None: + saw_dead_forward = True + out = _port_forward_output(pf) + if out.strip(): + last_err = out + pf, url = _start_port_forward(ns) try: req = urllib.request.Request(url) if header: @@ -295,13 +321,17 @@ def curl_entry(ns: str, header: bool) -> str: except Exception as exc: last_err = str(exc) if pf.poll() is not None: - out = pf.stdout.read() if pf.stdout else "" - return f"probe-error:port-forward:{out or last_err}" + saw_dead_forward = True + out = _port_forward_output(pf) + if out.strip(): + last_err = out time.sleep(0.2) - return f"probe-error:{last_err}" + prefix = "probe-error:port-forward:" if saw_dead_forward else "probe-error:" + return f"{prefix}{last_err}" finally: - pf.terminate() - try: - pf.wait(timeout=5) - except Exception: - pf.kill() + if pf is not None and pf.poll() is None: + pf.terminate() + try: + pf.wait(timeout=5) + except Exception: + pf.kill() diff --git a/scripts/isolation_eval/test_cluster.py b/scripts/isolation_eval/test_cluster.py index d9d2bc5..a1dfe4b 100644 --- a/scripts/isolation_eval/test_cluster.py +++ b/scripts/isolation_eval/test_cluster.py @@ -41,6 +41,7 @@ def test_port_forward_exit_is_probe_error(self) -> None: proc = MagicMock() proc.poll.return_value = 1 proc.stdout = io.StringIO("forward failed\n") + clock = iter([0, 0, 100]) with ( patch("cluster.subprocess.Popen", return_value=proc), @@ -49,10 +50,45 @@ def test_port_forward_exit_is_probe_error(self) -> None: "cluster.urllib.request.urlopen", side_effect=OSError("connection refused"), ), + patch("cluster.time.time", side_effect=lambda: next(clock)), + patch("cluster.time.sleep"), ): out = curl_entry("demo-ns", False) self.assertTrue(out.startswith("probe-error:port-forward:")) - proc.terminate.assert_called() + self.assertIn("forward failed", out) + + def test_port_forward_restarts_after_refused_connection(self) -> None: + dead = MagicMock() + dead.poll.return_value = 1 + dead.stdout = io.StringIO("lost connection to pod\n") + live = MagicMock() + live.poll.return_value = None + live.stdout = io.StringIO("") + + class FakeResp: + def read(self) -> bytes: + return b"pr/inventory-api/app-0\n" + + def __enter__(self) -> "FakeResp": + return self + + def __exit__(self, *args: object) -> None: + return None + + with ( + patch("cluster.subprocess.Popen", side_effect=[dead, live]) as popen, + patch("cluster._free_port", side_effect=[18081, 18082]), + patch( + "cluster.urllib.request.urlopen", + side_effect=[OSError("connection refused"), FakeResp()], + ), + patch("cluster.time.time", return_value=0), + patch("cluster.time.sleep"), + ): + out = curl_entry("demo-ns", False) + self.assertEqual(out, "pr/inventory-api/app-0") + self.assertEqual(popen.call_count, 2) + live.terminate.assert_called() class WaitReadyTests(unittest.TestCase): diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 777d087..9302c90 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -116,8 +116,6 @@ spec: containers: - name: pr-component image: ${IMAGE} - command: ["/bin/sh"] - args: ["-c", "while true; do echo 'PR build for ${APP}'; sleep 30; done"] ports: - containerPort: ${CPORT} env: diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index c46cbc0..f84edff 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -224,8 +224,6 @@ spec: containers: - name: pr-component image: ${IMAGE} - command: ["/bin/sh"] - args: ["-c", "while true; do echo 'PR build for ${APP}'; sleep 30; done"] ports: - containerPort: ${CPORT} env: From 369fdd38451671fb33aa4e3276517a673f9e9368 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 15:02:08 -0400 Subject: [PATCH 02/30] Wait for the intercept before checking the original override. The propagation check was curling the baseline while Telepresence was still starting, and a shallow checkout of main did not move onto the fetched tip. Co-authored-by: Cursor --- tasks/clone-app-repos.yaml | 7 ++++++- tasks/deploy-intercept-mirrord.yaml | 2 +- tasks/deploy-intercept.yaml | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tasks/clone-app-repos.yaml b/tasks/clone-app-repos.yaml index 424ece2..6c7f3e0 100644 --- a/tasks/clone-app-repos.yaml +++ b/tasks/clone-app-repos.yaml @@ -78,7 +78,12 @@ spec: local APP="$1" REPO="$2" REVISION="$3" URL="$4" echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" - (cd "$WORKSPACE/$APP" && git fetch --depth 1 origin "$REVISION" 2>/dev/null && git checkout "$REVISION" 2>/dev/null || true) + if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then + echo "ERROR: could not fetch $REVISION for $APP" >&2 + exit 1 + fi + git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD + echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" echo " Done: $APP" } diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 9302c90..c24de28 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -201,7 +201,7 @@ spec: name: ${CM_NAME} PROXYPOD - kubectl wait --for=condition=Ready "pod/${PROXY_NAME}" --namespace "$NS" --timeout=120s || true + kubectl wait --for=condition=Ready "pod/${PROXY_NAME}" --namespace "$NS" --timeout=120s echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" echo "" diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index f84edff..d7f4b88 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -263,6 +263,16 @@ spec: --namespace "$NS" --timeout=300s echo " Pod ready: $POD_NAME" + echo " Waiting until telepresence reports the intercept is active" + deadline=$((SECONDS + 180)) + until kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null | grep -q "Intercept active for ${APP}!"; do + if [ "$SECONDS" -ge "$deadline" ]; then + echo "ERROR: intercept for ${APP} did not become active" >&2 + kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence >&2 || true + exit 1 + fi + sleep 5 + done echo " Traffic to $APP matching '$INTERCEPT' now routes to PR pod" echo "" From 3e892a57bd9fdeedc2f328bdcc9f3442bba88418 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 15:24:52 -0400 Subject: [PATCH 03/30] Run the Telepresence CLI for intercepts and keep hop JSON. The sidecar image was the traffic agent, so intercept never started, and a nested 404 inside a hop report was treated as a missing /propagation route. Co-authored-by: Cursor --- PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md | 2 +- build-images/Dockerfile.telepresence | 11 +++++++++++ build-images/build-and-push.sh | 2 +- scripts/install-telepresence-traffic-manager.sh | 2 +- tasks/deploy-intercept-mirrord.yaml | 6 +++++- tasks/deploy-intercept.yaml | 15 +++++++++++---- tasks/validate-propagation.yaml | 16 +++++++++++----- 7 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 build-images/Dockerfile.telepresence diff --git a/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md b/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md index a0350fa..9090601 100644 --- a/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md +++ b/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md @@ -36,7 +36,7 @@ For a stack **A → B → C → D** where **C** changed in the PR: - **Intercept header:** `x-dev-session:pr-` (configurable via stack `propagation.header-name`) - **Intercept command:** `telepresence intercept --namespace --port : --http-match
` - **PR pod naming:** `pr--` -- **Telepresence image:** `ghcr.io/telepresenceio/tel2:2.20.0` +- **Telepresence image:** `localhost:5000/tekton-dag-build-telepresence:latest` (CLI). Traffic Manager stays `tel2`, installed separately. ### Source references diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence new file mode 100644 index 0000000..3a34d59 --- /dev/null +++ b/build-images/Dockerfile.telepresence @@ -0,0 +1,11 @@ +# CLI image for in-cluster intercepts. +# ghcr.io/telepresenceio/tel2 is the traffic agent and does not contain +# the telepresence binary the deploy task runs. +FROM bitnami/kubectl:latest + +USER root +ARG TELEPRESENCE_VERSION=2.20.0 +RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ + && chmod +x /usr/local/bin/telepresence \ + && telepresence version +USER 1001 diff --git a/build-images/build-and-push.sh b/build-images/build-and-push.sh index 1e2f1ca..b9a02d5 100755 --- a/build-images/build-and-push.sh +++ b/build-images/build-and-push.sh @@ -52,7 +52,7 @@ build_image() { echo " -> $image" } -TOOLS=(node maven gradle python php mirrord) +TOOLS=(node maven gradle python php mirrord telepresence) echo "=== tekton-dag build images ===" echo " Registry: $REGISTRY" diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index c56cb9f..964bf02 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -59,5 +59,5 @@ kubectl wait --for=condition=Available deployment/traffic-manager -n "$NAMESPACE echo "" echo " Done. Traffic Manager is in namespace '$NAMESPACE'." echo " PR pipeline deploy-intercept pods will use it for intercepts." -echo " (Sidecar image in deploy-intercept task should match; default tel2:2.20.0)" +echo " (Intercept sidecar uses the telepresence CLI image, not the tel2 agent)" echo "" diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index c24de28..216014f 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -141,7 +141,11 @@ spec: # mirrord config: steal traffic matching header, target the deployment (original app) HEADER_FILTER="${INTERCEPT}" - [ -z "$HEADER_FILTER" ] && HEADER_FILTER=".*" + if [ -z "$HEADER_FILTER" ]; then + HEADER_FILTER=".*" + else + HEADER_FILTER=$(printf '%s' "$HEADER_FILTER" | sed 's/: */: /') + fi MIRRORD_CONFIG=$(jq -n \ --arg path "deployment/${APP}" \ --arg ns "$NS" \ diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index d7f4b88..b6a7caf 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -43,7 +43,7 @@ spec: default: "staging" - name: telepresence-image type: string - default: "ghcr.io/telepresenceio/tel2:2.20.0" + default: "localhost:5000/tekton-dag-build-telepresence:latest" workspaces: - name: shared-workspace optional: true @@ -203,6 +203,12 @@ spec: echo " Pod: $POD_NAME" echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" + kubectl create serviceaccount telepresence-intercept -n "$NS" --dry-run=client -o yaml | kubectl apply -f - + kubectl create clusterrolebinding "telepresence-intercept-${NS}" \ + --clusterrole=cluster-admin \ + --serviceaccount="${NS}:telepresence-intercept" \ + --dry-run=client -o yaml | kubectl apply -f - + INTERCEPT_ARGS="" if [ -n "$INTERCEPT" ]; then INTERCEPT_ARGS="telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT} --http-match ${INTERCEPT}" @@ -221,6 +227,7 @@ spec: component: ${APP} managed-by: tekton-job-standardization spec: + serviceAccountName: telepresence-intercept containers: - name: pr-component image: ${IMAGE} @@ -248,13 +255,13 @@ spec: - -c - | set -e - sleep 10 - telepresence helm install - telepresence connect + sleep 2 + telepresence connect --manager-namespace ambassador --namespace ${NS} ${INTERCEPT_ARGS} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: + runAsUser: 0 capabilities: add: [NET_ADMIN] EOF diff --git a/tasks/validate-propagation.yaml b/tasks/validate-propagation.yaml index 0d185f1..a0ba1c9 100644 --- a/tasks/validate-propagation.yaml +++ b/tasks/validate-propagation.yaml @@ -186,12 +186,17 @@ spec: TRACEPARENT="00-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 32)-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 16)-01" fetch_originator() { - curl -s \ + body_file=$(mktemp) + http_code=$(curl -s -o "$body_file" -w "%{http_code}" \ -H "${HEADER_NAME}: ${HEADER_VAL}" \ -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ -H "traceparent: ${TRACEPARENT}" \ --connect-timeout 10 --max-time 60 \ - "$1" 2>/dev/null || echo '{"error":"unreachable"}' + "$1" 2>/dev/null || true) + [ -n "$http_code" ] || http_code="000" + printf '%s' "$http_code" > /tmp/originator-http-code + cat "$body_file" + rm -f "$body_file" } URL="${BASE}/propagation" @@ -200,10 +205,11 @@ spec: echo "" RESULT=$(fetch_originator "$URL") - if echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"' \ - || echo "$RESULT" | grep -qi '404'; then + HTTP_CODE=$(cat /tmp/originator-http-code 2>/dev/null || echo "000") + if [ "$HTTP_CODE" = "404" ] || [ "$HTTP_CODE" = "000" ] \ + || echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then URL="${BASE}/" - echo " /propagation unavailable — retrying $URL" + echo " /propagation unavailable (HTTP $HTTP_CODE) — retrying $URL" RESULT=$(fetch_originator "$URL") fi From 9abde2d22622b9db05574c05bc9f6068d5955068 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 15:40:42 -0400 Subject: [PATCH 04/30] Let the runner create the Telepresence client account. The pipeline account cannot create ServiceAccounts, so the intercept pod never started, and a mirrord proxy that fails to become Ready now prints its logs. Co-authored-by: Cursor --- scripts/run-product-intercept-e2e.sh | 12 ++++++++++++ tasks/deploy-intercept-mirrord.yaml | 13 +++++++------ tasks/deploy-intercept.yaml | 6 ------ 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/scripts/run-product-intercept-e2e.sh b/scripts/run-product-intercept-e2e.sh index c3e967b..1f86619 100755 --- a/scripts/run-product-intercept-e2e.sh +++ b/scripts/run-product-intercept-e2e.sh @@ -201,6 +201,18 @@ verify_pr_evidence() { resolve_api_token start_port_forward +# The pipeline SA cannot create ServiceAccounts. Telepresence connect runs +# inside the PR pod and needs an API client the runner creates here. +if [[ "$INTERCEPT_BACKEND" == "telepresence" ]]; then + kubectl create namespace staging --dry-run=client -o yaml | kubectl apply -f - + kubectl create serviceaccount telepresence-intercept -n staging \ + --dry-run=client -o yaml | kubectl apply -f - + kubectl create clusterrolebinding telepresence-intercept-staging \ + --clusterrole=cluster-admin \ + --serviceaccount=staging:telepresence-intercept \ + --dry-run=client -o yaml | kubectl apply -f - +fi + echo ">>> Trigger bootstrap through authenticated orchestrator API" bootstrap_payload="$(jq -nc --arg stack "stacks/$STACK_FILE" \ '{mode:"bootstrap", stack_file:$stack, git_revision:"main"}')" diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 216014f..36ecac9 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -141,11 +141,7 @@ spec: # mirrord config: steal traffic matching header, target the deployment (original app) HEADER_FILTER="${INTERCEPT}" - if [ -z "$HEADER_FILTER" ]; then - HEADER_FILTER=".*" - else - HEADER_FILTER=$(printf '%s' "$HEADER_FILTER" | sed 's/: */: /') - fi + [ -z "$HEADER_FILTER" ] && HEADER_FILTER=".*" MIRRORD_CONFIG=$(jq -n \ --arg path "deployment/${APP}" \ --arg ns "$NS" \ @@ -205,7 +201,12 @@ spec: name: ${CM_NAME} PROXYPOD - kubectl wait --for=condition=Ready "pod/${PROXY_NAME}" --namespace "$NS" --timeout=120s + if ! kubectl wait --for=condition=Ready "pod/${PROXY_NAME}" --namespace "$NS" --timeout=120s; then + echo "ERROR: mirrord proxy ${PROXY_NAME} did not become Ready" >&2 + kubectl describe "pod/${PROXY_NAME}" -n "$NS" >&2 || true + kubectl logs "pod/${PROXY_NAME}" -n "$NS" >&2 || true + exit 1 + fi echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" echo "" diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index b6a7caf..01c4d02 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -203,12 +203,6 @@ spec: echo " Pod: $POD_NAME" echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" - kubectl create serviceaccount telepresence-intercept -n "$NS" --dry-run=client -o yaml | kubectl apply -f - - kubectl create clusterrolebinding "telepresence-intercept-${NS}" \ - --clusterrole=cluster-admin \ - --serviceaccount="${NS}:telepresence-intercept" \ - --dry-run=client -o yaml | kubectl apply -f - - INTERCEPT_ARGS="" if [ -n "$INTERCEPT" ]; then INTERCEPT_ARGS="telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT} --http-match ${INTERCEPT}" From 6cf6e130b7d906188648e48a428612d21ed62eae Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 15:58:40 -0400 Subject: [PATCH 05/30] Run intercept clients as root with a writable home. The Telepresence sidecar and mirrord proxy were CrashLoopBackOff, so the header never reached the PR pod. Co-authored-by: Cursor --- tasks/deploy-intercept-mirrord.yaml | 7 +++++- tasks/deploy-intercept.yaml | 37 +++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 36ecac9..02166f3 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -181,9 +181,12 @@ spec: - -c - | set -e + export HOME=/tmp echo "Starting mirrord proxy for ${APP} -> ${PR_POD_IP}:${CPORT}" - exec mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} + exec /usr/local/bin/mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} env: + - name: HOME + value: /tmp - name: PR_POD_IP value: "${PR_POD_IP}" - name: CPORT @@ -193,6 +196,8 @@ spec: mountPath: /config readOnly: true securityContext: + runAsUser: 0 + privileged: true capabilities: add: [SYS_ADMIN, SYS_PTRACE, NET_ADMIN] volumes: diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 01c4d02..5da4e8e 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -205,9 +205,9 @@ spec: INTERCEPT_ARGS="" if [ -n "$INTERCEPT" ]; then - INTERCEPT_ARGS="telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT} --http-match ${INTERCEPT}" + INTERCEPT_ARGS="/usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT} --http-match ${INTERCEPT}" else - INTERCEPT_ARGS="telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT}" + INTERCEPT_ARGS="/usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT}" fi cat < /tmp/kubeconfig + export KUBECONFIG=/tmp/kubeconfig + /usr/local/bin/telepresence version + /usr/local/bin/telepresence connect --manager-namespace ambassador ${INTERCEPT_ARGS} echo "Intercept active for ${APP}!" tail -f /dev/null @@ -269,7 +296,9 @@ spec: until kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null | grep -q "Intercept active for ${APP}!"; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 + kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence --previous >&2 || true kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence >&2 || true + kubectl describe "pod/${POD_NAME}" -n "$NS" >&2 || true exit 1 fi sleep 5 From 42b61db3d3c915b294e5b57b50bd4197a947c801 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 16:15:38 -0400 Subject: [PATCH 06/30] Run Telepresence from a privileged client pod. The in-pod sidecar never kept an intercept alive; forward matching traffic to the PR pod IP the same way mirrord does. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 67 ++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 5da4e8e..ed17e4b 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -203,14 +203,12 @@ spec: echo " Pod: $POD_NAME" echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" - INTERCEPT_ARGS="" + HTTP_MATCH="" if [ -n "$INTERCEPT" ]; then - INTERCEPT_ARGS="/usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT} --http-match ${INTERCEPT}" - else - INTERCEPT_ARGS="/usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --port ${CPORT}:${SPORT}" + HTTP_MATCH="--http-match ${INTERCEPT}" fi - cat < /tmp/kubeconfig export KUBECONFIG=/tmp/kubeconfig + mkdir -p /dev/net + [ -c /dev/net/tun ] || mknod /dev/net/tun c 10 200 + echo "telepresence version:" /usr/local/bin/telepresence version - /usr/local/bin/telepresence connect --manager-namespace ambassador - ${INTERCEPT_ARGS} + echo "connecting to traffic-manager..." + /usr/local/bin/telepresence connect --manager-namespace ambassador --mapped-namespaces ${NS} + echo "creating intercept ${APP} -> ${PR_POD_IP}:${CPORT}..." + /usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --address ${PR_POD_IP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: runAsUser: 0 + privileged: true capabilities: - add: [NET_ADMIN] - EOF - - kubectl wait --for=condition=Ready "pod/${POD_NAME}" \ - --namespace "$NS" --timeout=300s + add: [NET_ADMIN, NET_RAW] + CLIENTPOD - echo " Pod ready: $POD_NAME" echo " Waiting until telepresence reports the intercept is active" deadline=$((SECONDS + 180)) - until kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null | grep -q "Intercept active for ${APP}!"; do + until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null | grep -q "Intercept active for ${APP}!"; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 - kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence --previous >&2 || true - kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence >&2 || true - kubectl describe "pod/${POD_NAME}" -n "$NS" >&2 || true + echo "=== client status ===" >&2 + kubectl get pod "${CLIENT_NAME}" -n "$NS" -o jsonpath='{.status.phase} {.status.containerStatuses}' >&2 || true + echo >&2 + echo "=== previous client logs ===" >&2 + kubectl logs "pod/${CLIENT_NAME}" -n "$NS" --previous >&2 || true + echo "=== current client logs ===" >&2 + kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true exit 1 fi sleep 5 From e72e6cfa4f1abe63ffec2c8c077670b0c3c25c40 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 16:32:06 -0400 Subject: [PATCH 07/30] Drop the unknown Telepresence --http-match flag. OSS 2.20 connected, then rejected that flag; a TCP intercept is enough for the headered product-path probe. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index ed17e4b..4a98c84 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -203,10 +203,9 @@ spec: echo " Pod: $POD_NAME" echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" + # OSS 2.20 has no HTTP filter flags (--http-match is unknown). + # A TCP intercept still delivers headered requests to the PR pod. HTTP_MATCH="" - if [ -n "$INTERCEPT" ]; then - HTTP_MATCH="--http-match ${INTERCEPT}" - fi cat < Date: Sun, 27 Sep 2026 18:09:23 -0400 Subject: [PATCH 08/30] Filter Telepresence intercepts by the session header. OSS 2.20 could only steal the whole port. 2.25 --http-header keeps unmatched traffic on the baseline service. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 2 +- scripts/install-telepresence-traffic-manager.sh | 4 ++-- tasks/deploy-intercept.yaml | 14 ++++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index 3a34d59..0e94dc7 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -4,7 +4,7 @@ FROM bitnami/kubectl:latest USER root -ARG TELEPRESENCE_VERSION=2.20.0 +ARG TELEPRESENCE_VERSION=2.25.0 RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ && telepresence version diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index 964bf02..9bfe61e 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -2,11 +2,11 @@ # Install Telepresence Traffic Manager in the cluster so PR pipeline intercepts can work. # Run after the cluster is up (e.g. after kind-with-registry.sh). Requires helm and kubectl. # Usage: ./install-telepresence-traffic-manager.sh [--version VERSION] -# Example: ./install-telepresence-traffic-manager.sh --version 2.20.0 +# Example: ./install-telepresence-traffic-manager.sh --version 2.25.0 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.20.0}" +TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.25.0}" NAMESPACE="${TELEPRESENCE_NAMESPACE:-ambassador}" CHART_OCI="oci://ghcr.io/telepresenceio/telepresence-oss" diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 4a98c84..f0a339a 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -203,9 +203,12 @@ spec: echo " Pod: $POD_NAME" echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" - # OSS 2.20 has no HTTP filter flags (--http-match is unknown). - # A TCP intercept still delivers headered requests to the PR pod. - HTTP_MATCH="" + if [ -z "$INTERCEPT" ]; then + echo "ERROR: intercept header is required so unmatched traffic stays on baseline" >&2 + exit 1 + fi + HTTP_HEADER="${INTERCEPT%%:*}=${INTERCEPT#*:}" + HTTP_MATCH="--http-header '${HTTP_HEADER}'" cat </dev/null | grep -q "Intercept active for ${APP}!"; do + until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ + | grep -q "Intercept active for ${APP}!" \ + && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ + | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 echo "=== client status ===" >&2 From 27bfe0e9a081d9fad7943b37dbb6f302c81be720 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 18:25:11 -0400 Subject: [PATCH 09/30] Drop --namespace from the Telepresence 2.25 intercept. Connect already pins the namespace; the intercept command rejected that flag. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index f0a339a..4e68fcf 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -308,7 +308,7 @@ spec: echo "connecting to traffic-manager..." /usr/local/bin/telepresence connect --manager-namespace ambassador --mapped-namespaces ${NS} echo "creating intercept ${APP} -> ${PR_POD_IP}:${CPORT}..." - /usr/local/bin/telepresence intercept ${APP} --namespace ${NS} --address ${PR_POD_IP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} + /usr/local/bin/telepresence intercept ${APP} --address ${PR_POD_IP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: From 2fcd53d2b8a824c41b1a9be9126d48e320bacbc3 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 18:41:51 -0400 Subject: [PATCH 10/30] Deliver header-matched traffic to localhost on the PR pod. The separate client forwarded to the PR pod IP through the Telepresence tun and the headered curl got HTTP 000. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 47 ++++++++++--------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 4e68fcf..13935f7 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -221,6 +221,7 @@ spec: component: ${APP} managed-by: tekton-job-standardization spec: + serviceAccountName: telepresence-intercept containers: - name: pr-component image: ${IMAGE} @@ -241,28 +242,6 @@ spec: value: "${DOWNSTREAM_URL}" - name: BFF_UPSTREAM value: "${DOWNSTREAM_URL}" - PRPOD - - kubectl wait --for=condition=Ready "pod/${POD_NAME}" \ - --namespace "$NS" --timeout=300s - PR_POD_IP=$(kubectl get pod "$POD_NAME" -n "$NS" -o jsonpath='{.status.podIP}') - echo " Pod ready: $POD_NAME (IP: $PR_POD_IP)" - - CLIENT_NAME="tp-client-${APP}-$(date +%s)" - echo " Deploying telepresence client: $CLIENT_NAME" - cat < ${PR_POD_IP}:${CPORT}..." - /usr/local/bin/telepresence intercept ${APP} --address ${PR_POD_IP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} + echo "creating intercept ${APP} on localhost:${CPORT}..." + /usr/local/bin/telepresence intercept ${APP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: @@ -316,23 +295,23 @@ spec: privileged: true capabilities: add: [NET_ADMIN, NET_RAW] - CLIENTPOD + PRPOD + kubectl wait --for=condition=Ready "pod/${POD_NAME}" \ + --namespace "$NS" --timeout=300s + echo " Pod ready: $POD_NAME" echo " Waiting until telepresence reports the intercept is active" deadline=$((SECONDS + 180)) - until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ + until kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null \ | grep -q "Intercept active for ${APP}!" \ - && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ + && kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null \ | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 - echo "=== client status ===" >&2 - kubectl get pod "${CLIENT_NAME}" -n "$NS" -o jsonpath='{.status.phase} {.status.containerStatuses}' >&2 || true - echo >&2 - echo "=== previous client logs ===" >&2 - kubectl logs "pod/${CLIENT_NAME}" -n "$NS" --previous >&2 || true - echo "=== current client logs ===" >&2 - kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true + echo "=== previous sidecar logs ===" >&2 + kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence --previous >&2 || true + echo "=== current sidecar logs ===" >&2 + kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence >&2 || true exit 1 fi sleep 5 From abf491a0a5bc9ef033a91c917c89af1bbdb8746b Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 18:57:22 -0400 Subject: [PATCH 11/30] Forward Telepresence HTTP intercepts through a free local port. Headered curls were hanging on port 80; 18080:http plus socat keeps the VPN off the app listener. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 4 +++- tasks/deploy-intercept.yaml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index 0e94dc7..0df212c 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -5,7 +5,9 @@ FROM bitnami/kubectl:latest USER root ARG TELEPRESENCE_VERSION=2.25.0 +RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ - && telepresence version + && telepresence version \ + && socat -V USER 1001 diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 13935f7..8d04b47 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -286,8 +286,10 @@ spec: /usr/local/bin/telepresence version echo "connecting to traffic-manager..." /usr/local/bin/telepresence connect --manager-namespace ambassador --mapped-namespaces ${NS} - echo "creating intercept ${APP} on localhost:${CPORT}..." - /usr/local/bin/telepresence intercept ${APP} --port ${CPORT}:${SPORT} ${HTTP_MATCH} + echo "forwarding localhost:18080 -> 127.0.0.1:${CPORT}" + socat TCP-LISTEN:18080,fork,reuseaddr TCP:127.0.0.1:${CPORT} & + echo "creating intercept ${APP} on localhost:18080 (http)..." + /usr/local/bin/telepresence intercept ${APP} --port 18080:http ${HTTP_MATCH} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: From 4f0bc9e6ef0750bd966644a53cafcacb33307496 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 19:13:16 -0400 Subject: [PATCH 12/30] Force the Telepresence agent to speak HTTP/1. Header filters were matching, then the http2 probe left nginx hangs as curl HTTP 000. Co-authored-by: Cursor --- scripts/install-telepresence-traffic-manager.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index 9bfe61e..d41be84 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -41,16 +41,15 @@ echo "==============================================" # environments with "mkdir /root/snap: permission denied"; then run this script with # full permissions or install helm without snap (e.g. get.helm.sh). kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f - +# http2Probe hangs nginx/HTTP1 apps on headered intercepts (curl HTTP 000). +HELM_COMMON=(--namespace "$NAMESPACE" --version "$TELEPRESENCE_VERSION" + --set agent.appProtocolStrategy=http) if helm status traffic-manager -n "$NAMESPACE" >/dev/null 2>&1; then echo " Upgrading existing traffic-manager..." - helm upgrade --namespace "$NAMESPACE" --reuse-values \ - --version "$TELEPRESENCE_VERSION" \ - traffic-manager "$CHART_OCI" + helm upgrade "${HELM_COMMON[@]}" traffic-manager "$CHART_OCI" else echo " Installing traffic-manager..." - helm install --create-namespace --namespace "$NAMESPACE" \ - --version "$TELEPRESENCE_VERSION" \ - traffic-manager "$CHART_OCI" + helm install --create-namespace "${HELM_COMMON[@]}" traffic-manager "$CHART_OCI" fi echo " Waiting for Traffic Manager to be ready..." From 144b2d236fff865b3a03e55de59ae5bf0ecbe8ea Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 19:27:31 -0400 Subject: [PATCH 13/30] Revert the invalid Telepresence helm protocol setting. The 2.25 chart rejects agent.appProtocolStrategy, so the traffic manager never installed. Co-authored-by: Cursor --- scripts/install-telepresence-traffic-manager.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index d41be84..9bfe61e 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -41,15 +41,16 @@ echo "==============================================" # environments with "mkdir /root/snap: permission denied"; then run this script with # full permissions or install helm without snap (e.g. get.helm.sh). kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f - -# http2Probe hangs nginx/HTTP1 apps on headered intercepts (curl HTTP 000). -HELM_COMMON=(--namespace "$NAMESPACE" --version "$TELEPRESENCE_VERSION" - --set agent.appProtocolStrategy=http) if helm status traffic-manager -n "$NAMESPACE" >/dev/null 2>&1; then echo " Upgrading existing traffic-manager..." - helm upgrade "${HELM_COMMON[@]}" traffic-manager "$CHART_OCI" + helm upgrade --namespace "$NAMESPACE" --reuse-values \ + --version "$TELEPRESENCE_VERSION" \ + traffic-manager "$CHART_OCI" else echo " Installing traffic-manager..." - helm install --create-namespace "${HELM_COMMON[@]}" traffic-manager "$CHART_OCI" + helm install --create-namespace --namespace "$NAMESPACE" \ + --version "$TELEPRESENCE_VERSION" \ + traffic-manager "$CHART_OCI" fi echo " Waiting for Traffic Manager to be ready..." From 5bc43ea11d1210dcefdbbe78c354437780550bdb Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 19:28:33 -0400 Subject: [PATCH 14/30] Bump Telepresence to 2.32 so header intercepts speak HTTP/1. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 2 +- scripts/install-telepresence-traffic-manager.sh | 4 ++-- tasks/deploy-intercept.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index 0df212c..33526f1 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -4,7 +4,7 @@ FROM bitnami/kubectl:latest USER root -ARG TELEPRESENCE_VERSION=2.25.0 +ARG TELEPRESENCE_VERSION=2.32.1 RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index 9bfe61e..d5b5333 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -2,11 +2,11 @@ # Install Telepresence Traffic Manager in the cluster so PR pipeline intercepts can work. # Run after the cluster is up (e.g. after kind-with-registry.sh). Requires helm and kubectl. # Usage: ./install-telepresence-traffic-manager.sh [--version VERSION] -# Example: ./install-telepresence-traffic-manager.sh --version 2.25.0 +# Example: ./install-telepresence-traffic-manager.sh --version 2.32.1 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.25.0}" +TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.32.1}" NAMESPACE="${TELEPRESENCE_NAMESPACE:-ambassador}" CHART_OCI="oci://ghcr.io/telepresenceio/telepresence-oss" diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 8d04b47..70871aa 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -288,8 +288,8 @@ spec: /usr/local/bin/telepresence connect --manager-namespace ambassador --mapped-namespaces ${NS} echo "forwarding localhost:18080 -> 127.0.0.1:${CPORT}" socat TCP-LISTEN:18080,fork,reuseaddr TCP:127.0.0.1:${CPORT} & - echo "creating intercept ${APP} on localhost:18080 (http)..." - /usr/local/bin/telepresence intercept ${APP} --port 18080:http ${HTTP_MATCH} + echo "creating intercept ${APP} on localhost:18080..." + /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: From 1e8093ab73b8adc03fbacd8af5b50ec413c7874f Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 19:59:11 -0400 Subject: [PATCH 15/30] Run Telepresence 2.32 intercepts from a separate client pod. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 60 +++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 70871aa..334b55f 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -221,7 +221,6 @@ spec: component: ${APP} managed-by: tekton-job-standardization spec: - serviceAccountName: telepresence-intercept containers: - name: pr-component image: ${IMAGE} @@ -242,6 +241,28 @@ spec: value: "${DOWNSTREAM_URL}" - name: BFF_UPSTREAM value: "${DOWNSTREAM_URL}" + PRPOD + + kubectl wait --for=condition=Ready "pod/${POD_NAME}" \ + --namespace "$NS" --timeout=300s + PR_POD_IP=$(kubectl get pod "$POD_NAME" -n "$NS" -o jsonpath='{.status.podIP}') + echo " Pod ready: $POD_NAME (IP: $PR_POD_IP)" + + CLIENT_NAME="tp-client-${APP}-$(date +%s)" + echo " Deploying telepresence client: $CLIENT_NAME" + cat < 127.0.0.1:${CPORT}" - socat TCP-LISTEN:18080,fork,reuseaddr TCP:127.0.0.1:${CPORT} & - echo "creating intercept ${APP} on localhost:18080..." - /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext + echo "waiting for telepresence daemons..." + i=0 + until /usr/local/bin/telepresence status 2>/dev/null | grep -qiE 'Status[[:space:]]*:[[:space:]]*Connected|Connected to context'; do + i=\$((i+1)) + if [ "\$i" -gt 30 ]; then + echo "telepresence status after connect:" + /usr/local/bin/telepresence status || true + break + fi + sleep 2 + done + echo "creating intercept ${APP} -> ${PR_POD_IP}:${CPORT}..." + /usr/local/bin/telepresence intercept ${APP} --address ${PR_POD_IP} --port ${CPORT} ${HTTP_MATCH} --plaintext echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: @@ -297,23 +327,23 @@ spec: privileged: true capabilities: add: [NET_ADMIN, NET_RAW] - PRPOD + CLIENTPOD - kubectl wait --for=condition=Ready "pod/${POD_NAME}" \ - --namespace "$NS" --timeout=300s - echo " Pod ready: $POD_NAME" echo " Waiting until telepresence reports the intercept is active" deadline=$((SECONDS + 180)) - until kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null \ + until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ | grep -q "Intercept active for ${APP}!" \ - && kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence 2>/dev/null \ + && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 - echo "=== previous sidecar logs ===" >&2 - kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence --previous >&2 || true - echo "=== current sidecar logs ===" >&2 - kubectl logs "pod/${POD_NAME}" -n "$NS" -c telepresence >&2 || true + echo "=== client status ===" >&2 + kubectl get pod "${CLIENT_NAME}" -n "$NS" -o jsonpath='{.status.phase} {.status.containerStatuses}' >&2 || true + echo >&2 + echo "=== previous client logs ===" >&2 + kubectl logs "pod/${CLIENT_NAME}" -n "$NS" --previous >&2 || true + echo "=== current client logs ===" >&2 + kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true exit 1 fi sleep 5 From 011ac2d8418040c67d399b7dc4ef6a7f5282ca59 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 20:08:23 -0400 Subject: [PATCH 16/30] Deliver headered Telepresence traffic off the TUN to the PR pod. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 334b55f..dfc141f 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -306,7 +306,7 @@ spec: echo "telepresence version:" /usr/local/bin/telepresence version echo "connecting to traffic-manager..." - /usr/local/bin/telepresence connect --manager-namespace ambassador --mapped-namespaces ${NS} + /usr/local/bin/telepresence connect --manager-namespace ambassador --namespace ${NS} --mapped-namespaces ${NS} --never-proxy ${PR_POD_IP}/32 echo "waiting for telepresence daemons..." i=0 until /usr/local/bin/telepresence status 2>/dev/null | grep -qiE 'Status[[:space:]]*:[[:space:]]*Connected|Connected to context'; do @@ -318,8 +318,10 @@ spec: fi sleep 2 done - echo "creating intercept ${APP} -> ${PR_POD_IP}:${CPORT}..." - /usr/local/bin/telepresence intercept ${APP} --address ${PR_POD_IP} --port ${CPORT} ${HTTP_MATCH} --plaintext + echo "forwarding localhost:18080 -> ${PR_POD_IP}:${CPORT} (never-proxy, no TUN hairpin)" + socat TCP-LISTEN:18080,fork,reuseaddr,bind=127.0.0.1 TCP:${PR_POD_IP}:${CPORT} & + echo "creating intercept ${APP} on localhost:18080..." + /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: From 766e00d6753a487ef0378553c6e0091d110d51bb Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 20:15:29 -0400 Subject: [PATCH 17/30] Keep header intercepts on Telepresence 2.25, which can create them. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 2 +- scripts/install-telepresence-traffic-manager.sh | 4 ++-- tasks/deploy-intercept.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index 33526f1..0df212c 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -4,7 +4,7 @@ FROM bitnami/kubectl:latest USER root -ARG TELEPRESENCE_VERSION=2.32.1 +ARG TELEPRESENCE_VERSION=2.25.0 RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh index d5b5333..9bfe61e 100755 --- a/scripts/install-telepresence-traffic-manager.sh +++ b/scripts/install-telepresence-traffic-manager.sh @@ -2,11 +2,11 @@ # Install Telepresence Traffic Manager in the cluster so PR pipeline intercepts can work. # Run after the cluster is up (e.g. after kind-with-registry.sh). Requires helm and kubectl. # Usage: ./install-telepresence-traffic-manager.sh [--version VERSION] -# Example: ./install-telepresence-traffic-manager.sh --version 2.32.1 +# Example: ./install-telepresence-traffic-manager.sh --version 2.25.0 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.32.1}" +TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.25.0}" NAMESPACE="${TELEPRESENCE_NAMESPACE:-ambassador}" CHART_OCI="oci://ghcr.io/telepresenceio/telepresence-oss" diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index dfc141f..043e546 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -321,7 +321,7 @@ spec: echo "forwarding localhost:18080 -> ${PR_POD_IP}:${CPORT} (never-proxy, no TUN hairpin)" socat TCP-LISTEN:18080,fork,reuseaddr,bind=127.0.0.1 TCP:${PR_POD_IP}:${CPORT} & echo "creating intercept ${APP} on localhost:18080..." - /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext + /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} echo "Intercept active for ${APP}!" tail -f /dev/null securityContext: From aaf17a309b9ff9346a8cb32ef9786046f8e22155 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 20:47:37 -0400 Subject: [PATCH 18/30] Route Telepresence TCP intercepts by session header in-cluster. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 9 ++- build-images/tp-header-router.py | 90 ++++++++++++++++++++++++++++ tasks/deploy-intercept.yaml | 33 ++++++++-- 3 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 build-images/tp-header-router.py diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index 0df212c..d5766ef 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -5,9 +5,12 @@ FROM bitnami/kubectl:latest USER root ARG TELEPRESENCE_VERSION=2.25.0 -RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) -RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ +RUN install_packages socat python3 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat python3 && rm -rf /var/lib/apt/lists/*) +COPY tp-header-router.py /usr/local/bin/tp-header-router +RUN chmod +x /usr/local/bin/tp-header-router \ + && curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ && telepresence version \ - && socat -V + && socat -V \ + && python3 -m py_compile /usr/local/bin/tp-header-router USER 1001 diff --git a/build-images/tp-header-router.py b/build-images/tp-header-router.py new file mode 100644 index 0000000..7d6986f --- /dev/null +++ b/build-images/tp-header-router.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +"""Route a Telepresence TCP intercept by session header. + +Matching requests go to the PR pod. Everything else goes to the live +app (typically via kubectl port-forward so we do not hairpin the agent). +""" +from __future__ import annotations + +import os +import socket +import sys +import threading + +LISTEN = ("127.0.0.1", int(os.environ.get("ROUTER_PORT", "18080"))) +PR = (os.environ["PR_HOST"], int(os.environ["PR_PORT"])) +LIVE = (os.environ.get("LIVE_HOST", "127.0.0.1"), int(os.environ.get("LIVE_PORT", "18081"))) +HEADER_NAME = os.environ["HEADER_NAME"].lower().encode() +HEADER_VALUE = os.environ["HEADER_VALUE"].encode() + + +def header_match(buf: bytes) -> bool: + head = buf.split(b"\r\n\r\n", 1)[0] + for line in head.split(b"\r\n")[1:]: + if b":" not in line: + continue + key, value = line.split(b":", 1) + if key.strip().lower() == HEADER_NAME and value.strip() == HEADER_VALUE: + return True + return False + + +def pipe(src: socket.socket, dst: socket.socket) -> None: + try: + while True: + data = src.recv(65536) + if not data: + break + dst.sendall(data) + except OSError: + pass + finally: + try: + dst.shutdown(socket.SHUT_WR) + except OSError: + pass + + +def handle(client: socket.socket) -> None: + buf = b"" + try: + while b"\r\n\r\n" not in buf and len(buf) < 65536: + chunk = client.recv(4096) + if not chunk: + client.close() + return + buf += chunk + dest = PR if header_match(buf) else LIVE + upstream = socket.create_connection(dest, timeout=5) + upstream.sendall(buf) + reply = threading.Thread(target=pipe, args=(upstream, client), daemon=True) + reply.start() + pipe(client, upstream) + reply.join(timeout=120) + except OSError as exc: + print(f"header-router error: {exc}", file=sys.stderr, flush=True) + finally: + try: + client.close() + except OSError: + pass + + +def main() -> None: + srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + srv.bind(LISTEN) + srv.listen(128) + print( + f"header-router listening on {LISTEN[0]}:{LISTEN[1]} " + f"match {HEADER_NAME.decode()}={HEADER_VALUE.decode()} -> {PR[0]}:{PR[1]} " + f"else {LIVE[0]}:{LIVE[1]}", + flush=True, + ) + while True: + client, _ = srv.accept() + threading.Thread(target=handle, args=(client,), daemon=True).start() + + +if __name__ == "__main__": + main() diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index 043e546..d50574a 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -318,11 +318,34 @@ spec: fi sleep 2 done - echo "forwarding localhost:18080 -> ${PR_POD_IP}:${CPORT} (never-proxy, no TUN hairpin)" - socat TCP-LISTEN:18080,fork,reuseaddr,bind=127.0.0.1 TCP:${PR_POD_IP}:${CPORT} & - echo "creating intercept ${APP} on localhost:18080..." - /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} + export PR_HOST=${PR_POD_IP} + export PR_PORT=${CPORT} + export LIVE_HOST=127.0.0.1 + export LIVE_PORT=18081 + export HEADER_NAME=${INTERCEPT%%:*} + export HEADER_VALUE=${INTERCEPT#*:} + export ROUTER_PORT=18080 + echo "starting header router ${HEADER_NAME}=${HEADER_VALUE} -> PR ${PR_POD_IP}:${CPORT} else 127.0.0.1:18081" + /usr/local/bin/tp-header-router & + echo "creating TCP intercept ${APP} on localhost:18080..." + /usr/local/bin/telepresence intercept ${APP} --port 18080 + echo "waiting for ${APP} rollout after agent inject..." + kubectl rollout status "deploy/${APP}" -n ${NS} --timeout=120s || true + LIVE_POD=\$(kubectl get pod -n ${NS} -l app=${APP} --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}') + APP_CONTAINER=\$(kubectl get pod "\$LIVE_POD" -n ${NS} -o jsonpath='{range .spec.containers[*]}{.name}{"\\n"}{end}' | grep -vE '^(traffic-agent|istio-proxy|linkerd-proxy)\$' | head -1) + echo "port-forward live app \$LIVE_POD container \$APP_CONTAINER :${CPORT} -> 127.0.0.1:18081" + kubectl port-forward -n ${NS} --address 127.0.0.1 --container "\$APP_CONTAINER" "pod/\$LIVE_POD" 18081:${CPORT} & + j=0 + until python3 -c 'import socket;s=socket.socket();s.settimeout(1);s.connect(("127.0.0.1",18081));s.close()' 2>/dev/null; do + j=\$((j+1)) + if [ "\$j" -gt 30 ]; then + echo "ERROR: live app port-forward did not become ready" >&2 + exit 1 + fi + sleep 2 + done echo "Intercept active for ${APP}!" + echo "Intercepting HTTP header ${INTERCEPT}" tail -f /dev/null securityContext: runAsUser: 0 @@ -336,7 +359,7 @@ spec: until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ | grep -q "Intercept active for ${APP}!" \ && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ - | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do + | grep -qiE 'header-router listening|Intercepting HTTP header'; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 echo "=== client status ===" >&2 From d37b0b7fe711396630459c00da0b2c1c89e988b9 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 21:07:04 -0400 Subject: [PATCH 19/30] Keep going when Telepresence reports the intercept already exists. Co-authored-by: Cursor --- tasks/deploy-intercept.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index d50574a..c016310 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -328,7 +328,20 @@ spec: echo "starting header router ${HEADER_NAME}=${HEADER_VALUE} -> PR ${PR_POD_IP}:${CPORT} else 127.0.0.1:18081" /usr/local/bin/tp-header-router & echo "creating TCP intercept ${APP} on localhost:18080..." + set +e /usr/local/bin/telepresence intercept ${APP} --port 18080 + irc=\$? + set -e + if [ "\$irc" -ne 0 ]; then + echo "intercept exited \$irc — listing current intercepts" + /usr/local/bin/telepresence list || true + if /usr/local/bin/telepresence list 2>/dev/null | grep -qi "${APP}"; then + echo "continuing with existing intercept for ${APP}" + else + echo "ERROR: intercept failed and ${APP} is not listed" >&2 + exit 1 + fi + fi echo "waiting for ${APP} rollout after agent inject..." kubectl rollout status "deploy/${APP}" -n ${NS} --timeout=120s || true LIVE_POD=\$(kubectl get pod -n ${NS} -l app=${APP} --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}') From 42a6fb2f51bda0088341b8ffa0adea083ca28ef6 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 21:20:56 -0400 Subject: [PATCH 20/30] Send matched Telepresence traffic to the handler in plaintext. Co-authored-by: Cursor --- build-images/Dockerfile.telepresence | 9 +-- build-images/tp-header-router.py | 90 ---------------------------- tasks/deploy-intercept.yaml | 82 +++++++++++++------------ 3 files changed, 46 insertions(+), 135 deletions(-) delete mode 100644 build-images/tp-header-router.py diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence index d5766ef..0df212c 100644 --- a/build-images/Dockerfile.telepresence +++ b/build-images/Dockerfile.telepresence @@ -5,12 +5,9 @@ FROM bitnami/kubectl:latest USER root ARG TELEPRESENCE_VERSION=2.25.0 -RUN install_packages socat python3 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat python3 && rm -rf /var/lib/apt/lists/*) -COPY tp-header-router.py /usr/local/bin/tp-header-router -RUN chmod +x /usr/local/bin/tp-header-router \ - && curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ +RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) +RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ && chmod +x /usr/local/bin/telepresence \ && telepresence version \ - && socat -V \ - && python3 -m py_compile /usr/local/bin/tp-header-router + && socat -V USER 1001 diff --git a/build-images/tp-header-router.py b/build-images/tp-header-router.py deleted file mode 100644 index 7d6986f..0000000 --- a/build-images/tp-header-router.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python3 -"""Route a Telepresence TCP intercept by session header. - -Matching requests go to the PR pod. Everything else goes to the live -app (typically via kubectl port-forward so we do not hairpin the agent). -""" -from __future__ import annotations - -import os -import socket -import sys -import threading - -LISTEN = ("127.0.0.1", int(os.environ.get("ROUTER_PORT", "18080"))) -PR = (os.environ["PR_HOST"], int(os.environ["PR_PORT"])) -LIVE = (os.environ.get("LIVE_HOST", "127.0.0.1"), int(os.environ.get("LIVE_PORT", "18081"))) -HEADER_NAME = os.environ["HEADER_NAME"].lower().encode() -HEADER_VALUE = os.environ["HEADER_VALUE"].encode() - - -def header_match(buf: bytes) -> bool: - head = buf.split(b"\r\n\r\n", 1)[0] - for line in head.split(b"\r\n")[1:]: - if b":" not in line: - continue - key, value = line.split(b":", 1) - if key.strip().lower() == HEADER_NAME and value.strip() == HEADER_VALUE: - return True - return False - - -def pipe(src: socket.socket, dst: socket.socket) -> None: - try: - while True: - data = src.recv(65536) - if not data: - break - dst.sendall(data) - except OSError: - pass - finally: - try: - dst.shutdown(socket.SHUT_WR) - except OSError: - pass - - -def handle(client: socket.socket) -> None: - buf = b"" - try: - while b"\r\n\r\n" not in buf and len(buf) < 65536: - chunk = client.recv(4096) - if not chunk: - client.close() - return - buf += chunk - dest = PR if header_match(buf) else LIVE - upstream = socket.create_connection(dest, timeout=5) - upstream.sendall(buf) - reply = threading.Thread(target=pipe, args=(upstream, client), daemon=True) - reply.start() - pipe(client, upstream) - reply.join(timeout=120) - except OSError as exc: - print(f"header-router error: {exc}", file=sys.stderr, flush=True) - finally: - try: - client.close() - except OSError: - pass - - -def main() -> None: - srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - srv.bind(LISTEN) - srv.listen(128) - print( - f"header-router listening on {LISTEN[0]}:{LISTEN[1]} " - f"match {HEADER_NAME.decode()}={HEADER_VALUE.decode()} -> {PR[0]}:{PR[1]} " - f"else {LIVE[0]}:{LIVE[1]}", - flush=True, - ) - while True: - client, _ = srv.accept() - threading.Thread(target=handle, args=(client,), daemon=True).start() - - -if __name__ == "__main__": - main() diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index c016310..ae1d032 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -318,47 +318,20 @@ spec: fi sleep 2 done - export PR_HOST=${PR_POD_IP} - export PR_PORT=${CPORT} - export LIVE_HOST=127.0.0.1 - export LIVE_PORT=18081 - export HEADER_NAME=${INTERCEPT%%:*} - export HEADER_VALUE=${INTERCEPT#*:} - export ROUTER_PORT=18080 - echo "starting header router ${HEADER_NAME}=${HEADER_VALUE} -> PR ${PR_POD_IP}:${CPORT} else 127.0.0.1:18081" - /usr/local/bin/tp-header-router & - echo "creating TCP intercept ${APP} on localhost:18080..." - set +e - /usr/local/bin/telepresence intercept ${APP} --port 18080 - irc=\$? - set -e - if [ "\$irc" -ne 0 ]; then - echo "intercept exited \$irc — listing current intercepts" + echo "forwarding localhost:18080 -> ${PR_POD_IP}:${CPORT} (never-proxy, no TUN hairpin)" + socat TCP-LISTEN:18080,fork,reuseaddr,bind=127.0.0.1 TCP:${PR_POD_IP}:${CPORT} & + echo "creating intercept ${APP} on localhost:18080 (plaintext handler)..." + if ! /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext; then + echo "=== telepresence list ===" >&2 /usr/local/bin/telepresence list || true - if /usr/local/bin/telepresence list 2>/dev/null | grep -qi "${APP}"; then - echo "continuing with existing intercept for ${APP}" - else - echo "ERROR: intercept failed and ${APP} is not listed" >&2 - exit 1 - fi + echo "=== telepresence daemon logs ===" >&2 + for f in /tmp/.cache/telepresence/logs/*.log; do + echo "--- \$f ---" >&2 + tail -n 80 "\$f" >&2 || true + done + exit 1 fi - echo "waiting for ${APP} rollout after agent inject..." - kubectl rollout status "deploy/${APP}" -n ${NS} --timeout=120s || true - LIVE_POD=\$(kubectl get pod -n ${NS} -l app=${APP} --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}') - APP_CONTAINER=\$(kubectl get pod "\$LIVE_POD" -n ${NS} -o jsonpath='{range .spec.containers[*]}{.name}{"\\n"}{end}' | grep -vE '^(traffic-agent|istio-proxy|linkerd-proxy)\$' | head -1) - echo "port-forward live app \$LIVE_POD container \$APP_CONTAINER :${CPORT} -> 127.0.0.1:18081" - kubectl port-forward -n ${NS} --address 127.0.0.1 --container "\$APP_CONTAINER" "pod/\$LIVE_POD" 18081:${CPORT} & - j=0 - until python3 -c 'import socket;s=socket.socket();s.settimeout(1);s.connect(("127.0.0.1",18081));s.close()' 2>/dev/null; do - j=\$((j+1)) - if [ "\$j" -gt 30 ]; then - echo "ERROR: live app port-forward did not become ready" >&2 - exit 1 - fi - sleep 2 - done echo "Intercept active for ${APP}!" - echo "Intercepting HTTP header ${INTERCEPT}" tail -f /dev/null securityContext: runAsUser: 0 @@ -372,7 +345,7 @@ spec: until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ | grep -q "Intercept active for ${APP}!" \ && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ - | grep -qiE 'header-router listening|Intercepting HTTP header'; do + | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do if [ "$SECONDS" -ge "$deadline" ]; then echo "ERROR: intercept for ${APP} did not become active" >&2 echo "=== client status ===" >&2 @@ -386,6 +359,37 @@ spec: fi sleep 5 done + + # Fail fast: a headered request through the service must reach the + # PR pod and echo the session value; unmatched must still get 200. + SMOKE_URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" + SMOKE_HDR_NAME="${INTERCEPT%%:*}" + SMOKE_HDR_VAL="${INTERCEPT#*:}" + echo " Smoke: headered request -> $SMOKE_URL" + smoke_ok=false + for attempt in 1 2 3 4 5 6; do + body=$(curl -s --connect-timeout 5 --max-time 15 \ + -H "${SMOKE_HDR_NAME}: ${SMOKE_HDR_VAL}" \ + -w '\n%{http_code}' "$SMOKE_URL" 2>/dev/null || true) + code=$(printf '%s' "$body" | tail -n1) + echo " attempt $attempt: headered HTTP ${code:-000}" + if [ "$code" = "200" ]; then smoke_ok=true; break; fi + sleep 5 + done + plain_code=$(curl -s -o /dev/null --connect-timeout 5 --max-time 15 \ + -w '%{http_code}' "$SMOKE_URL" 2>/dev/null || echo 000) + echo " unmatched HTTP ${plain_code}" + if ! $smoke_ok || [ "$plain_code" != "200" ]; then + echo "ERROR: intercept for ${APP} is active but does not serve traffic" >&2 + echo "=== client logs ===" >&2 + kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true + echo "=== telepresence daemon logs ===" >&2 + kubectl exec "pod/${CLIENT_NAME}" -n "$NS" -- sh -c \ + 'for f in /tmp/.cache/telepresence/logs/*.log; do echo "--- $f ---"; tail -n 120 "$f"; done' >&2 || true + echo "=== traffic-agent logs ===" >&2 + kubectl logs -n "$NS" "deploy/${APP}" -c traffic-agent --tail=120 >&2 || true + exit 1 + fi echo " Traffic to $APP matching '$INTERCEPT' now routes to PR pod" echo "" From 368b117a34f5dd726d45af2f659f735066959891 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 21:36:18 -0400 Subject: [PATCH 21/30] ci(e2e): collect full pod logs in intercept artifacts kubectl logs with a label selector defaults to --tail=10 per container, so every intercept artifact only carried the last 10 lines of each step and hid the deploy step's smoke-probe diagnostics. Co-authored-by: Cursor --- scripts/run-product-intercept-e2e.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/run-product-intercept-e2e.sh b/scripts/run-product-intercept-e2e.sh index 1f86619..d67ebf2 100755 --- a/scripts/run-product-intercept-e2e.sh +++ b/scripts/run-product-intercept-e2e.sh @@ -99,8 +99,10 @@ collect_run_evidence() { }' >"$ARTIFACT_DIR/$prefix-pipeline-results.json" || true kubectl get taskrun -n "$NAMESPACE" -l "tekton.dev/pipelineRun=$pipeline_run" -o yaml \ >"$ARTIFACT_DIR/$prefix-taskruns.yaml" 2>&1 || true + # --tail=-1: with a label selector kubectl defaults to the last 10 lines + # per container, which hides every step's diagnostics. kubectl logs -n "$NAMESPACE" -l "tekton.dev/pipelineRun=$pipeline_run" \ - --all-containers=true --prefix=true \ + --all-containers=true --prefix=true --tail=-1 \ >"$ARTIFACT_DIR/$prefix-pod-logs.txt" 2>&1 || true } @@ -192,7 +194,7 @@ verify_pr_evidence() { || die "PR PipelineRun run-tests TaskRun did not succeed" kubectl logs -n "$NAMESPACE" -l \ "tekton.dev/pipelineRun=$pipeline_run,tekton.dev/pipelineTask=run-tests" \ - --all-containers=true --prefix=true \ + --all-containers=true --prefix=true --tail=-1 \ >"$ARTIFACT_DIR/pr-traffic-evidence.log" [[ -s "$ARTIFACT_DIR/pr-traffic-evidence.log" ]] \ || die "run-tests traffic evidence log is empty" From 8c3409f2ec48fb1960344f41686ff02e7aa748cf Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 21:48:59 -0400 Subject: [PATCH 22/30] Make mirrord the CI intercept backend and prove PR-pod routing The in-cluster Telepresence path never worked: on main the PR pod ran a sleep loop instead of the app, the tel2 sidecar image has no telepresence CLI, and validate-propagation was warn-only, so its green runs were vacuous. Drop it from the intercept-e2e matrix, keep the task as experimental, and make mirrord the default everywhere. validate-stack-propagation now takes deployed-pods and proves routing fail-closed from the PR pod's access log: a header-matched request tagged with a unique query string must appear there and an unmatched one must not. The /propagation echo alone could not distinguish baseline from PR pod. docs/intercept-backends.md records the evidence, the attempts, and how to reopen the Telepresence path. Co-authored-by: Cursor --- .github/workflows/intercept-e2e.yml | 10 +- README.md | 12 +- docs/CUSTOMIZATION.md | 6 +- docs/README-FULL.md | 32 ++--- docs/README.md | 1 + docs/REGRESSION.md | 4 +- docs/intercept-backends.md | 145 +++++++++++++++++++++++ docs/research/contributions.md | 2 +- docs/research/evaluation.md | 7 +- helm/tekton-dag/README.md | 2 +- helm/tekton-dag/values.yaml | 2 +- operator/internal/pipeline/builder.go | 4 +- orchestrator/README.md | 2 +- orchestrator/app.py | 2 +- orchestrator/k8s-deployment.yaml | 2 +- orchestrator/pipelinerun_builder.py | 2 +- pipeline/stack-pr-continue-pipeline.yaml | 6 +- pipeline/stack-pr-pipeline.yaml | 6 +- scripts/run-e2e-with-intercepts.sh | 2 +- scripts/run-product-intercept-e2e.sh | 4 +- tasks/deploy-intercept.yaml | 9 +- tasks/validate-propagation.yaml | 94 +++++++++++++++ 22 files changed, 301 insertions(+), 55 deletions(-) create mode 100644 docs/intercept-backends.md diff --git a/.github/workflows/intercept-e2e.yml b/.github/workflows/intercept-e2e.yml index fc8ef07..ddaf805 100644 --- a/.github/workflows/intercept-e2e.yml +++ b/.github/workflows/intercept-e2e.yml @@ -38,7 +38,7 @@ on: workflow_dispatch: schedule: # Weekly product-path evidence on the default branch (Monday). - # Changing this workflow file on a PR runs the same telepresence + mirrord jobs as the cron. + # Changing this workflow file on a PR runs the same mirrord job as the cron. - cron: "43 7 * * 1" permissions: @@ -56,7 +56,9 @@ jobs: strategy: fail-fast: false matrix: - backend: [telepresence, mirrord] + # mirrord is the only in-cluster intercept backend exercised by CI. + # Telepresence is supported as a laptop workflow only (see docs/intercept-backends.md). + backend: [mirrord] env: E2E_ARTIFACT_DIR: ${{ github.workspace }}/artifacts/${{ matrix.backend }} E2E_GIT_SSH_PRIVATE_KEY: ${{ secrets.E2E_GIT_SSH_PRIVATE_KEY }} @@ -123,10 +125,6 @@ jobs: set -o pipefail bash build-images/build-and-push.sh localhost:5000 latest 2>&1 | tee build-images.log - - name: Install Telepresence traffic manager - if: matrix.backend == 'telepresence' - run: ./scripts/install-telepresence-traffic-manager.sh - - name: Run authenticated product path env: PR_NUMBER: ${{ github.run_number }} diff --git a/README.md b/README.md index 7a667e7..9fb581f 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Each row links to the **in-browser player** on Pages (`#seg-…`) and to the **c | [M4.1](milestones/milestone-4.1.md) | **Completed** | Standalone baggage libraries (Spring Boot, Node, Flask, PHP) | | [M5](milestones/milestone-5.md) | **Completed** | Original traffic validation + mirrord evaluation | | [M6](milestones/milestone-6.md) | **Completed** | Full MetalBear testing (all intercept scenarios) | -| [M7](milestones/milestone-7.md) | **Completed** | Dual intercept backend: Telepresence or mirrord via `intercept-backend` param | +| [M7](milestones/milestone-7.md) | **Completed** | Dual intercept backend via `intercept-backend` param; mirrord is the CI-verified default since 2026-09-27 ([why](docs/intercept-backends.md)) | | [M7.1](milestones/milestone-7-1.md) | **Completed** | Pipeline speed: parallel containerize, Kaniko cache, parallel clone | | [M8](milestones/milestone-8.md) | **Partial** | Demo assets: Manim + TTS + composed segments + [GitHub Pages](https://jmjava.github.io/tekton-dag/); VHS terminal recordings, Slidev PDF, full concat still open | | [M9](milestones/milestone-9.md) | **Completed** | Test-trace regression graph + minimal test selection (Neo4j, mock Datadog). 10 Newman requests, 36 assertions. Test filtering in PR pipeline. | @@ -148,7 +148,7 @@ flowchart LR Promote[stack-promote] end subgraph runtime [Runtime] - Intercept[Intercept: Telepresence or mirrord] + Intercept[Intercept: mirrord header steal] Validate[Validate propagation + original traffic] Test[Run tests: Newman / Playwright / Artillery] end @@ -171,7 +171,7 @@ flowchart LR | **Merge** (`stack-merge-release`) | Promote RC to release, build, tag release images, push next dev cycle version commit. | | **Promote** (`stack-promote`) | Copy release-tagged images to a target registry/environment (`registries.yaml` or API overrides); optional approval gate. | -**Intercept backends:** Telepresence (default) or mirrord, selected via pipeline param `intercept-backend`. Both are implemented. Weekly/manual CI is [`.github/workflows/intercept-e2e.yml`](.github/workflows/intercept-e2e.yml) (`scripts/run-product-intercept-e2e.sh`). Treat only a recent successful matrix job and its retained traffic artifact as verification ([M17.3](milestones/milestone-17.md)). +**Intercept backends:** mirrord (default, the only backend CI verifies) or Telepresence (experimental in-cluster; supported on the laptop), selected via pipeline param `intercept-backend`. See [docs/intercept-backends.md](docs/intercept-backends.md) for why the in-cluster Telepresence path was dropped from CI and how routing is now proven from PR pod access logs. Weekly/manual CI is [`.github/workflows/intercept-e2e.yml`](.github/workflows/intercept-e2e.yml) (`scripts/run-product-intercept-e2e.sh`). Treat only a recent successful matrix job and its retained traffic artifact as verification ([M17.3](milestones/milestone-17.md)). **Orchestration service** (M10): In-cluster Flask service that receives GitHub webhooks, resolves repo-to-stack dynamically, and creates **StackRun** CRs. The Go operator reconciles each StackRun into a Tekton PipelineRun. Packaged via Helm (`operator.enabled` defaults **true**) with an ArgoCD ApplicationSet for multi-team provisioning. Mutation APIs require a bearer token. See [docs/m10-multi-team-architecture.md](docs/m10-multi-team-architecture.md) and [orchestrator/README.md](orchestrator/README.md). @@ -196,7 +196,7 @@ flowchart LR kubectl apply -f tasks/ kubectl apply -f pipeline/ -# 5. Optional: Telepresence Traffic Manager (for PR pipeline intercepts) +# 5. Optional: Telepresence Traffic Manager (laptop intercepts / experimental in-cluster backend) ./scripts/install-telepresence-traffic-manager.sh # 6. Optional: Postgres + Tekton Results (persist run history) @@ -230,11 +230,11 @@ kubectl port-forward svc/el-stack-event-listener 8080:8080 -n tekton-pipelines & ```bash # Product path against a cluster that already has the control plane -./scripts/run-product-intercept-e2e.sh --intercept-backend telepresence ./scripts/run-product-intercept-e2e.sh --intercept-backend mirrord +./scripts/run-product-intercept-e2e.sh --intercept-backend telepresence # experimental, not CI-gated # Full local helper (bootstrap + PR pipeline) -./scripts/run-e2e-with-intercepts.sh --intercept-backend telepresence +./scripts/run-e2e-with-intercepts.sh --intercept-backend mirrord ./scripts/run-e2e-with-intercepts.sh --intercept-backend mirrord --skip-bootstrap ``` diff --git a/docs/CUSTOMIZATION.md b/docs/CUSTOMIZATION.md index 8e9576f..b279964 100644 --- a/docs/CUSTOMIZATION.md +++ b/docs/CUSTOMIZATION.md @@ -235,13 +235,13 @@ Ensure a **compile image** exists that matches that toolchain (build and push wi ## 8. Add intercept backend support -**Goal:** Use **mirrord** instead of **Telepresence** (or switch per environment). +**Goal:** Switch the intercept backend per environment. mirrord is the default and the only CI-verified backend; the in-cluster Telepresence task is experimental (see [intercept-backends.md](intercept-backends.md)). 1. **Cluster** — install the components your chosen backend needs (e.g. Telepresence Traffic Manager or mirrord operator per vendor docs). -2. **Helm** — set `interceptBackend: "mirrord"` in values; the orchestrator sets `INTERCEPT_BACKEND` for webhook-created runs. +2. **Helm** — `interceptBackend` defaults to `"mirrord"`; set `"telepresence"` to opt into the experimental task; the orchestrator sets `INTERCEPT_BACKEND` for webhook-created runs. -3. **Pipeline param** — `stack-pr-test` already exposes `intercept-backend` (`telepresence` | `mirrord`). `generate-run.sh` supports: +3. **Pipeline param** — `stack-pr-test` already exposes `intercept-backend` (`mirrord` | `telepresence`). `generate-run.sh` supports: ```bash ./scripts/generate-run.sh --mode pr --repo demo-fe --pr 1 --intercept-backend mirrord --apply diff --git a/docs/README-FULL.md b/docs/README-FULL.md index 13f2d7d..903ec98 100644 --- a/docs/README-FULL.md +++ b/docs/README-FULL.md @@ -74,7 +74,7 @@ So: **one stack file → one DAG → one resolved JSON → same pipeline for all ### Intercepts for debugging (PR flow) -On PRs, the pipeline builds images, then **deploys one pod per built app** and configures **Telepresence intercepts** so that traffic carrying the PR’s header is routed to those PR pods instead of the normal staging deployment. That gives you “this PR’s code path” end-to-end for debugging. +On PRs, the pipeline builds images, then **deploys one pod per built app** and configures **mirrord intercepts** (header steal; see [intercept-backends.md](intercept-backends.md)) so that traffic carrying the PR’s header is routed to those PR pods instead of the normal staging deployment. That gives you “this PR’s code path” end-to-end for debugging. **How it works** @@ -82,10 +82,9 @@ On PRs, the pipeline builds images, then **deploys one pod per built app** and c `resolve-stack` sets `intercept-header-value` (e.g. `x-dev-session:pr-42`) from the stack’s `propagation.header-name` and the PR number. The same value is used for intercepts and for validation/tests. 2. **Per-app PR pods** - The **deploy-stack-intercepts** task, for each app in `build-apps`: + The **deploy-intercept-mirrord** task (default; `deploy-stack-intercepts` is the experimental Telepresence variant), for each app in `build-apps`: - Reads from `stack-json` and `built-images`: image, namespace, container port, service port. - - Creates a **Pod** with (1) the built image (PR build) and (2) a Telepresence sidecar. - - The sidecar runs `telepresence intercept --namespace --port : --http-match `. + - Creates a **Pod** running the built image (PR build) and a mirrord proxy pod that runs `mirrord exec` with an `http_filter.header_filter` steal on the live deployment, relaying matched requests to the PR pod. - So any request that matches the header (e.g. `x-dev-session: pr-42`) to the **existing** Kubernetes Service for that app is intercepted and sent to this PR pod instead of the normal deployment. 3. **Arbitrary config support** @@ -97,7 +96,7 @@ On PRs, the pipeline builds images, then **deploys one pod per built app** and c **End-to-end for a developer** - Open the app (e.g. frontend) with a header `x-dev-session: pr-`. -- That request hits the entry service; Telepresence sends it to the PR pod for the entry app. +- That request hits the entry service; the intercept sends it to the PR pod for the entry app. - The entry app calls its downstreams (from the DAG); those requests carry the same header, so they are intercepted to the corresponding PR pods. - So the entire path from entry through the DAG runs the PR build, enabling debugging of the full stack for that PR. @@ -105,7 +104,7 @@ On PRs, the pipeline builds images, then **deploys one pod per built app** and c - **DAG**: One stack YAML defines nodes (apps) and edges (`downstream`). Resolve computes topo order, entry, and propagation chain. - **Arbitrary config**: All behavior is driven by stack-json and params; pipelines stay generic. -- **Intercepts**: One PR pod per built app, Telepresence sidecar, header-based routing so “this PR” traffic hits PR pods end-to-end for debugging. +- **Intercepts**: One PR pod per built app, mirrord header steal, header-based routing so “this PR” traffic hits PR pods end-to-end for debugging. ### Stack Graph — Arbitrary DAG (examples) @@ -285,20 +284,20 @@ Browser → demo-fe (originator: SETS baggage=dev-session=pr-42, x-dev-session=p → demo-api (terminal: ACCEPTS header, end of chain) ``` -**The header only needs to propagate up to the intercepted app.** Beyond the intercept, downstream calls are normal -- there's no Telepresence intercept on those services, so the header doesn't need to be there. +**The header only needs to propagate up to the intercepted app.** Beyond the intercept, downstream calls are normal -- there's no intercept on those services, so the header doesn't need to be there. **Intercepted originator** (FE PR): the PR build must set headers on outgoing requests. If there are other intercepted apps downstream, they need the header to route correctly. If the FE is the only intercepted app, the header still needs to reach it (but that's handled by the test harness sending it in). -**Intercepted forwarder** (middleware PR): Telepresence routes matching traffic to the PR pod of B. B's downstream calls to C and D go to their normal deployments — no intercept to match on, so **B does not need to forward the header**. Exception: if both B and C are intercepted in the same PR, B must forward so C's intercept catches it. +**Intercepted forwarder** (middleware PR): the intercept routes matching traffic to the PR pod of B. B's downstream calls to C and D go to their normal deployments — no intercept to match on, so **B does not need to forward the header**. Exception: if both B and C are intercepted in the same PR, B must forward so C's intercept catches it. -**Intercepted terminal** (API PR): the header reached it via Telepresence, end of the line. No forwarding needed. +**Intercepted terminal** (API PR): the header reached it via the intercept, end of the line. No forwarding needed. ``` A(originator) → B(forwarder) → C(terminal) → D(terminal) If B is intercepted: - header: test → A → B(PR) ✓ (Telepresence routes to PR B) + header: test → A → B(PR) ✓ (intercept routes to PR B) B → C: normal call (C has no intercept, header not needed) B → D: normal call (D has no intercept, header not needed) @@ -375,8 +374,9 @@ tekton-job-standardization/ ├── tasks/ │ ├── resolve-stack.yaml # Parse graph, topo sort, resolve versions │ ├── build-app.yaml # Compile (npm/maven/gradle/composer/pip) + Kaniko -│ ├── deploy-intercept.yaml # PR pods with Telepresence intercepts -│ ├── validate-propagation.yaml # Header flow validation +│ ├── deploy-intercept-mirrord.yaml # PR pods + mirrord header-steal intercepts (default) +│ ├── deploy-intercept.yaml # Experimental in-cluster Telepresence intercepts (not CI-gated) +│ ├── validate-propagation.yaml # Header flow validation + PR-pod routing proof │ ├── run-stack-tests.yaml # Postman / Playwright / Artillery per app │ ├── version-bump.yaml # RC bump (PR) or release promote (merge) │ ├── tag-release-images.yaml # crane re-tag with clean semver @@ -409,7 +409,7 @@ tekton-job-standardization/ │ build-apps ← compile per toolchain, Kaniko pushes v0.1.0-rc.4 │ - deploy-intercepts ← PR pods + Telepresence for each built app + deploy-intercepts ← PR pods + mirrord intercept for each built app │ validate-propagation ← verifies header flows through all hops │ @@ -466,7 +466,7 @@ You can run **both** the build pipelines and the **full PR pipeline** (deploy in **Standalone local repo:** To work in a new git repo with no AWS and paths at repo root (easier for local runs and Phase 2 clone), run `./scripts/extract-standalone-repo.sh [OUTPUT_DIR]`. This copies the milestone into a new tree with `stacks/`, `tasks/`, etc. at root and a README + SHARING-BACK.md for contributing back when it works. See the script for next steps (`git init`, remote, push). -- **Full PR pipeline** (`stack-pr-test`): clone → resolve → bump RC → build apps → deploy PR pods + Telepresence intercepts → validate header propagation → run tests (Postman/Playwright/Artillery) → push version → cleanup. Use this for full local testing. +- **Full PR pipeline** (`stack-pr-test`): clone → resolve → bump RC → build apps → deploy PR pods + mirrord intercepts → validate header propagation + routing proof → run tests (Postman/Playwright/Artillery) → push version → cleanup. Use this for full local testing. - **Merge pipeline** (`stack-merge-release`): clone → resolve → release version → build apps → tag and push images. Use this for build-only validation or release simulation. **1. Kind cluster + local registry (recommended for local builds)** @@ -487,7 +487,7 @@ Then install Tekton and this repo’s tasks/pipelines: ./scripts/install-tekton.sh ``` -Install the **Telepresence Traffic Manager** so the full PR pipeline (deploy intercepts, validate propagation, run tests) can route traffic to PR pods: +mirrord needs no cluster-side install. Optionally install the **Telepresence Traffic Manager** for laptop intercepts or the experimental in-cluster Telepresence backend: ```bash ./scripts/install-telepresence-traffic-manager.sh @@ -497,7 +497,7 @@ Install the **Telepresence Traffic Manager** so the full PR pipeline (deploy int **1b. Other local clusters (minikube, k3d)** -Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines and the **Telepresence Traffic Manager** (so the full PR pipeline can run intercepts). Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): +Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines (mirrord intercepts need no cluster-side install; the Telepresence Traffic Manager is only needed for laptop intercepts). Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): ```bash kubectl apply -f tasks/ diff --git a/docs/README.md b/docs/README.md index 8b3285b..bba7023 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,6 +10,7 @@ This folder contains design, operations, and verification docs for the tekton-da | **Milestones (historical)** | [../milestones/completed/](../milestones/completed/) — M2, M3 | | **Archive (not maintained)** | [archive/](archive/) — obsolete session plans and similar | | **Customization & ops** | [CUSTOMIZATION.md](CUSTOMIZATION.md), [MAINTENANCE.md](MAINTENANCE.md) | +| **Intercept backends** | [intercept-backends.md](intercept-backends.md) — mirrord in CI (with PR-pod routing proof), Telepresence laptop-only; why the in-cluster Telepresence path was dropped | | **Teams: stacks + baggage libs** | [BAGGAGE-CONTRACT.md](BAGGAGE-CONTRACT.md) — original override header hop-to-hop; [TEAM-ONBOARDING-STACKS-AND-BAGGAGE.md](TEAM-ONBOARDING-STACKS-AND-BAGGAGE.md) — libraries + new stack checklist | | **Demo toolchain (M8)** | [demos/](demos/) — [demos/README.md](demos/README.md) (`docgen` CLI; `generate-all.sh` is a thin wrapper); [milestones/milestone-8.md](../milestones/milestone-8.md) | | **GitHub Actions** | [REGRESSION.md](REGRESSION.md) — which workflows run on every PR vs schedule/path filters | diff --git a/docs/REGRESSION.md b/docs/REGRESSION.md index 2bf6165..b0f3254 100644 --- a/docs/REGRESSION.md +++ b/docs/REGRESSION.md @@ -117,7 +117,7 @@ chmod +x scripts/run-regression.sh # once, if needed ./scripts/run-regression.sh --local-only --kind-e2e # On an already prepared cluster: trigger -> StackRun -> operator -> PR PipelineRun -./scripts/run-product-intercept-e2e.sh --intercept-backend telepresence +./scripts/run-product-intercept-e2e.sh --intercept-backend mirrord ``` Environment: @@ -132,7 +132,7 @@ Environment: 1. **Often (fast, no cluster):** `./scripts/run-regression.sh --local-only` — Phase 1 + pytest + vitest; good for frequent pushes; safe to wire into lightweight CI. 2. **System bar (cluster):** **`./scripts/run-regression.sh --cluster --require-dag-verify`** when you need a real **Succeeded** `stack-dag-verify` and orchestrator Newman — treat as **integration / system** work: before releases, after big platform changes, on a schedule, or when agents/docs require proof — **not** as “must pass on every GitHub PR” unless you explicitly configure that. 3. **With Tekton Results:** `results-regression.yml` installs pinned Results/Postgres weekly and runs the strict agent entrypoint; locally use `--with-results-verify` or rely on **auto** when the API exists. -4. **Intercept E2E:** the weekly matrix exercises Telepresence and mirrord independently and retains StackRun, PipelineRun, TaskRun, pod-log, and test-traffic evidence for 30 days. +4. **Intercept E2E:** the weekly job exercises the mirrord backend (Telepresence in-cluster was dropped from the matrix on 2026-09-27; see [intercept-backends.md](intercept-backends.md)) and retains StackRun, PipelineRun, TaskRun, pod-log, and test-traffic evidence for 30 days. After the tiers you care about are green, update [milestones/milestone-8.md](../milestones/milestone-8.md) and related testing docs. diff --git a/docs/intercept-backends.md b/docs/intercept-backends.md new file mode 100644 index 0000000..43969a9 --- /dev/null +++ b/docs/intercept-backends.md @@ -0,0 +1,145 @@ +# Intercept backends: mirrord in CI, Telepresence on the laptop + +**Status (2026-09-27):** mirrord is the only intercept backend the PR pipeline +runs in CI and the default everywhere (`intercept-backend=mirrord`). The +in-cluster Telepresence sidecar task is kept as **experimental** and is not +exercised by CI. Telepresence remains supported as a **laptop** workflow. + +This page records why, with the evidence, so the decision can be revisited +with facts rather than memory. + +## 1. What the PR pipeline has to prove + +The product contract for a PR run is: + +1. A request carrying the PR's session header (for example + `x-dev-session: pr-42`) that hits an intercepted app's Kubernetes Service is + served by that app's **PR pod**. +2. A request without the header is served by the **live baseline**, untouched. +3. The header (and `baggage`) is copied hop-to-hop through the stack. + +Three tasks check this: `validate-stack-propagation` (3 and, since this change, +1 and 2), `validate-original-traffic` (2), and `run-tests`. + +## 2. The Telepresence in-cluster path never worked + +Runs of `intercept-e2e.yml` on `main` were green for the `telepresence` matrix +leg from 2026-09-16 to 2026-09-21 and the session notes from February and March +2026 say "E2E with Telepresence intercepts passing". Reading the artifacts and +the task as it existed on `main` shows the pass was vacuous: + +| Fact | Evidence | +| --- | --- | +| The PR pod never ran the app. | `tasks/deploy-intercept.yaml` on `main` started the built image with `sh -c 'while true; do echo "PR build for ${APP}"; sleep 30; done'`. It could not answer an HTTP request. | +| The sidecar had no Telepresence CLI. | The sidecar image was `ghcr.io/telepresenceio/tel2:2.20.0`, the traffic-agent image. It ships one binary, `traffic`; `telepresence` is not present (`docker run --rm --entrypoint sh ghcr.io/telepresenceio/tel2:2.20.0 -c 'command -v telepresence'` prints nothing). `telepresence helm install` failed with *not found* and the container exited after its initial `sleep 10`, during which the pod was briefly `Ready`, so `kubectl wait` passed. | +| Validation was warn-only. | `validate-stack-propagation` printed `HOP 1 demo-fe (originator) [INTERCEPTED]: NOT CONFIRMED (header required at this hop)` and then `Propagation validation complete.` with exit 0. Artifact: run `35612789828`, `artifacts/telepresence/pr-pod-logs.txt`. | +| Green turned red the day the check became honest. | `d07635f` / `5ef46c7` (2026-09-26) made hop validation fail-closed. The next `main` run (`0c75b06`, 2026-09-27) failed. Nothing in Telepresence changed. | + +So "Telepresence used to work" is true for the laptop workflow, where a +developer runs `telepresence intercept` against the cluster and traffic lands +on a local process. It was never true for the in-cluster sidecar variant the +pipeline used; that variant reported success without doing anything. + +## 3. What was tried on PR #109 to make the in-cluster path real + +Commits on `fix/post-deploy-checks`, in order, each verified by a full CI run +(about 15 minutes each): + +| Attempt | Result | +| --- | --- | +| Real CLI image (`build-images/Dockerfile.telepresence`, Telepresence 2.32.1), sidecar in the PR pod. | `connector.CreateIntercept: grpc: the client connection is closing`. 2.32.1 could not create intercepts from inside this cluster at all. | +| Separate privileged client pod (own ServiceAccount, tun device, `HOME=/tmp`), still 2.32.1. | Same gRPC error. | +| Downgrade to 2.25.0 (matching the traffic manager). | Intercept created. Header-matched request to the Service hung (`HTTP 000`); unmatched request passed. | +| `--never-proxy /32` and a local `socat` relay to the PR pod. | Same hang. | +| Whole-port TCP intercept (`--mechanism tcp`) with a header router in front. | Steals *all* traffic to the port, which violates contract item 2, and Telepresence reported `container port 80 is already intercepted`. Rejected. | +| `--plaintext` (HTTP intercepts default to TLS toward the handler; the PR pod is plaintext nginx). | The traffic-agent logged `Allowing non-conflicting intercept ...:demo-fe to become active`, then the fail-fast smoke probe in the deploy step failed. The reason was not recoverable from the artifact because log collection used `kubectl logs -l ...`, which defaults to the last 10 lines per container (fixed in `368b117`). | + +Other costs of the in-cluster sidecar design that mirrord does not have: + +- Injecting the traffic-agent restarts the live baseline Deployment. +- The client needs `NET_ADMIN`, a tun device, root, and a privileged namespace. +- Client and traffic-manager versions must match closely; 2.32 vs 2.25 was + enough to break intercept creation. + +At that point the choice was: keep iterating on a design the project had never +had working, or ship the backend that already met the contract. We chose the +latter. + +## 4. Why mirrord is trusted + +`tasks/deploy-intercept-mirrord.yaml` runs the built image as the real app in +the PR pod and uses `mirrord exec` with `http_filter.header_filter` in steal +mode, relaying matched requests through `socat` to the PR pod IP. It has been +green on every run of PR #109 since its proxy pod's crash loop (non-root home +directory) was fixed. + +That green was also audited for false positives. The `/propagation` endpoint +is served identically by the baseline and the PR pod and simply echoes the +header it received, so `PASS — REACHED session=pr-N` alone does not prove +which pod answered. `validate-stack-propagation` therefore now adds a +**routing proof**, fail-closed, per intercepted app: + +1. `GET /propagation?probehit` **with** the header. The id must + appear in the PR pod's access log (nginx logs every request line to stdout; + the log is read through the Kubernetes API with the task's ServiceAccount, + which already has `pods/log`). +2. `GET /propagation?probemiss` **without** the header. The id + must **not** appear in the PR pod's log. + +If the intercept silently does nothing, step 1 fails. If it steals everything, +step 2 fails. The pipeline passes `deployed-pods` (app → PR pod name) from +`deploy-intercepts-result` to the validator for this purpose. + +## 5. What changed in the repository + +- `.github/workflows/intercept-e2e.yml`: matrix is `[mirrord]`; the + Telepresence traffic-manager install step is gone. +- Default `intercept-backend` is `mirrord` in `pipeline/stack-pr-pipeline.yaml`, + `pipeline/stack-pr-continue-pipeline.yaml`, `scripts/run-product-intercept-e2e.sh`, + `scripts/run-e2e-with-intercepts.sh`, the orchestrator (`app.py`, + `pipelinerun_builder.py`, `k8s-deployment.yaml`), the operator + (`internal/pipeline/builder.go`), and the Helm chart (`interceptBackend`). +- `tasks/validate-propagation.yaml`: new `deployed-pods` param and the routing + proof above. +- `scripts/run-product-intercept-e2e.sh`: `--tail=-1` on log collection so + artifacts carry full step output. + +Kept, marked experimental, not run by CI: + +- `tasks/deploy-intercept.yaml` (in-cluster Telepresence client pod, 2.25.0, + `--http-header ... --plaintext`). +- `build-images/Dockerfile.telepresence`, + `scripts/install-telepresence-traffic-manager.sh`. + +Selecting it explicitly (`--intercept-backend telepresence` or the pipeline +param) still works and now fails closed at the deploy step if routing is not +live. + +## 6. Telepresence on the laptop (supported) + +This is the workflow Telepresence is designed for and the one people remember +working: + +```bash +./scripts/install-telepresence-traffic-manager.sh # once per cluster +telepresence connect --namespace staging +telepresence intercept demo-fe --port 8080:80 \ + --http-header x-dev-session=pr-42 +# run demo-fe locally on :8080, attach a debugger, +# send a request with x-dev-session: pr-42 through the cluster entry point +telepresence leave demo-fe +telepresence quit +``` + +See `.vscode/README.md` and `docs/demo-playbook.md` for the step-debug flow; +mirrord works the same way from the laptop (`mirrord exec`). + +## 7. Reopening the in-cluster Telepresence path + +If someone wants to make the sidecar variant real, the remaining unknown is +the smoke-probe failure after `--plaintext` on 2.25.0. Start from a run with +full logs (`368b117` or later), read the deploy step's dump of the client +daemon logs (`/tmp/.cache/telepresence/logs/*.log`) and the traffic-agent log, +and reproduce on a local kind cluster rather than in 15-minute CI cycles. Any +fix must pass the routing proof in section 4 for both matched and unmatched +traffic before the matrix entry is restored. diff --git a/docs/research/contributions.md b/docs/research/contributions.md index e0b74c0..69498b4 100644 --- a/docs/research/contributions.md +++ b/docs/research/contributions.md @@ -26,7 +26,7 @@ These are the **only** claims the workshop/tool **paper** is allowed to make unt ### C3 — Header-matched intercepts with original-traffic safety -**Claim.** On a PR, only `changed-app`(s) are built and intercepted. Matching is the same session header used for propagation. Two backends are implemented and E2E-exercised: Telepresence (`--http-match`) and mirrord (`header_filter`). A separate **validate-original-traffic** path checks that requests *without* the header still hit baseline pods. +**Claim.** On a PR, only `changed-app`(s) are built and intercepted. Matching is the same session header used for propagation. Two backends are implemented; mirrord (`header_filter`) is E2E-exercised with a fail-closed routing proof read from the PR pod access log. The in-cluster Telepresence task (`--http-header`) is experimental and not CI-gated (`docs/intercept-backends.md`). A separate **validate-original-traffic** path checks that requests *without* the header still hit baseline pods. **Not claimed.** That Telepresence or mirrord are novel. The contribution is *CI-orchestrated, graph-aware placement* of intercepts plus an explicit safety check, not the intercept dataplane. diff --git a/docs/research/evaluation.md b/docs/research/evaluation.md index 2f084b0..4a27d0a 100644 --- a/docs/research/evaluation.md +++ b/docs/research/evaluation.md @@ -35,7 +35,7 @@ On 2026-09-07, `bash scripts/run-regression-stream.sh --local-only --require-lan |----------|------| | `local-regression.yml` | Every PR / `main` push: `--local-only --require-lang-tests` | | `cluster-regression.yml` | Nightly + tags + Helm/cluster-script PRs | -| `intercept-e2e.yml` | Weekly Telepresence + mirrord product path | +| `intercept-e2e.yml` | Weekly mirrord product path (Telepresence in-cluster dropped 2026-09-27, see `docs/intercept-backends.md`) | | `results-regression.yml` | Weekly Results/Postgres + `run-regression-agent-full.sh` | | `operator.yml` | `operator/**` PRs: unit/envtest + Kind domain E2E | @@ -70,13 +70,12 @@ C2 (polyglot baggage **unit** tests) is PR-gated for Python, Node, Java, and PHP | No `x-dev-session` header (5 rounds) | baseline `tekton-dag-spring-boot` | 5/5 | | `x-dev-session: pr-test` (5 rounds) | intercept / local PR process | 5/5 | -Same header-filter idea is documented as parity with Telepresence `--http-match`. E2E scripts exist for **both** backends: +Same header-filter idea is documented as parity with Telepresence `--http-header`. Only mirrord is CI-verified; the in-cluster Telepresence task is experimental (`docs/intercept-backends.md`): ```bash -./scripts/run-product-intercept-e2e.sh --intercept-backend telepresence ./scripts/run-product-intercept-e2e.sh --intercept-backend mirrord # local Kind helper: -./scripts/run-e2e-with-intercepts.sh --intercept-backend telepresence --skip-bootstrap +./scripts/run-e2e-with-intercepts.sh --intercept-backend mirrord --skip-bootstrap ``` **How to report:** “In a controlled Kind deployment of the three-app exemplar, unmatched requests remained on the baseline replica; matched requests were stolen (5/5 each).” Cite [`docs/mirrord-poc-results.md`](../mirrord-poc-results.md) for that smoke, and `run-isolation-eval.sh --cluster` for dummy-stack probes (this Cloud Agent: 6/6 `isolation_ok`). Neither is a site measurement (S21). diff --git a/helm/tekton-dag/README.md b/helm/tekton-dag/README.md index afc5497..24ae6ed 100644 --- a/helm/tekton-dag/README.md +++ b/helm/tekton-dag/README.md @@ -61,7 +61,7 @@ Packaged content under `raw/` is **not** committed by default; `package.sh` copi | `imageRegistry` | string | `"localhost:5000"` | Container registry base for runtime images; passed to orchestrator as `IMAGE_REGISTRY` | | `buildImageTag` | string | `"latest"` | Tag convention for build images (document alongside `compileImages`) | | `cacheRepo` | string | `"localhost:5000/kaniko-cache"` | Kaniko cache repository; passed to orchestrator as `CACHE_REPO` | -| `interceptBackend` | string | `"telepresence"` | Default intercept backend: `telepresence` or `mirrord` (`INTERCEPT_BACKEND` env) | +| `interceptBackend` | string | `"mirrord"` | Default intercept backend: `mirrord` (CI-verified) or `telepresence` (experimental in-cluster) (`INTERCEPT_BACKEND` env) | | `maxParallelBuilds` | int | `5` | Max concurrent Kaniko-style builds for bootstrap-style runs (`MAX_PARALLEL_BUILDS` env) | | `compileImages.npm` | string | see `values.yaml` | Default compile image for npm | | `compileImages.maven` | string | … | Default compile image for Maven | diff --git a/helm/tekton-dag/values.yaml b/helm/tekton-dag/values.yaml index a4ea018..35f6eaa 100644 --- a/helm/tekton-dag/values.yaml +++ b/helm/tekton-dag/values.yaml @@ -4,7 +4,7 @@ namespace: "tekton-pipelines" imageRegistry: "localhost:5000" buildImageTag: "latest" cacheRepo: "localhost:5000/kaniko-cache" -interceptBackend: "telepresence" +interceptBackend: "mirrord" maxParallelBuilds: 5 # Default compile images (used when stack YAML does not specify a version). diff --git a/operator/internal/pipeline/builder.go b/operator/internal/pipeline/builder.go index f0f61a9..e3a0209 100644 --- a/operator/internal/pipeline/builder.go +++ b/operator/internal/pipeline/builder.go @@ -191,7 +191,7 @@ func BuildPR(opt Options) (*unstructured.Unstructured, error) { } intercept := opt.InterceptBackend if intercept == "" { - intercept = "telepresence" + intercept = "mirrord" } params := []any{ param("git-url", opt.GitURL), @@ -392,7 +392,7 @@ func BuildPRContinue(opt Options) (*unstructured.Unstructured, error) { } intercept := opt.InterceptBackend if intercept == "" { - intercept = "telepresence" + intercept = "mirrord" } params := []any{ param("stack-json", opt.ContinueStackJSON), diff --git a/orchestrator/README.md b/orchestrator/README.md index 5c1e465..203db0a 100644 --- a/orchestrator/README.md +++ b/orchestrator/README.md @@ -35,7 +35,7 @@ Defined in `app.py` (with defaults). Common ones: | `TEAM_NAME` | Team identifier (logging / config context). | | `IMAGE_REGISTRY` | Container registry base passed into runs. | | `CACHE_REPO` | Kaniko cache repository. | -| `INTERCEPT_BACKEND` | `telepresence` or `mirrord` (default `telepresence`). | +| `INTERCEPT_BACKEND` | `mirrord` (default, CI-verified) or `telepresence` (experimental in-cluster). | | `MAX_PARALLEL_BUILDS` | Parallelism hint (default `5`). | | `GIT_URL` | Platform repo URL. | | `GIT_REVISION` | Default branch/tag/SHA. | diff --git a/orchestrator/app.py b/orchestrator/app.py index 3690367..c6f370e 100644 --- a/orchestrator/app.py +++ b/orchestrator/app.py @@ -30,7 +30,7 @@ def create_app(): TEAM_NAME=os.environ.get("TEAM_NAME", "default"), IMAGE_REGISTRY=os.environ.get("IMAGE_REGISTRY", "localhost:5000"), CACHE_REPO=os.environ.get("CACHE_REPO", "localhost:5000/kaniko-cache"), - INTERCEPT_BACKEND=os.environ.get("INTERCEPT_BACKEND", "telepresence"), + INTERCEPT_BACKEND=os.environ.get("INTERCEPT_BACKEND", "mirrord"), MAX_PARALLEL_BUILDS=int(os.environ.get("MAX_PARALLEL_BUILDS", "5")), GIT_URL=os.environ.get("GIT_URL", "https://github.com/jmjava/tekton-dag.git"), GIT_REVISION=os.environ.get("GIT_REVISION", "main"), diff --git a/orchestrator/k8s-deployment.yaml b/orchestrator/k8s-deployment.yaml index 33e1de3..b86384c 100644 --- a/orchestrator/k8s-deployment.yaml +++ b/orchestrator/k8s-deployment.yaml @@ -33,7 +33,7 @@ spec: - name: CACHE_REPO value: "" - name: INTERCEPT_BACKEND - value: telepresence + value: mirrord - name: MAX_PARALLEL_BUILDS value: "5" - name: GIT_URL diff --git a/orchestrator/pipelinerun_builder.py b/orchestrator/pipelinerun_builder.py index 5f4b02a..31c16d7 100644 --- a/orchestrator/pipelinerun_builder.py +++ b/orchestrator/pipelinerun_builder.py @@ -46,7 +46,7 @@ def build_pr_pipelinerun( git_revision, image_registry, cache_repo="", - intercept_backend="telepresence", + intercept_backend="mirrord", app_revisions=None, namespace="tekton-pipelines", compile_images=None, diff --git a/pipeline/stack-pr-continue-pipeline.yaml b/pipeline/stack-pr-continue-pipeline.yaml index 04fde50..286f111 100644 --- a/pipeline/stack-pr-continue-pipeline.yaml +++ b/pipeline/stack-pr-continue-pipeline.yaml @@ -36,8 +36,8 @@ spec: description: "JSON map of app → image URI (from build-apps result)" - name: intercept-backend type: string - description: "Which intercept backend was used: telepresence or mirrord" - default: "telepresence" + description: "Which intercept backend was used: mirrord or telepresence" + default: "mirrord" - name: bumped-versions type: string description: "JSON map of app → version (from bump-rc-version result)" @@ -129,6 +129,8 @@ spec: value: $(params.build-apps) - name: intercept-header-value value: $(params.intercept-header-value) + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) runAfter: - deploy-intercepts-result diff --git a/pipeline/stack-pr-pipeline.yaml b/pipeline/stack-pr-pipeline.yaml index 824a29d..a8f0ccb 100644 --- a/pipeline/stack-pr-pipeline.yaml +++ b/pipeline/stack-pr-pipeline.yaml @@ -59,8 +59,8 @@ spec: description: "Pre-built image for mirrord proxy pods (M7)" default: "localhost:5000/tekton-dag-build-mirrord:latest" - name: intercept-backend - description: "Which intercept backend to use: telepresence (default) or mirrord" - default: "telepresence" + description: "Which intercept backend to use: mirrord (default, CI-verified) or telepresence (experimental in-cluster)" + default: "mirrord" - name: dashboard-url description: "Base URL of Tekton Dashboard; PR comment will include link to this run (optional)" default: "" @@ -459,6 +459,8 @@ spec: value: $(tasks.resolve-stack.results.build-apps) - name: intercept-header-value value: $(tasks.resolve-stack.results.intercept-header-value) + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) runAfter: - deploy-intercepts-result diff --git a/scripts/run-e2e-with-intercepts.sh b/scripts/run-e2e-with-intercepts.sh index 49b1fbd..a095aff 100755 --- a/scripts/run-e2e-with-intercepts.sh +++ b/scripts/run-e2e-with-intercepts.sh @@ -24,7 +24,7 @@ STACK_FILE="stack-one.yaml" STACK_PATH="stacks/$STACK_FILE" CHANGED_APP="demo-fe" PR_NUMBER="1" -INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-telepresence}" +INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-mirrord}" GIT_URL="${GIT_URL:-https://github.com/jmjava/tekton-dag.git}" GIT_REV="${GIT_REV:-main}" GIT_SSH_SECRET_NAME="${GIT_SSH_SECRET_NAME:-git-ssh-key}" diff --git a/scripts/run-product-intercept-e2e.sh b/scripts/run-product-intercept-e2e.sh index d67ebf2..f4b098e 100755 --- a/scripts/run-product-intercept-e2e.sh +++ b/scripts/run-product-intercept-e2e.sh @@ -11,7 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=common.sh source "$SCRIPT_DIR/common.sh" -INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-telepresence}" +INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-mirrord}" STACK_FILE="${STACK_FILE:-stack-one.yaml}" CHANGED_APP="${CHANGED_APP:-demo-fe}" PR_NUMBER="${PR_NUMBER:-900001}" @@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do done [[ "$INTERCEPT_BACKEND" == "telepresence" || "$INTERCEPT_BACKEND" == "mirrord" ]] \ - || die "--intercept-backend must be telepresence or mirrord" + || die "--intercept-backend must be mirrord or telepresence" [[ "$PR_NUMBER" =~ ^[0-9]+$ ]] || die "--pr must be numeric" need kubectl diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml index ae1d032..5fa7a56 100644 --- a/tasks/deploy-intercept.yaml +++ b/tasks/deploy-intercept.yaml @@ -7,8 +7,13 @@ metadata: app.kubernetes.io/version: "1.0.0" spec: description: > - Deploys PR pods with Telepresence intercepts ONLY for the app(s) - that changed. The rest of the stack runs as-is in the cluster. + EXPERIMENTAL — not exercised by CI. Deploys PR pods and creates + in-cluster Telepresence header intercepts ONLY for the app(s) that + changed. The rest of the stack runs as-is in the cluster. The + CI-verified backend is deploy-intercept-mirrord; see + docs/intercept-backends.md for the history and how to reopen this path. + This task fails closed: the deploy step probes matched and unmatched + traffic before reporting success. For a stack A→B→C→D where C changed: - A, B, D: normal deployed services (untouched) diff --git a/tasks/validate-propagation.yaml b/tasks/validate-propagation.yaml index a0ba1c9..12d4fad 100644 --- a/tasks/validate-propagation.yaml +++ b/tasks/validate-propagation.yaml @@ -45,6 +45,14 @@ spec: - name: default-namespace type: string default: "staging" + - name: deployed-pods + type: string + default: "" + description: | + JSON map app -> PR pod name from deploy-intercepts. When non-empty the + task also proves routing: a header-matched request must be served by + that PR pod and an unmatched request must not be (read from the pod's + access log through the Kubernetes API). steps: - name: validate image: alpine:3.19 @@ -312,4 +320,90 @@ spec: echo "PASS: hop-to-hop verification complete" fi echo "" + + # ------------------------------------------------------------------ + # Routing proof (fail-closed). The /propagation echo above is served + # identically by the baseline and the PR pod, so it cannot tell which + # pod answered. Prove it from the PR pod's own access log: a request + # tagged with a unique query string and carrying the header must show + # up there; an untagged-header request with a different tag must not. + # ------------------------------------------------------------------ + DEPLOYED_PODS='$(params.deployed-pods)' + if [ -n "$HEADER_VAL" ] && [ -n "$BUILD_APPS" ] \ + && [ -n "$DEPLOYED_PODS" ] && [ "$DEPLOYED_PODS" != "{}" ]; then + echo "Routing proof (fail-closed): PR pod must serve matched traffic only" + SA_DIR=/var/run/secrets/kubernetes.io/serviceaccount + API="https://kubernetes.default.svc" + pod_log() { + # $1 namespace, $2 pod. Prefer the app container; fall back to the + # pod default if that container name does not exist. + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?container=pr-component&sinceSeconds=600" || true) + if printf '%s' "$out" | grep -q '"kind":"Status"'; then + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?sinceSeconds=600" || true) + fi + printf '%s' "$out" + } + for APP in $BUILD_APPS; do + POD=$(echo "$DEPLOYED_PODS" | jq -r --arg a "$APP" '.[$a] // empty') + if [ -z "$POD" ]; then + echo " $APP: FAIL — no PR pod recorded in deployed-pods" + FAILED=1 + continue + fi + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + SVC="http://${APP}.${NS}.svc.cluster.local:${SPORT}" + TAG=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12) + HIT="probehit${TAG}" + MISS="probemiss${TAG}" + + HIT_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${HIT}" 2>/dev/null || echo "000") + MISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${MISS}" 2>/dev/null || echo "000") + echo " $APP -> $POD: matched request HTTP $HIT_CODE, unmatched request HTTP $MISS_CODE" + + LOG="" + ATTEMPT=0 + while [ $ATTEMPT -lt 10 ]; do + ATTEMPT=$((ATTEMPT + 1)) + LOG=$(pod_log "$NS" "$POD") + if printf '%s' "$LOG" | grep -q "$HIT"; then break; fi + sleep 2 + done + + if ! printf '%s' "$LOG" | grep -q "$HIT"; then + echo " $APP: FAIL — header-matched request never reached PR pod $POD (intercept is not routing)" + echo " --- last 20 log lines of $POD ---" + printf '%s\n' "$LOG" | tail -n 20 | sed 's/^/ /' + FAILED=1 + elif printf '%s' "$LOG" | grep -q "$MISS"; then + echo " $APP: FAIL — unmatched request also reached PR pod $POD (intercept steals all traffic)" + FAILED=1 + else + echo " $APP: PASS — PR pod $POD served the matched request and not the unmatched one" + fi + done + echo "" + if [ "$FAILED" -ne 0 ]; then + echo "FAIL: intercept routing not proven" + exit 1 + fi + echo "PASS: intercept routing proven from PR pod access logs" + echo "" + elif [ -n "$BUILD_APPS" ]; then + echo "Routing proof skipped: deployed-pods not provided" + echo "" + fi + echo "Propagation validation complete." From 978fda5e593f27f3513316e11d8ea521552826bc Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 21:52:24 -0400 Subject: [PATCH 23/30] docs(intercepts): record the iptables root cause from full logs Co-authored-by: Cursor --- docs/intercept-backends.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/intercept-backends.md b/docs/intercept-backends.md index 43969a9..573c174 100644 --- a/docs/intercept-backends.md +++ b/docs/intercept-backends.md @@ -52,7 +52,7 @@ Commits on `fix/post-deploy-checks`, in order, each verified by a full CI run | Downgrade to 2.25.0 (matching the traffic manager). | Intercept created. Header-matched request to the Service hung (`HTTP 000`); unmatched request passed. | | `--never-proxy /32` and a local `socat` relay to the PR pod. | Same hang. | | Whole-port TCP intercept (`--mechanism tcp`) with a header router in front. | Steals *all* traffic to the port, which violates contract item 2, and Telepresence reported `container port 80 is already intercepted`. Rejected. | -| `--plaintext` (HTTP intercepts default to TLS toward the handler; the PR pod is plaintext nginx). | The traffic-agent logged `Allowing non-conflicting intercept ...:demo-fe to become active`, then the fail-fast smoke probe in the deploy step failed. The reason was not recoverable from the artifact because log collection used `kubectl logs -l ...`, which defaults to the last 10 lines per container (fixed in `368b117`). | +| `--plaintext` (HTTP intercepts default to TLS toward the handler; the PR pod is plaintext nginx). | Intercept `ACTIVE`, filter `HTTP requests with header 'X-Dev-Session: pr-95'`. Smoke probe: headered request `HTTP 000` then `502`, unmatched `200`. Root cause visible only once log collection stopped truncating to 10 lines (`368b117`): `connector/session : root session exited with error: exec: "iptables": executable file not found in $PATH`. The client image (`bitnami/kubectl`) has no `iptables`, so the client's root session (the tunnel that carries intercepted requests back to the handler) never started. | Other costs of the in-cluster sidecar design that mirrord does not have: @@ -136,10 +136,12 @@ mirrord works the same way from the laptop (`mirrord exec`). ## 7. Reopening the in-cluster Telepresence path -If someone wants to make the sidecar variant real, the remaining unknown is -the smoke-probe failure after `--plaintext` on 2.25.0. Start from a run with -full logs (`368b117` or later), read the deploy step's dump of the client -daemon logs (`/tmp/.cache/telepresence/logs/*.log`) and the traffic-agent log, -and reproduce on a local kind cluster rather than in 15-minute CI cycles. Any -fix must pass the routing proof in section 4 for both matched and unmatched -traffic before the matrix entry is restored. +The last known blocker is small: the client image lacks `iptables`, so the +Telepresence root session exits at connect time (section 3, last row). The +next step is to add `iptables` to `build-images/Dockerfile.telepresence` +(the client already runs privileged as root with a tun device), re-run +`--intercept-backend telepresence`, and read the deploy step's smoke probe +and daemon log dump (`/tmp/.cache/telepresence/logs/*.log`). Prefer a local +kind cluster over 15-minute CI cycles. Any fix must pass the routing proof in +section 4 for both matched and unmatched traffic before the matrix entry is +restored. From 84c61054ed4b9ba76d826ad4a911e490d6a239f5 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 22:15:28 -0400 Subject: [PATCH 24/30] mirrord proxy: run as its own ServiceAccount and fail closed on the steal The proxy pod ran as staging:default and mirrord exec died on 'deployments.apps demo-fe is forbidden' within a second on every run. The deploy step only waited for pod Ready, which a probe-less container reports the instant it runs, so the check usually passed on a flicker and validate-propagation then passed on the /propagation echo. Neither backend had ever routed a header request to a PR pod in CI. - scripts/install-mirrord-intercept-rbac.sh: ServiceAccount + Role (read pods/deployments/replicasets, create the agent Job); called by run-product-intercept-e2e.sh and run-e2e-with-intercepts.sh - deploy-intercept-mirrord: serviceAccountName param, restartPolicy Never, gate on first mirrord error / any restart / proxy serving - docs: intercept-backends.md section 4 corrected; setup steps updated Co-authored-by: Cursor --- README.md | 5 +- docs/README-FULL.md | 4 +- docs/intercept-backends.md | 40 +++++++++---- scripts/install-mirrord-intercept-rbac.sh | 72 +++++++++++++++++++++++ scripts/run-e2e-with-intercepts.sh | 2 + scripts/run-product-intercept-e2e.sh | 6 +- tasks/deploy-intercept-mirrord.yaml | 61 +++++++++++++++++-- 7 files changed, 171 insertions(+), 19 deletions(-) create mode 100755 scripts/install-mirrord-intercept-rbac.sh diff --git a/README.md b/README.md index 9fb581f..d3d9afa 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,10 @@ flowchart LR kubectl apply -f tasks/ kubectl apply -f pipeline/ -# 5. Optional: Telepresence Traffic Manager (laptop intercepts / experimental in-cluster backend) +# 5. mirrord intercept proxy identity (ServiceAccount + Role in staging) +./scripts/install-mirrord-intercept-rbac.sh + +# 5b. Optional: Telepresence Traffic Manager (laptop intercepts / experimental in-cluster backend) ./scripts/install-telepresence-traffic-manager.sh # 6. Optional: Postgres + Tekton Results (persist run history) diff --git a/docs/README-FULL.md b/docs/README-FULL.md index 903ec98..41592b7 100644 --- a/docs/README-FULL.md +++ b/docs/README-FULL.md @@ -487,7 +487,7 @@ Then install Tekton and this repo’s tasks/pipelines: ./scripts/install-tekton.sh ``` -mirrord needs no cluster-side install. Optionally install the **Telepresence Traffic Manager** for laptop intercepts or the experimental in-cluster Telepresence backend: +mirrord needs no cluster-side install beyond the proxy pod identity (`./scripts/install-mirrord-intercept-rbac.sh`, once per namespace). Optionally install the **Telepresence Traffic Manager** for laptop intercepts or the experimental in-cluster Telepresence backend: ```bash ./scripts/install-telepresence-traffic-manager.sh @@ -497,7 +497,7 @@ mirrord needs no cluster-side install. Optionally install the **Telepresence Tra **1b. Other local clusters (minikube, k3d)** -Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines (mirrord intercepts need no cluster-side install; the Telepresence Traffic Manager is only needed for laptop intercepts). Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): +Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines and run `./scripts/install-mirrord-intercept-rbac.sh` (the Telepresence Traffic Manager is only needed for laptop intercepts). Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): ```bash kubectl apply -f tasks/ diff --git a/docs/intercept-backends.md b/docs/intercept-backends.md index 573c174..e2a1653 100644 --- a/docs/intercept-backends.md +++ b/docs/intercept-backends.md @@ -1,7 +1,9 @@ # Intercept backends: mirrord in CI, Telepresence on the laptop **Status (2026-09-27):** mirrord is the only intercept backend the PR pipeline -runs in CI and the default everywhere (`intercept-backend=mirrord`). The +runs in CI and the default everywhere (`intercept-backend=mirrord`). Until this +change neither backend had ever routed a header request to a PR pod in CI; +section 4 explains how mirrord's green was a race and what now proves routing. The in-cluster Telepresence sidecar task is kept as **experimental** and is not exercised by CI. Telepresence remains supported as a **laptop** workflow. @@ -69,15 +71,33 @@ latter. `tasks/deploy-intercept-mirrord.yaml` runs the built image as the real app in the PR pod and uses `mirrord exec` with `http_filter.header_filter` in steal -mode, relaying matched requests through `socat` to the PR pod IP. It has been -green on every run of PR #109 since its proxy pod's crash loop (non-root home -directory) was fixed. - -That green was also audited for false positives. The `/propagation` endpoint -is served identically by the baseline and the PR pod and simply echoes the -header it received, so `PASS — REACHED session=pr-N` alone does not prove -which pod answered. `validate-stack-propagation` therefore now adds a -**routing proof**, fail-closed, per intercepted app: +mode, relaying matched requests through `socat` to the PR pod IP. + +Its green runs were audited too, and they were **also false positives** until +this change. The proxy pod ran as the namespace `default` ServiceAccount, and +`mirrord exec` died within a second on +`deployments.apps "demo-fe" is forbidden: User "system:serviceaccount:staging:default"`. +The deploy step only checked `kubectl wait --for=condition=Ready`; a container +with no readiness probe is Ready the instant it runs, so the wait usually +caught that one-second window and printed `Intercept active`. Run +`36367430488` lost the race (`Restart Count: 4`) and exposed it. Downstream, +`/propagation` is served identically by the baseline and the PR pod and simply +echoes the header it received, so `PASS — REACHED session=pr-N` alone never +proved which pod answered. + +So as of 2026-09-27 **neither backend had ever routed a header request to a +PR pod in CI**. mirrord is the one worth finishing because its failure is a +plain RBAC gap and it needs no privileged client, no restart of the live +Deployment, and no version coupling. Fixes in this PR: + +- The proxy pod runs as `mirrord-intercept` (ServiceAccount + namespace Role: + read pods/deployments/replicasets, create the agent Job), created by + `scripts/install-mirrord-intercept-rbac.sh`, which the runners call. +- The deploy step fails closed on the first mirrord error line, any restart, + or a proxy that is not serving (`restartPolicy: Never`; direct probe through + socat to the PR pod, or 30 s Running and error-free). +- `validate-stack-propagation` adds a **routing proof**, fail-closed, per + intercepted app: 1. `GET /propagation?probehit` **with** the header. The id must appear in the PR pod's access log (nginx logs every request line to stdout; diff --git a/scripts/install-mirrord-intercept-rbac.sh b/scripts/install-mirrord-intercept-rbac.sh new file mode 100755 index 0000000..ae4cf23 --- /dev/null +++ b/scripts/install-mirrord-intercept-rbac.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# Create the ServiceAccount + Role the in-cluster mirrord proxy pod runs as. +# +# `mirrord exec` inside the proxy pod must resolve its target Deployment and +# create the mirrord-agent Job in the same namespace. The pipeline SA cannot +# create ServiceAccounts, so a cluster admin runs this once per namespace +# (run-cluster-ci.sh / run-product-intercept-e2e.sh do it for CI). +# +# Usage: ./scripts/install-mirrord-intercept-rbac.sh [--namespace staging] [--name mirrord-intercept] +set -euo pipefail + +NAMESPACE="${MIRRORD_INTERCEPT_NAMESPACE:-staging}" +SA_NAME="${MIRRORD_INTERCEPT_SA:-mirrord-intercept}" + +while [[ $# -gt 0 ]]; do + case "$1" in + --namespace) NAMESPACE="$2"; shift 2 ;; + --name) SA_NAME="$2"; shift 2 ;; + -h|--help) sed -n '2,10p' "$0"; exit 0 ;; + *) echo "unknown arg: $1" >&2; exit 64 ;; + esac +done + +kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f - + +cat < replicaset -> pod) and agent placement. + - apiGroups: [""] + resources: ["pods", "pods/log", "services", "endpoints"] + verbs: ["get", "list", "watch"] + - apiGroups: ["apps"] + resources: ["deployments", "replicasets", "statefulsets"] + verbs: ["get", "list", "watch"] + # The mirrord-agent runs as a Job in the target namespace. + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["get", "list", "watch", "create", "delete"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: ${SA_NAME} + namespace: ${NAMESPACE} + labels: + app.kubernetes.io/part-of: tekton-job-standardization +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: ${SA_NAME} +subjects: + - kind: ServiceAccount + name: ${SA_NAME} + namespace: ${NAMESPACE} +EOF + +echo "OK: ServiceAccount ${NAMESPACE}/${SA_NAME} ready for the mirrord intercept proxy" diff --git a/scripts/run-e2e-with-intercepts.sh b/scripts/run-e2e-with-intercepts.sh index a095aff..6d3f727 100755 --- a/scripts/run-e2e-with-intercepts.sh +++ b/scripts/run-e2e-with-intercepts.sh @@ -68,6 +68,8 @@ fi # Ensure SA and RBAC for pipeline (deploy in staging, etc.) kubectl create serviceaccount tekton-pr-sa -n "$NAMESPACE" 2>/dev/null || true kubectl create clusterrolebinding tekton-pr-sa-admin --clusterrole=cluster-admin --serviceaccount="$NAMESPACE":tekton-pr-sa 2>/dev/null || true +# Identity for the in-cluster mirrord proxy pod (reads the target Deployment, creates the agent Job) +"$SCRIPT_DIR/install-mirrord-intercept-rbac.sh" --namespace staging echo "==============================================" echo " E2E with live Telepresence intercepts" diff --git a/scripts/run-product-intercept-e2e.sh b/scripts/run-product-intercept-e2e.sh index f4b098e..40b6e5f 100755 --- a/scripts/run-product-intercept-e2e.sh +++ b/scripts/run-product-intercept-e2e.sh @@ -203,8 +203,10 @@ verify_pr_evidence() { resolve_api_token start_port_forward -# The pipeline SA cannot create ServiceAccounts. Telepresence connect runs -# inside the PR pod and needs an API client the runner creates here. +# The pipeline SA cannot create ServiceAccounts. The mirrord proxy pod (and, +# for the experimental backend, the Telepresence client pod) needs an API +# identity the runner creates here. +"$(dirname "$0")/install-mirrord-intercept-rbac.sh" --namespace staging if [[ "$INTERCEPT_BACKEND" == "telepresence" ]]; then kubectl create namespace staging --dry-run=client -o yaml | kubectl apply -f - kubectl create serviceaccount telepresence-intercept -n staging \ diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 02166f3..07aee29 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -37,6 +37,13 @@ spec: type: string default: "localhost:5000/tekton-dag-build-mirrord:latest" description: "Image for mirrord proxy pods (mirrord CLI + socat)" + - name: proxy-service-account + type: string + default: "mirrord-intercept" + description: | + ServiceAccount the proxy pod runs as. mirrord exec must read the target + Deployment and create the mirrord-agent Job; the default SA cannot. + Create it with scripts/install-mirrord-intercept-rbac.sh. workspaces: - name: shared-workspace description: "Workspace to write deployed-pods.json for pass-through result" @@ -57,6 +64,7 @@ spec: INTERCEPT="$(params.intercept-header-value)" DEFAULT_NS="$(params.default-namespace)" MIRRORD_IMAGE="$(params.mirrord-image)" + PROXY_SA="$(params.proxy-service-account)" DEPLOYED_PODS_FILE="$(workspaces.shared-workspace.path)/deployed-pods.json" echo "=============================================" @@ -172,7 +180,9 @@ spec: component: ${APP} managed-by: tekton-job-standardization spec: + serviceAccountName: ${PROXY_SA} hostPID: true + restartPolicy: Never containers: - name: mirrord-proxy image: ${MIRRORD_IMAGE} @@ -206,12 +216,55 @@ spec: name: ${CM_NAME} PROXYPOD - if ! kubectl wait --for=condition=Ready "pod/${PROXY_NAME}" --namespace "$NS" --timeout=120s; then - echo "ERROR: mirrord proxy ${PROXY_NAME} did not become Ready" >&2 - kubectl describe "pod/${PROXY_NAME}" -n "$NS" >&2 || true - kubectl logs "pod/${PROXY_NAME}" -n "$NS" >&2 || true + # Fail closed. A Ready flicker is not proof: with no readiness probe a + # container is Ready the instant it runs, and mirrord exec can fail a + # second later. Require the proxy to (1) still be Running with zero + # restarts, (2) have no mirrord error in its log, and (3) actually + # serve: a request to the proxy's own IP:CPORT goes socat -> PR pod. + PROXY_OK=false + CODE="000" + RUNNING_SINCE=0 + DEADLINE=$(( $(date +%s) + 180 )) + while [ "$(date +%s)" -lt "$DEADLINE" ]; do + PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") + PROXY_IP=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.podIP}' 2>/dev/null || echo "") + PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) + if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ + || printf '%s' "$PROXY_LOG" | grep -Eq 'ERROR mirrord|Failed to create mirrord-agent|Forbidden|^Error:'; then + break + fi + if [ "$PHASE" = "Running" ] && [ -n "$PROXY_IP" ]; then + [ "$RUNNING_SINCE" -gt 0 ] || RUNNING_SINCE=$(date +%s) + CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 3 --max-time 10 \ + "http://${PROXY_IP}:${CPORT}/" 2>/dev/null || echo "000") + if [ "$CODE" = "200" ]; then + PROXY_OK=true + break + fi + # The mirrord layer may own socat's listener; accept a proxy that + # has stayed Running and error-free for 30s. validate-propagation + # still proves routing from the PR pod's own access log. + if [ $(( $(date +%s) - RUNNING_SINCE )) -ge 30 ]; then + PROXY_OK=true + break + fi + else + RUNNING_SINCE=0 + fi + sleep 3 + done + if ! $PROXY_OK; then + echo "ERROR: mirrord proxy ${PROXY_NAME} is not serving (phase=${PHASE:-?} restarts=${RESTARTS:-?})" >&2 + echo "--- proxy pod log ---" >&2 + kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true + echo "--- proxy pod describe ---" >&2 + kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true + echo "--- mirrord agent jobs/pods in $NS ---" >&2 + kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true exit 1 fi + echo " Proxy ${PROXY_NAME} serving via socat -> PR pod (HTTP 200, 0 restarts)" echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" echo "" From 011938cfbd25e6dc2ab378c4f38bd3fc2a2bf3f5 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 22:25:14 -0400 Subject: [PATCH 25/30] Remove in-cluster Telepresence; mirrord is the only intercept backend Deletes tasks/deploy-intercept.yaml, build-images/Dockerfile.telepresence, scripts/install-telepresence-traffic-manager.sh and PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md; drops the deploy-intercepts-telepresence branch from both PR pipelines so deploy-intercepts-mirrord runs unconditionally; removes the Telepresence ServiceAccount block from the E2E runner and the telepresence tool image from build-and-push. intercept-backend/INTERCEPT_BACKEND stay for API compatibility with mirrord as the only accepted value. Static acceptance tests now assert the mirrord-only matrix, the proxy's own ServiceAccount + fail-closed gate, and the PR-pod routing proof. Docs and setup scripts updated; docs/intercept-backends.md records the removal and the evidence. Co-authored-by: Cursor --- .github/workflows/intercept-e2e.yml | 5 +- PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md | 174 -------- README.md | 8 +- build-images/Dockerfile.telepresence | 13 - build-images/build-and-push.sh | 2 +- docs/CUSTOMIZATION.md | 12 +- docs/README-FULL.md | 13 +- docs/README.md | 2 +- docs/REGRESSION.md | 2 +- docs/SCRIPTS.md | 6 +- docs/intercept-backends.md | 85 ++-- docs/research/contributions.md | 2 +- docs/research/evaluation.md | 4 +- helm/tekton-dag/README.md | 4 +- .../tests/fixtures/pipelineruns/pr.json | 2 +- .../tests/test_m13_manifests.py | 32 +- .../tests/test_m17_intercept_automation.py | 4 +- operator/internal/pipeline/builder_test.go | 2 +- .../internal/pipeline/testdata/golden/pr.json | 2 +- orchestrator/README.md | 2 +- orchestrator/tests/conftest.py | 2 +- .../tests/test_pipelinerun_goldens.py | 2 +- pipeline/stack-pr-continue-pipeline.yaml | 29 +- pipeline/stack-pr-pipeline.yaml | 33 +- scripts/extract-standalone-repo.sh | 6 +- scripts/generate-run.sh | 4 +- scripts/install-tekton.sh | 4 +- .../install-telepresence-traffic-manager.sh | 63 --- scripts/run-all-setup-and-test.sh | 6 +- scripts/run-e2e-with-intercepts.sh | 11 +- scripts/run-product-intercept-e2e.sh | 18 +- scripts/run-stack-tests-runners.sh | 2 +- tasks/deploy-intercept.yaml | 413 ------------------ 33 files changed, 128 insertions(+), 841 deletions(-) delete mode 100644 PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md delete mode 100644 build-images/Dockerfile.telepresence delete mode 100755 scripts/install-telepresence-traffic-manager.sh delete mode 100644 tasks/deploy-intercept.yaml diff --git a/.github/workflows/intercept-e2e.yml b/.github/workflows/intercept-e2e.yml index ddaf805..ac6517d 100644 --- a/.github/workflows/intercept-e2e.yml +++ b/.github/workflows/intercept-e2e.yml @@ -1,5 +1,5 @@ # Weekly (and path-filtered) product-path evidence: trigger → StackRun → -# operator → PR PipelineRun → intercept (Telepresence or mirrord) → tests. +# operator → PR PipelineRun → mirrord intercept → routing proof → tests. # Not the everyday PR gate — local-regression.yml is. Path filters still # start Kind when Helm/tasks/operator/orchestrator/pipeline/stacks or the # listed scripts change. @@ -56,8 +56,7 @@ jobs: strategy: fail-fast: false matrix: - # mirrord is the only in-cluster intercept backend exercised by CI. - # Telepresence is supported as a laptop workflow only (see docs/intercept-backends.md). + # mirrord is the only in-cluster intercept backend (see docs/intercept-backends.md). backend: [mirrord] env: E2E_ARTIFACT_DIR: ${{ github.workspace }}/artifacts/${{ matrix.backend }} diff --git a/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md b/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md deleted file mode 100644 index 9090601..0000000 --- a/PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md +++ /dev/null @@ -1,174 +0,0 @@ -# PR / Telepresence Intercept — Setup Confirmation - -**Date:** 2026-03-04 -**Repository:** tekton-dag -**Pipeline:** `stack-pr-test` (`pipeline/stack-pr-pipeline.yaml`) - ---- - -## 1. PR Code Runs Alongside Original Services — Not Replacing Them - -The PR pipeline deploys a **separate Pod** for the changed app. The original -Deployment and Service remain running and continue to serve all normal traffic. - -### How it works - -| Component | Behavior during PR test | -|-----------|------------------------| -| **Original service** | Untouched. Continues running and serving non-PR traffic. | -| **PR pod** | Created as a standalone Pod with labels `app: pr-test`, `component: `, `managed-by: tekton-job-standardization`. | -| **Telepresence intercept** | Routes **only** requests carrying the PR header (e.g. `x-dev-session:pr-42`) to the PR pod. All other traffic goes to the original service. | -| **After tests** | PR pod is removed by the `cleanup-stack-pods` finally task. Original service is never modified. | - -### Concrete example - -For a stack **A → B → C → D** where **C** changed in the PR: - -- **A, B, D** — normal deployed services, untouched -- **C** — Telepresence intercepts the existing C service so that requests - carrying the PR's baggage header get routed to the PR pod running the new C build -- The e2e test enters through **A** with the header; **B** forwards it to **C** - (intercepted → PR pod); **C** forwards to **D** normally -- All other traffic to **C** (without the header) continues to the original C deployment - -### Key configuration - -- **Intercept header:** `x-dev-session:pr-` (configurable via stack `propagation.header-name`) -- **Intercept command:** `telepresence intercept --namespace --port : --http-match
` -- **PR pod naming:** `pr--` -- **Telepresence image:** `localhost:5000/tekton-dag-build-telepresence:latest` (CLI). Traffic Manager stays `tel2`, installed separately. - -### Source references - -| File | What it confirms | -|------|------------------| -| `tasks/deploy-intercept.yaml` (lines 9–23) | PR pods are additive; original services are untouched | -| `pipeline/stack-pr-pipeline.yaml` (lines 9–13) | Pipeline uses currently running apps; only changed app is built | -| `tasks/deploy-intercept.yaml` (lines 193–227) | PR pod spec with distinct labels, separate from original Deployment | -| `tasks/cleanup-stack.yaml` | PR pods are removed in `finally` block | - ---- - -## 2. Valid Tests Exist for the Telepresence Intercept - -The pipeline executes three layers of testing after intercepts are deployed. - -### Layer 1 — Propagation Validation - -**Task:** `validate-stack-propagation` (`tasks/validate-propagation.yaml`) - -Sends a request through the entry app with the intercept header and verifies -hop-by-hop that the header reaches the intercepted app(s). Confirms the -Telepresence routing is active and the baggage chain is intact. - -- Validates header propagation from entry point **up to** the intercepted app -- Understands propagation roles: originator sets, forwarder passes through, terminal receives -- Accounts for multi-intercept scenarios (header must continue past forwarders when another intercept is downstream) - -### Layer 2 — End-to-End Through Entry Point - -**Task:** `run-stack-tests` (`tasks/run-stack-tests.yaml`) — Phase 1 - -Sends requests through the stack's entry app (frontend) with the intercept -header attached. This exercises the **full chain** including the PR build. - -- Request enters at A, flows through the chain, hits the PR build via Telepresence -- Proves the PR app works correctly in the context of the full stack -- Uses Artillery load test template with intercept headers pre-configured - -### Layer 3 — Per-App Test Suites - -**Task:** `run-stack-tests` (`tasks/run-stack-tests.yaml`) — Phase 2 - -Runs each app's configured test suites with the intercept header: - -| Test type | Tool | Purpose | -|-----------|------|---------| -| API tests | Postman / Newman | Functional API validation | -| UI tests | Playwright | Browser-based UI testing | -| Load tests | Artillery | Performance under load | - -- For **intercepted apps**: validates the PR build directly -- For **non-intercepted apps**: validates they still work correctly with the header present - -### Test execution order in pipeline - -``` -deploy-intercepts - │ - ▼ -validate-propagation ← Header reaches intercepted app(s)? - │ - ▼ -run-tests ← E2E + per-app suites with intercept header - │ - ▼ -finally: - ├── cleanup ← Remove PR pods - └── post-pr-comment ← Report results on GitHub PR -``` - -### Source references - -| File | What it confirms | -|------|------------------| -| `tasks/validate-propagation.yaml` | Propagation validation logic and scenarios | -| `tasks/run-stack-tests.yaml` | Two-phase test execution (E2E + per-app) | -| `tests/artillery/entry-e2e.yml` | Artillery template with `x-dev-session` and `baggage` headers | -| `pipeline/stack-pr-pipeline.yaml` (lines 306–341) | Pipeline wiring: validate → test → cleanup | - ---- - -## 3. Summary - -| Requirement | Status | Evidence | -|-------------|--------|----------| -| PR code does **not** replace the original service | **Confirmed** | Separate Pod with distinct labels; Telepresence header-based routing; original Deployment untouched | -| PR code runs **alongside** the original service | **Confirmed** | Both original Deployment and PR Pod serve traffic simultaneously; header determines routing | -| Original service continues serving non-PR traffic | **Confirmed** | Only requests with `x-dev-session:pr-` route to PR pod | -| Valid tests exist for the intercept | **Confirmed** | Three-layer testing: propagation validation, E2E through entry, per-app suites | -| Tests use the intercept header | **Confirmed** | All test phases inject `x-dev-session` and `baggage` headers | -| PR pods are cleaned up after tests | **Confirmed** | `cleanup-stack-pods` runs in pipeline `finally` block | - ---- - -## 4. Milestone 5: Original Traffic Validation and MetalBear Evaluation - -Milestone 5 ([milestones/milestone-5.md](milestones/milestone-5.md)) adds two areas of work: - -### 4.1 Original traffic validation (implemented) - -A new pipeline task `validate-original-traffic` sends requests to every service -**without any intercept headers** while Telepresence intercepts are active. This -explicitly proves that the original deployments continue to serve normal traffic -during the PR test window. - -Three validation phases: - -| Phase | What it does | -|-------|-------------| -| Direct health check | `curl` each service without headers — must get HTTP 2xx/3xx | -| Entry-point passthrough | Request through the full chain without headers — must reach all original deployments | -| Artillery load burst | 10-second burst at 5 req/s without headers — must maintain < 10% error rate | - -The task runs **in parallel** with `validate-propagation` (no additional pipeline -duration) and both must pass before `run-tests` begins. - -| File | Purpose | -|------|---------| -| `tasks/validate-original-traffic.yaml` | Tekton task with 3-phase validation | -| `tests/artillery/original-traffic-e2e.yml` | Standalone Artillery config for local testing | -| `pipeline/stack-pr-pipeline.yaml` | Pipeline wiring (parallel validation) | - -### 4.2 MetalBear (mirrord) evaluation (planned) - -Evaluate [mirrord](https://mirrord.dev/) as an alternative to Telepresence for -header-based traffic interception in the PR pipeline. Key evaluation areas: - -- Header-based intercept parity with `--http-header-filter` -- In-cluster execution feasibility (Tekton pod → mirrord → target service) -- Reduced cluster footprint (no persistent Traffic Manager) -- Traffic mirroring capability for shadow/comparison testing - -See [milestones/milestone-5.md](milestones/milestone-5.md) for full PoC tasks -and decision criteria. diff --git a/README.md b/README.md index d3d9afa..84c9885 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Each row links to the **in-browser player** on Pages (`#seg-…`) and to the **c | [M4.1](milestones/milestone-4.1.md) | **Completed** | Standalone baggage libraries (Spring Boot, Node, Flask, PHP) | | [M5](milestones/milestone-5.md) | **Completed** | Original traffic validation + mirrord evaluation | | [M6](milestones/milestone-6.md) | **Completed** | Full MetalBear testing (all intercept scenarios) | -| [M7](milestones/milestone-7.md) | **Completed** | Dual intercept backend via `intercept-backend` param; mirrord is the CI-verified default since 2026-09-27 ([why](docs/intercept-backends.md)) | +| [M7](milestones/milestone-7.md) | **Completed** | Dual intercept backend via `intercept-backend` param. Superseded 2026-09-27: in-cluster Telepresence removed, mirrord only ([why](docs/intercept-backends.md)) | | [M7.1](milestones/milestone-7-1.md) | **Completed** | Pipeline speed: parallel containerize, Kaniko cache, parallel clone | | [M8](milestones/milestone-8.md) | **Partial** | Demo assets: Manim + TTS + composed segments + [GitHub Pages](https://jmjava.github.io/tekton-dag/); VHS terminal recordings, Slidev PDF, full concat still open | | [M9](milestones/milestone-9.md) | **Completed** | Test-trace regression graph + minimal test selection (Neo4j, mock Datadog). 10 Newman requests, 36 assertions. Test filtering in PR pipeline. | @@ -171,7 +171,7 @@ flowchart LR | **Merge** (`stack-merge-release`) | Promote RC to release, build, tag release images, push next dev cycle version commit. | | **Promote** (`stack-promote`) | Copy release-tagged images to a target registry/environment (`registries.yaml` or API overrides); optional approval gate. | -**Intercept backends:** mirrord (default, the only backend CI verifies) or Telepresence (experimental in-cluster; supported on the laptop), selected via pipeline param `intercept-backend`. See [docs/intercept-backends.md](docs/intercept-backends.md) for why the in-cluster Telepresence path was dropped from CI and how routing is now proven from PR pod access logs. Weekly/manual CI is [`.github/workflows/intercept-e2e.yml`](.github/workflows/intercept-e2e.yml) (`scripts/run-product-intercept-e2e.sh`). Treat only a recent successful matrix job and its retained traffic artifact as verification ([M17.3](milestones/milestone-17.md)). +**Intercept backend:** mirrord (header steal, routing proven from the PR pod access log). The in-cluster Telepresence backend was removed on 2026-09-27; Telepresence remains a laptop tool only. See [docs/intercept-backends.md](docs/intercept-backends.md). Weekly/manual CI is [`.github/workflows/intercept-e2e.yml`](.github/workflows/intercept-e2e.yml) (`scripts/run-product-intercept-e2e.sh`). Treat only a recent successful matrix job and its retained traffic artifact as verification ([M17.3](milestones/milestone-17.md)). **Orchestration service** (M10): In-cluster Flask service that receives GitHub webhooks, resolves repo-to-stack dynamically, and creates **StackRun** CRs. The Go operator reconciles each StackRun into a Tekton PipelineRun. Packaged via Helm (`operator.enabled` defaults **true**) with an ArgoCD ApplicationSet for multi-team provisioning. Mutation APIs require a bearer token. See [docs/m10-multi-team-architecture.md](docs/m10-multi-team-architecture.md) and [orchestrator/README.md](orchestrator/README.md). @@ -199,9 +199,6 @@ kubectl apply -f pipeline/ # 5. mirrord intercept proxy identity (ServiceAccount + Role in staging) ./scripts/install-mirrord-intercept-rbac.sh -# 5b. Optional: Telepresence Traffic Manager (laptop intercepts / experimental in-cluster backend) -./scripts/install-telepresence-traffic-manager.sh - # 6. Optional: Postgres + Tekton Results (persist run history) ./scripts/install-postgres-kind.sh ./scripts/install-tekton-results.sh @@ -234,7 +231,6 @@ kubectl port-forward svc/el-stack-event-listener 8080:8080 -n tekton-pipelines & ```bash # Product path against a cluster that already has the control plane ./scripts/run-product-intercept-e2e.sh --intercept-backend mirrord -./scripts/run-product-intercept-e2e.sh --intercept-backend telepresence # experimental, not CI-gated # Full local helper (bootstrap + PR pipeline) ./scripts/run-e2e-with-intercepts.sh --intercept-backend mirrord diff --git a/build-images/Dockerfile.telepresence b/build-images/Dockerfile.telepresence deleted file mode 100644 index 0df212c..0000000 --- a/build-images/Dockerfile.telepresence +++ /dev/null @@ -1,13 +0,0 @@ -# CLI image for in-cluster intercepts. -# ghcr.io/telepresenceio/tel2 is the traffic agent and does not contain -# the telepresence binary the deploy task runs. -FROM bitnami/kubectl:latest - -USER root -ARG TELEPRESENCE_VERSION=2.25.0 -RUN install_packages socat 2>/dev/null || (apt-get update -qq && apt-get install -y -qq --no-install-recommends socat && rm -rf /var/lib/apt/lists/*) -RUN curl -fsSL "https://github.com/telepresenceio/telepresence/releases/download/v${TELEPRESENCE_VERSION}/telepresence-linux-amd64" -o /usr/local/bin/telepresence \ - && chmod +x /usr/local/bin/telepresence \ - && telepresence version \ - && socat -V -USER 1001 diff --git a/build-images/build-and-push.sh b/build-images/build-and-push.sh index b9a02d5..1e2f1ca 100755 --- a/build-images/build-and-push.sh +++ b/build-images/build-and-push.sh @@ -52,7 +52,7 @@ build_image() { echo " -> $image" } -TOOLS=(node maven gradle python php mirrord telepresence) +TOOLS=(node maven gradle python php mirrord) echo "=== tekton-dag build images ===" echo " Registry: $REGISTRY" diff --git a/docs/CUSTOMIZATION.md b/docs/CUSTOMIZATION.md index b279964..aaee874 100644 --- a/docs/CUSTOMIZATION.md +++ b/docs/CUSTOMIZATION.md @@ -20,7 +20,7 @@ namespace: tekton-pipelines cluster: prod-us-east imageRegistry: registry.internal/squad-b cacheRepo: registry.internal/squad-b/kaniko-cache -interceptBackend: telepresence +interceptBackend: mirrord maxConcurrentRuns: 5 maxParallelBuilds: 8 stacks: @@ -34,7 +34,7 @@ teamName: "squad-b" namespace: "tekton-pipelines" imageRegistry: "registry.internal/squad-b" cacheRepo: "registry.internal/squad-b/kaniko-cache" -interceptBackend: "telepresence" +interceptBackend: "mirrord" maxParallelBuilds: 8 stackFile: "stacks/squad-b-core.yaml" gitUrl: "https://github.com/myorg/platform.git" @@ -235,13 +235,13 @@ Ensure a **compile image** exists that matches that toolchain (build and push wi ## 8. Add intercept backend support -**Goal:** Switch the intercept backend per environment. mirrord is the default and the only CI-verified backend; the in-cluster Telepresence task is experimental (see [intercept-backends.md](intercept-backends.md)). +**Goal:** Understand the intercept backend setting. mirrord is the only implemented backend; the in-cluster Telepresence task was removed (see [intercept-backends.md](intercept-backends.md)). -1. **Cluster** — install the components your chosen backend needs (e.g. Telepresence Traffic Manager or mirrord operator per vendor docs). +1. **Cluster** — run `./scripts/install-mirrord-intercept-rbac.sh` once per target namespace (ServiceAccount + Role for the proxy pod). -2. **Helm** — `interceptBackend` defaults to `"mirrord"`; set `"telepresence"` to opt into the experimental task; the orchestrator sets `INTERCEPT_BACKEND` for webhook-created runs. +2. **Helm** — `interceptBackend` is `"mirrord"`; the orchestrator sets `INTERCEPT_BACKEND` for webhook-created runs. -3. **Pipeline param** — `stack-pr-test` already exposes `intercept-backend` (`mirrord` | `telepresence`). `generate-run.sh` supports: +3. **Pipeline param** — `stack-pr-test` exposes `intercept-backend` (`mirrord`; kept for API compatibility). `generate-run.sh` supports: ```bash ./scripts/generate-run.sh --mode pr --repo demo-fe --pr 1 --intercept-backend mirrord --apply diff --git a/docs/README-FULL.md b/docs/README-FULL.md index 41592b7..b427082 100644 --- a/docs/README-FULL.md +++ b/docs/README-FULL.md @@ -82,7 +82,7 @@ On PRs, the pipeline builds images, then **deploys one pod per built app** and c `resolve-stack` sets `intercept-header-value` (e.g. `x-dev-session:pr-42`) from the stack’s `propagation.header-name` and the PR number. The same value is used for intercepts and for validation/tests. 2. **Per-app PR pods** - The **deploy-intercept-mirrord** task (default; `deploy-stack-intercepts` is the experimental Telepresence variant), for each app in `build-apps`: + The **deploy-intercept-mirrord** task, for each app in `build-apps`: - Reads from `stack-json` and `built-images`: image, namespace, container port, service port. - Creates a **Pod** running the built image (PR build) and a mirrord proxy pod that runs `mirrord exec` with an `http_filter.header_filter` steal on the live deployment, relaying matched requests to the PR pod. - So any request that matches the header (e.g. `x-dev-session: pr-42`) to the **existing** Kubernetes Service for that app is intercepted and sent to this PR pod instead of the normal deployment. @@ -374,8 +374,7 @@ tekton-job-standardization/ ├── tasks/ │ ├── resolve-stack.yaml # Parse graph, topo sort, resolve versions │ ├── build-app.yaml # Compile (npm/maven/gradle/composer/pip) + Kaniko -│ ├── deploy-intercept-mirrord.yaml # PR pods + mirrord header-steal intercepts (default) -│ ├── deploy-intercept.yaml # Experimental in-cluster Telepresence intercepts (not CI-gated) +│ ├── deploy-intercept-mirrord.yaml # PR pods + mirrord header-steal intercepts │ ├── validate-propagation.yaml # Header flow validation + PR-pod routing proof │ ├── run-stack-tests.yaml # Postman / Playwright / Artillery per app │ ├── version-bump.yaml # RC bump (PR) or release promote (merge) @@ -393,7 +392,7 @@ tekton-job-standardization/ ├── verify-dag-phase2.sh # Phase 2 DAG verification (Tekton resolve vs CLI) ├── kind-with-registry.sh # Create kind cluster + local registry (localhost:5000) ├── install-tekton.sh # Install Tekton Pipelines + git-clone + stack tasks/pipelines - └── install-telepresence-traffic-manager.sh # Install Traffic Manager for PR intercepts + └── install-mirrord-intercept-rbac.sh # ServiceAccount + Role for the mirrord proxy pod ``` ## Pipeline Flows @@ -487,17 +486,17 @@ Then install Tekton and this repo’s tasks/pipelines: ./scripts/install-tekton.sh ``` -mirrord needs no cluster-side install beyond the proxy pod identity (`./scripts/install-mirrord-intercept-rbac.sh`, once per namespace). Optionally install the **Telepresence Traffic Manager** for laptop intercepts or the experimental in-cluster Telepresence backend: +mirrord needs no cluster-side install beyond the proxy pod identity, once per namespace: ```bash -./scripts/install-telepresence-traffic-manager.sh +./scripts/install-mirrord-intercept-rbac.sh ``` (Optional: `--version 2.20.0` to match the sidecar image in `deploy-intercept`; default is 2.20.0.) **1b. Other local clusters (minikube, k3d)** -Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines and run `./scripts/install-mirrord-intercept-rbac.sh` (the Telepresence Traffic Manager is only needed for laptop intercepts). Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): +Create a cluster with [minikube](https://minikube.sigs.k8s.io/) or [k3d](https://k3d.io/). Install Tekton Pipelines and run `./scripts/install-mirrord-intercept-rbac.sh`. Apply this repo’s tasks and pipelines (and the git-clone task from the Tekton catalog if needed): ```bash kubectl apply -f tasks/ diff --git a/docs/README.md b/docs/README.md index bba7023..5a9a187 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,7 +10,7 @@ This folder contains design, operations, and verification docs for the tekton-da | **Milestones (historical)** | [../milestones/completed/](../milestones/completed/) — M2, M3 | | **Archive (not maintained)** | [archive/](archive/) — obsolete session plans and similar | | **Customization & ops** | [CUSTOMIZATION.md](CUSTOMIZATION.md), [MAINTENANCE.md](MAINTENANCE.md) | -| **Intercept backends** | [intercept-backends.md](intercept-backends.md) — mirrord in CI (with PR-pod routing proof), Telepresence laptop-only; why the in-cluster Telepresence path was dropped | +| **Intercept backends** | [intercept-backends.md](intercept-backends.md) — mirrord with PR-pod routing proof; why the in-cluster Telepresence backend was removed | | **Teams: stacks + baggage libs** | [BAGGAGE-CONTRACT.md](BAGGAGE-CONTRACT.md) — original override header hop-to-hop; [TEAM-ONBOARDING-STACKS-AND-BAGGAGE.md](TEAM-ONBOARDING-STACKS-AND-BAGGAGE.md) — libraries + new stack checklist | | **Demo toolchain (M8)** | [demos/](demos/) — [demos/README.md](demos/README.md) (`docgen` CLI; `generate-all.sh` is a thin wrapper); [milestones/milestone-8.md](../milestones/milestone-8.md) | | **GitHub Actions** | [REGRESSION.md](REGRESSION.md) — which workflows run on every PR vs schedule/path filters | diff --git a/docs/REGRESSION.md b/docs/REGRESSION.md index b0f3254..2065152 100644 --- a/docs/REGRESSION.md +++ b/docs/REGRESSION.md @@ -132,7 +132,7 @@ Environment: 1. **Often (fast, no cluster):** `./scripts/run-regression.sh --local-only` — Phase 1 + pytest + vitest; good for frequent pushes; safe to wire into lightweight CI. 2. **System bar (cluster):** **`./scripts/run-regression.sh --cluster --require-dag-verify`** when you need a real **Succeeded** `stack-dag-verify` and orchestrator Newman — treat as **integration / system** work: before releases, after big platform changes, on a schedule, or when agents/docs require proof — **not** as “must pass on every GitHub PR” unless you explicitly configure that. 3. **With Tekton Results:** `results-regression.yml` installs pinned Results/Postgres weekly and runs the strict agent entrypoint; locally use `--with-results-verify` or rely on **auto** when the API exists. -4. **Intercept E2E:** the weekly job exercises the mirrord backend (Telepresence in-cluster was dropped from the matrix on 2026-09-27; see [intercept-backends.md](intercept-backends.md)) and retains StackRun, PipelineRun, TaskRun, pod-log, and test-traffic evidence for 30 days. +4. **Intercept E2E:** the weekly job exercises the mirrord backend with a PR-pod routing proof (in-cluster Telepresence was removed on 2026-09-27; see [intercept-backends.md](intercept-backends.md)) and retains StackRun, PipelineRun, TaskRun, pod-log, and test-traffic evidence for 30 days. After the tiers you care about are green, update [milestones/milestone-8.md](../milestones/milestone-8.md) and related testing docs. diff --git a/docs/SCRIPTS.md b/docs/SCRIPTS.md index f2527f6..06975c7 100644 --- a/docs/SCRIPTS.md +++ b/docs/SCRIPTS.md @@ -83,17 +83,17 @@ Shared helpers live in [`scripts/common.sh`](../scripts/common.sh) (sourced by m | [`merge-pr.sh`](../scripts/merge-pr.sh) | Merge helper for test PRs. | | [`rerun-pr-from.sh`](../scripts/rerun-pr-from.sh) | Create a StackRun with `spec.continueFrom` to re-run `stack-pr-continue` from a failed PR. | | [`configure-github-webhooks.sh`](../scripts/configure-github-webhooks.sh) | Wire GitHub webhooks to EventListener. | -| [`run-e2e-with-intercepts.sh`](../scripts/run-e2e-with-intercepts.sh) | Local Kind helper: bootstrap (optional) + PR pipeline with **telepresence** or **mirrord**. | +| [`run-e2e-with-intercepts.sh`](../scripts/run-e2e-with-intercepts.sh) | Local Kind helper: bootstrap (optional) + PR pipeline with **mirrord** intercepts. | | [`run-product-intercept-e2e.sh`](../scripts/run-product-intercept-e2e.sh) | Authenticated trigger → StackRun → operator → PR PipelineRun → intercept traffic. Used by [intercept-e2e.yml](../.github/workflows/intercept-e2e.yml). | | [`run-all-setup-and-test.sh`](../scripts/run-all-setup-and-test.sh) | Broad setup + test orchestration (legacy-style “do a lot”). | --- -## Intercept tooling (Telepresence, mirrord) +## Intercept tooling (mirrord) | Script | Purpose | |--------|---------| -| [`install-telepresence-traffic-manager.sh`](../scripts/install-telepresence-traffic-manager.sh) | Install Telepresence traffic manager in cluster. | +| [`install-mirrord-intercept-rbac.sh`](../scripts/install-mirrord-intercept-rbac.sh) | ServiceAccount + Role the in-cluster mirrord proxy pod runs as (once per namespace). | | [`install-mirrord.sh`](../scripts/install-mirrord.sh) | Install mirrord CLI / related setup. | | [`run-mirrord-poc.sh`](../scripts/run-mirrord-poc.sh) | Early mirrord PoC scenarios. | | [`run-mirrord-m6-scenarios.sh`](../scripts/run-mirrord-m6-scenarios.sh) | M6 mirrord test scenario driver. | diff --git a/docs/intercept-backends.md b/docs/intercept-backends.md index e2a1653..6fffceb 100644 --- a/docs/intercept-backends.md +++ b/docs/intercept-backends.md @@ -1,11 +1,13 @@ -# Intercept backends: mirrord in CI, Telepresence on the laptop +# Intercept backend: mirrord (in-cluster Telepresence removed) -**Status (2026-09-27):** mirrord is the only intercept backend the PR pipeline -runs in CI and the default everywhere (`intercept-backend=mirrord`). Until this -change neither backend had ever routed a header request to a PR pod in CI; -section 4 explains how mirrord's green was a race and what now proves routing. The -in-cluster Telepresence sidecar task is kept as **experimental** and is not -exercised by CI. Telepresence remains supported as a **laptop** workflow. +**Status (2026-09-27):** mirrord is the only intercept backend. The in-cluster +Telepresence task, its image, its traffic-manager install script and its +pipeline branch were **removed** (approved 2026-09-27). Until this change +neither backend had ever routed a header request to a PR pod in CI; section 4 +explains how mirrord's green was a race and what now proves routing. +Telepresence is not part of this repository any more; developers may still use +it from a laptop with their own install, exactly as they would use `mirrord +exec` locally. This page records why, with the evidence, so the decision can be revisited with facts rather than memory. @@ -113,55 +115,46 @@ step 2 fails. The pipeline passes `deployed-pods` (app → PR pod name) from ## 5. What changed in the repository - `.github/workflows/intercept-e2e.yml`: matrix is `[mirrord]`; the - Telepresence traffic-manager install step is gone. -- Default `intercept-backend` is `mirrord` in `pipeline/stack-pr-pipeline.yaml`, - `pipeline/stack-pr-continue-pipeline.yaml`, `scripts/run-product-intercept-e2e.sh`, - `scripts/run-e2e-with-intercepts.sh`, the orchestrator (`app.py`, - `pipelinerun_builder.py`, `k8s-deployment.yaml`), the operator - (`internal/pipeline/builder.go`), and the Helm chart (`interceptBackend`). + Telepresence traffic-manager step is gone. +- **Removed:** `tasks/deploy-intercept.yaml` (`deploy-stack-intercepts`), + `build-images/Dockerfile.telepresence` (and the `telepresence` entry in + `build-images/build-and-push.sh`), `scripts/install-telepresence-traffic-manager.sh`, + `PR-TELEPRESENCE-INTERCEPT-CONFIRMATION.md`, the `deploy-intercepts-telepresence` + branch in `pipeline/stack-pr-pipeline.yaml` and + `pipeline/stack-pr-continue-pipeline.yaml` (`deploy-intercepts-mirrord` now + runs unconditionally), and the Telepresence ServiceAccount block in + `scripts/run-product-intercept-e2e.sh`. +- `intercept-backend` / `INTERCEPT_BACKEND` / Helm `interceptBackend` are kept + for API compatibility; the only accepted value is `mirrord`. +- `tasks/deploy-intercept-mirrord.yaml`: proxy pod runs as `mirrord-intercept` + (`scripts/install-mirrord-intercept-rbac.sh`, called by both runner scripts), + `restartPolicy: Never`, fail-closed serving gate. - `tasks/validate-propagation.yaml`: new `deployed-pods` param and the routing proof above. - `scripts/run-product-intercept-e2e.sh`: `--tail=-1` on log collection so artifacts carry full step output. -Kept, marked experimental, not run by CI: +## 6. Telepresence on a laptop (outside this repository) -- `tasks/deploy-intercept.yaml` (in-cluster Telepresence client pod, 2.25.0, - `--http-header ... --plaintext`). -- `build-images/Dockerfile.telepresence`, - `scripts/install-telepresence-traffic-manager.sh`. - -Selecting it explicitly (`--intercept-backend telepresence` or the pipeline -param) still works and now fails closed at the deploy step if routing is not -live. - -## 6. Telepresence on the laptop (supported) - -This is the workflow Telepresence is designed for and the one people remember -working: +If a developer prefers Telepresence to `mirrord exec` for local debugging, they +install it themselves per the Telepresence docs (traffic manager via the +`telepresence-oss` Helm chart) and run: ```bash -./scripts/install-telepresence-traffic-manager.sh # once per cluster telepresence connect --namespace staging -telepresence intercept demo-fe --port 8080:80 \ - --http-header x-dev-session=pr-42 -# run demo-fe locally on :8080, attach a debugger, -# send a request with x-dev-session: pr-42 through the cluster entry point -telepresence leave demo-fe -telepresence quit +telepresence intercept demo-fe --port 8080:80 --http-header x-dev-session=pr-42 +# run demo-fe locally on :8080, attach a debugger, send a request with +# x-dev-session: pr-42 through the cluster entry point +telepresence leave demo-fe && telepresence quit ``` -See `.vscode/README.md` and `docs/demo-playbook.md` for the step-debug flow; -mirrord works the same way from the laptop (`mirrord exec`). +Nothing in the pipeline depends on it. -## 7. Reopening the in-cluster Telepresence path +## 7. If anyone wants in-cluster Telepresence back -The last known blocker is small: the client image lacks `iptables`, so the -Telepresence root session exits at connect time (section 3, last row). The -next step is to add `iptables` to `build-images/Dockerfile.telepresence` -(the client already runs privileged as root with a tun device), re-run -`--intercept-backend telepresence`, and read the deploy step's smoke probe -and daemon log dump (`/tmp/.cache/telepresence/logs/*.log`). Prefer a local -kind cluster over 15-minute CI cycles. Any fix must pass the routing proof in -section 4 for both matched and unmatched traffic before the matrix entry is -restored. +The history is in git (`git log -- tasks/deploy-intercept.yaml +build-images/Dockerfile.telepresence`). The last known blocker was small: the +client image lacked `iptables`, so the Telepresence root session exited at +connect time (section 3, last row). Any revival must run as its own +ServiceAccount, fail closed at deploy, and pass the routing proof in section 4 +for both matched and unmatched traffic before a matrix entry is added. diff --git a/docs/research/contributions.md b/docs/research/contributions.md index 69498b4..1514456 100644 --- a/docs/research/contributions.md +++ b/docs/research/contributions.md @@ -26,7 +26,7 @@ These are the **only** claims the workshop/tool **paper** is allowed to make unt ### C3 — Header-matched intercepts with original-traffic safety -**Claim.** On a PR, only `changed-app`(s) are built and intercepted. Matching is the same session header used for propagation. Two backends are implemented; mirrord (`header_filter`) is E2E-exercised with a fail-closed routing proof read from the PR pod access log. The in-cluster Telepresence task (`--http-header`) is experimental and not CI-gated (`docs/intercept-backends.md`). A separate **validate-original-traffic** path checks that requests *without* the header still hit baseline pods. +**Claim.** On a PR, only `changed-app`(s) are built and intercepted. Matching is the same session header used for propagation. The implemented backend is mirrord (`header_filter`), E2E-exercised with a fail-closed routing proof read from the PR pod access log; an in-cluster Telepresence variant was removed after it was shown never to have routed (`docs/intercept-backends.md`). A separate **validate-original-traffic** path checks that requests *without* the header still hit baseline pods. **Not claimed.** That Telepresence or mirrord are novel. The contribution is *CI-orchestrated, graph-aware placement* of intercepts plus an explicit safety check, not the intercept dataplane. diff --git a/docs/research/evaluation.md b/docs/research/evaluation.md index 4a27d0a..3d63ef3 100644 --- a/docs/research/evaluation.md +++ b/docs/research/evaluation.md @@ -35,7 +35,7 @@ On 2026-09-07, `bash scripts/run-regression-stream.sh --local-only --require-lan |----------|------| | `local-regression.yml` | Every PR / `main` push: `--local-only --require-lang-tests` | | `cluster-regression.yml` | Nightly + tags + Helm/cluster-script PRs | -| `intercept-e2e.yml` | Weekly mirrord product path (Telepresence in-cluster dropped 2026-09-27, see `docs/intercept-backends.md`) | +| `intercept-e2e.yml` | Weekly mirrord product path with PR-pod routing proof (in-cluster Telepresence removed 2026-09-27, see `docs/intercept-backends.md`) | | `results-regression.yml` | Weekly Results/Postgres + `run-regression-agent-full.sh` | | `operator.yml` | `operator/**` PRs: unit/envtest + Kind domain E2E | @@ -70,7 +70,7 @@ C2 (polyglot baggage **unit** tests) is PR-gated for Python, Node, Java, and PHP | No `x-dev-session` header (5 rounds) | baseline `tekton-dag-spring-boot` | 5/5 | | `x-dev-session: pr-test` (5 rounds) | intercept / local PR process | 5/5 | -Same header-filter idea is documented as parity with Telepresence `--http-header`. Only mirrord is CI-verified; the in-cluster Telepresence task is experimental (`docs/intercept-backends.md`): +mirrord `header_filter` is the implemented backend; the in-cluster Telepresence task was removed (`docs/intercept-backends.md`): ```bash ./scripts/run-product-intercept-e2e.sh --intercept-backend mirrord diff --git a/helm/tekton-dag/README.md b/helm/tekton-dag/README.md index 24ae6ed..834ad85 100644 --- a/helm/tekton-dag/README.md +++ b/helm/tekton-dag/README.md @@ -1,6 +1,6 @@ # tekton-dag Helm chart -Tekton-based CI/CD for multi-app stacks: stack resolution, Kaniko builds, PR intercept testing (Telepresence or mirrord), and an optional in-cluster orchestration service (GitHub webhooks, manual runs). +Tekton-based CI/CD for multi-app stacks: stack resolution, Kaniko builds, PR intercept testing (mirrord), and an optional in-cluster orchestration service (GitHub webhooks, manual runs). ## Prerequisites @@ -61,7 +61,7 @@ Packaged content under `raw/` is **not** committed by default; `package.sh` copi | `imageRegistry` | string | `"localhost:5000"` | Container registry base for runtime images; passed to orchestrator as `IMAGE_REGISTRY` | | `buildImageTag` | string | `"latest"` | Tag convention for build images (document alongside `compileImages`) | | `cacheRepo` | string | `"localhost:5000/kaniko-cache"` | Kaniko cache repository; passed to orchestrator as `CACHE_REPO` | -| `interceptBackend` | string | `"mirrord"` | Default intercept backend: `mirrord` (CI-verified) or `telepresence` (experimental in-cluster) (`INTERCEPT_BACKEND` env) | +| `interceptBackend` | string | `"mirrord"` | Intercept backend (`INTERCEPT_BACKEND` env). Only `mirrord` is implemented. | | `maxParallelBuilds` | int | `5` | Max concurrent Kaniko-style builds for bootstrap-style runs (`MAX_PARALLEL_BUILDS` env) | | `compileImages.npm` | string | see `values.yaml` | Default compile image for npm | | `compileImages.maven` | string | … | Default compile image for Maven | diff --git a/libs/tekton-dag-common/tests/fixtures/pipelineruns/pr.json b/libs/tekton-dag-common/tests/fixtures/pipelineruns/pr.json index 0663128..4245afd 100644 --- a/libs/tekton-dag-common/tests/fixtures/pipelineruns/pr.json +++ b/libs/tekton-dag-common/tests/fixtures/pipelineruns/pr.json @@ -45,7 +45,7 @@ }, { "name": "intercept-backend", - "value": "telepresence" + "value": "mirrord" }, { "name": "dashboard-url", diff --git a/libs/tekton-dag-common/tests/test_m13_manifests.py b/libs/tekton-dag-common/tests/test_m13_manifests.py index dd943e5..c9edd06 100644 --- a/libs/tekton-dag-common/tests/test_m13_manifests.py +++ b/libs/tekton-dag-common/tests/test_m13_manifests.py @@ -93,13 +93,43 @@ def test_deploy_full_stack_has_validate_secrets_param(): def test_intercept_tasks_inject_baggage_env(): - for rel in ("tasks/deploy-intercept.yaml", "tasks/deploy-intercept-mirrord.yaml"): + for rel in ("tasks/deploy-intercept-mirrord.yaml",): script = _load(rel)["spec"]["steps"][0]["script"] assert "BAGGAGE_ENABLED" in script, rel assert "BAGGAGE_ROLE" in script, rel assert "APP_NAME" in script, rel +def test_mirrord_proxy_runs_as_own_service_account_and_fails_closed(): + """2026-09-27: the proxy ran as staging:default (403 on the target + Deployment) and the deploy step only waited for a Ready flicker.""" + task = _load("tasks/deploy-intercept-mirrord.yaml") + params = {p["name"]: p for p in task["spec"]["params"]} + assert params["proxy-service-account"]["default"] == "mirrord-intercept" + script = task["spec"]["steps"][0]["script"] + assert "serviceAccountName: ${PROXY_SA}" in script + assert "restartPolicy: Never" in script + assert "Failed to create mirrord-agent|Forbidden" in script + assert "kubectl wait --for=condition=Ready \"pod/${PROXY_NAME}\"" not in script + + +def test_validate_propagation_proves_routing_from_pr_pod_log(): + """/propagation echoes the header on baseline and PR pod alike, so the + validator must read the PR pod's own access log (fail-closed).""" + task = _load("tasks/validate-propagation.yaml") + params = {p["name"]: p for p in task["spec"]["params"]} + assert "deployed-pods" in params + script = task["spec"]["steps"][0]["script"] + assert "Routing proof (fail-closed)" in script + assert "probehit" in script and "probemiss" in script + assert "/pods/$2/log" in script + assert "intercept steals all traffic" in script + for rel in ("pipeline/stack-pr-pipeline.yaml", "pipeline/stack-pr-continue-pipeline.yaml"): + pipeline = (ROOT / rel).read_text() + assert "value: $(tasks.deploy-intercepts-result.results.deployed-pods)" in pipeline, rel + assert "deploy-intercepts-telepresence" not in pipeline, rel + + def test_resolve_stack_installs_jq_and_yq_without_swallowing_errors(): """Kind cluster CI failed when mikefarah/yq:4 had no jq and apk was `|| true`.""" task = _load("tasks/resolve-stack.yaml") diff --git a/libs/tekton-dag-common/tests/test_m17_intercept_automation.py b/libs/tekton-dag-common/tests/test_m17_intercept_automation.py index b780b53..f0f9036 100644 --- a/libs/tekton-dag-common/tests/test_m17_intercept_automation.py +++ b/libs/tekton-dag-common/tests/test_m17_intercept_automation.py @@ -21,7 +21,9 @@ def test_intercept_workflow_has_explicit_backend_cadence_and_evidence(): assert '"scripts/bootstrap-namespace.sh"' in workflow assert "workflow_dispatch:" in workflow assert "schedule:" in workflow - assert "backend: [telepresence, mirrord]" in workflow + # 2026-09-27: in-cluster Telepresence removed; mirrord is the only backend. + assert "backend: [mirrord]" in workflow + assert "telepresence" not in workflow.lower() assert "E2E_GIT_SSH_PRIVATE_KEY" in workflow assert "Require E2E SSH credential" not in workflow assert "public application repositories will use HTTPS" in workflow diff --git a/operator/internal/pipeline/builder_test.go b/operator/internal/pipeline/builder_test.go index 6aed73f..b95b5bd 100644 --- a/operator/internal/pipeline/builder_test.go +++ b/operator/internal/pipeline/builder_test.go @@ -30,7 +30,7 @@ func TestBuildersMatchGolden(t *testing.T) { prOpt.ChangedApp = "demo-fe" prOpt.PRNumber = 42 prOpt.AppRevisions = `{"demo-fe":"abc123"}` - prOpt.InterceptBackend = "telepresence" + prOpt.InterceptBackend = "mirrord" mergeOpt := optBase mergeOpt.ChangedApp = "demo-fe" diff --git a/operator/internal/pipeline/testdata/golden/pr.json b/operator/internal/pipeline/testdata/golden/pr.json index 0663128..4245afd 100644 --- a/operator/internal/pipeline/testdata/golden/pr.json +++ b/operator/internal/pipeline/testdata/golden/pr.json @@ -45,7 +45,7 @@ }, { "name": "intercept-backend", - "value": "telepresence" + "value": "mirrord" }, { "name": "dashboard-url", diff --git a/orchestrator/README.md b/orchestrator/README.md index 203db0a..7f54cfd 100644 --- a/orchestrator/README.md +++ b/orchestrator/README.md @@ -35,7 +35,7 @@ Defined in `app.py` (with defaults). Common ones: | `TEAM_NAME` | Team identifier (logging / config context). | | `IMAGE_REGISTRY` | Container registry base passed into runs. | | `CACHE_REPO` | Kaniko cache repository. | -| `INTERCEPT_BACKEND` | `mirrord` (default, CI-verified) or `telepresence` (experimental in-cluster). | +| `INTERCEPT_BACKEND` | `mirrord` (only implemented backend). | | `MAX_PARALLEL_BUILDS` | Parallelism hint (default `5`). | | `GIT_URL` | Platform repo URL. | | `GIT_REVISION` | Default branch/tag/SHA. | diff --git a/orchestrator/tests/conftest.py b/orchestrator/tests/conftest.py index aab68e8..9121a88 100644 --- a/orchestrator/tests/conftest.py +++ b/orchestrator/tests/conftest.py @@ -31,7 +31,7 @@ def flask_app(): TEAM_NAME="alpha", IMAGE_REGISTRY="registry.example.com:5000", CACHE_REPO="registry.example.com:5000/kaniko-cache", - INTERCEPT_BACKEND="telepresence", + INTERCEPT_BACKEND="mirrord", MAX_PARALLEL_BUILDS=5, GIT_URL="https://github.com/org/tekton-dag.git", GIT_REVISION="main", diff --git a/orchestrator/tests/test_pipelinerun_goldens.py b/orchestrator/tests/test_pipelinerun_goldens.py index 0714abe..3a715b7 100644 --- a/orchestrator/tests/test_pipelinerun_goldens.py +++ b/orchestrator/tests/test_pipelinerun_goldens.py @@ -32,7 +32,7 @@ def test_pr_golden(monkeypatch): image_registry="localhost:5000", cache_repo="localhost:5000/kaniko-cache", app_revisions='{"demo-fe":"abc123"}', - intercept_backend="telepresence", + intercept_backend="mirrord", namespace="tekton-pipelines", timeout="2h", max_retries=2, diff --git a/pipeline/stack-pr-continue-pipeline.yaml b/pipeline/stack-pr-continue-pipeline.yaml index 286f111..7b41846 100644 --- a/pipeline/stack-pr-continue-pipeline.yaml +++ b/pipeline/stack-pr-continue-pipeline.yaml @@ -36,7 +36,7 @@ spec: description: "JSON map of app → image URI (from build-apps result)" - name: intercept-backend type: string - description: "Which intercept backend was used: mirrord or telepresence" + description: "Intercept backend used (mirrord)" default: "mirrord" - name: bumped-versions type: string @@ -63,33 +63,7 @@ spec: value: $(tasks.run-tests.results.test-summary) tasks: - - name: deploy-intercepts-telepresence - when: - - input: $(params.intercept-backend) - operator: in - values: ["telepresence"] - taskRef: - name: deploy-stack-intercepts - params: - - name: stack-json - value: $(params.stack-json) - - name: build-apps - value: $(params.build-apps) - - name: propagation-chain - value: $(params.propagation-chain) - - name: built-images - value: $(params.built-images) - - name: intercept-header-value - value: $(params.intercept-header-value) - workspaces: - - name: shared-workspace - workspace: shared-workspace - - name: deploy-intercepts-mirrord - when: - - input: $(params.intercept-backend) - operator: in - values: ["mirrord"] taskRef: name: deploy-intercept-mirrord params: @@ -114,7 +88,6 @@ spec: - name: shared-workspace workspace: shared-workspace runAfter: - - deploy-intercepts-telepresence - deploy-intercepts-mirrord - name: validate-propagation diff --git a/pipeline/stack-pr-pipeline.yaml b/pipeline/stack-pr-pipeline.yaml index a8f0ccb..e120257 100644 --- a/pipeline/stack-pr-pipeline.yaml +++ b/pipeline/stack-pr-pipeline.yaml @@ -9,7 +9,7 @@ spec: description: > PR testing pipeline. Uses the currently running apps in the cluster and only builds/replaces the one app being tested (changed-app). Other apps are left - as-is; Telepresence intercepts route PR traffic only to the new build. + as-is; mirrord intercepts route PR traffic only to the new build. Tests one app at a time (changed-app is required when invoking this pipeline). 1. Clones platform repo and resolves the stack graph 2. Clones and builds ONLY the changed app (snapshot tag) — no build of other apps @@ -59,7 +59,7 @@ spec: description: "Pre-built image for mirrord proxy pods (M7)" default: "localhost:5000/tekton-dag-build-mirrord:latest" - name: intercept-backend - description: "Which intercept backend to use: mirrord (default, CI-verified) or telepresence (experimental in-cluster)" + description: "Intercept backend. Only mirrord is implemented; the param is kept for API compatibility." default: "mirrord" - name: dashboard-url description: "Base URL of Tekton Dashboard; PR comment will include link to this run (optional)" @@ -387,35 +387,7 @@ spec: runAfter: - build-containerize - - name: deploy-intercepts-telepresence - when: - - input: $(params.intercept-backend) - operator: in - values: ["telepresence"] - taskRef: - name: deploy-stack-intercepts - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - workspaces: - - name: shared-workspace - workspace: shared-workspace - runAfter: - - build-containerize - - name: deploy-intercepts-mirrord - when: - - input: $(params.intercept-backend) - operator: in - values: ["mirrord"] taskRef: name: deploy-intercept-mirrord params: @@ -444,7 +416,6 @@ spec: - name: shared-workspace workspace: shared-workspace runAfter: - - deploy-intercepts-telepresence - deploy-intercepts-mirrord - name: validate-propagation diff --git a/scripts/extract-standalone-repo.sh b/scripts/extract-standalone-repo.sh index 085526c..746be4d 100755 --- a/scripts/extract-standalone-repo.sh +++ b/scripts/extract-standalone-repo.sh @@ -56,8 +56,8 @@ Standalone Tekton pipeline system for **local development and proof-of-concept** # 2. Tekton + stack tasks/pipelines (labels namespace for Pod Security) ./scripts/install-tekton.sh -# 3. Optional: Telepresence Traffic Manager (for full PR pipeline with intercepts) -./scripts/install-telepresence-traffic-manager.sh +# 3. mirrord intercept proxy identity (for the full PR pipeline with intercepts) +./scripts/install-mirrord-intercept-rbac.sh # 4. Prove the DAG ./scripts/verify-dag-phase1.sh @@ -73,7 +73,7 @@ For manual pipeline runs, use `--registry localhost:5000 --storage-class ""`. Se - **stacks/** — Stack YAML (DAG), registry, versions - **tasks/** — Tekton tasks (resolve, build, deploy-intercept, validate, test, version, cleanup) - **pipeline/** — stack-pr-test, stack-merge-release, stack-dag-verify -- **scripts/** — kind-with-registry, install-tekton, install-telepresence-traffic-manager, verify-dag-phase1/2, generate-run, stack-graph +- **scripts/** — kind-with-registry, install-tekton, install-mirrord-intercept-rbac, verify-dag-phase1/2, generate-run, stack-graph - **docs/** — C4 diagrams, local DAG verification plan ## Sharing back to reference-architecture diff --git a/scripts/generate-run.sh b/scripts/generate-run.sh index cc92213..f5df987 100755 --- a/scripts/generate-run.sh +++ b/scripts/generate-run.sh @@ -27,7 +27,7 @@ source "$SCRIPT_DIR/common.sh" # --no-build-images Use bare ubuntu:22.04 # --namespace Target namespace (default: tekton-pipelines) # --storage-class PVC storage class -# --intercept-backend telepresence (default) | mirrord (M7) +# --intercept-backend mirrord (only implemented backend) # --apply kubectl create the StackRun # --dry-run Print the YAML without applying @@ -48,7 +48,7 @@ VERSION_OVERRIDES="{}" APPLY=false BUILD_IMAGES="${BUILD_IMAGES:-true}" BUILD_IMAGE_TAG="${BUILD_IMAGE_TAG:-latest}" -INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-telepresence}" +INTERCEPT_BACKEND="${INTERCEPT_BACKEND:-mirrord}" if [[ "${GENERATE_PIPELINE_RUN:-false}" == "true" ]]; then die "--pipeline-run / GENERATE_PIPELINE_RUN was removed in M16; emit a StackRun (default) instead" diff --git a/scripts/install-tekton.sh b/scripts/install-tekton.sh index 45be660..6020e0a 100755 --- a/scripts/install-tekton.sh +++ b/scripts/install-tekton.sh @@ -88,8 +88,8 @@ apply_with_retry -f "$MILESTONE_DIR/tasks/" -n "$NAMESPACE" apply_with_retry -f "$MILESTONE_DIR/pipeline/" -n "$NAMESPACE" echo "" -echo " Done. For full PR pipeline (intercepts), also install the Traffic Manager:" -echo " ./scripts/install-telepresence-traffic-manager.sh" +echo " Done. For the full PR pipeline (mirrord intercepts), also create the proxy identity:" +echo " ./scripts/install-mirrord-intercept-rbac.sh" echo " Then you can run:" echo " ./scripts/verify-dag-phase2.sh # DAG verification (resolve vs CLI)" echo " ./scripts/generate-run.sh --mode merge --repo demo-fe --registry localhost:5000 --storage-class \"\" | kubectl create -f -" diff --git a/scripts/install-telepresence-traffic-manager.sh b/scripts/install-telepresence-traffic-manager.sh deleted file mode 100755 index 9bfe61e..0000000 --- a/scripts/install-telepresence-traffic-manager.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -# Install Telepresence Traffic Manager in the cluster so PR pipeline intercepts can work. -# Run after the cluster is up (e.g. after kind-with-registry.sh). Requires helm and kubectl. -# Usage: ./install-telepresence-traffic-manager.sh [--version VERSION] -# Example: ./install-telepresence-traffic-manager.sh --version 2.25.0 -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -TELEPRESENCE_VERSION="${TELEPRESENCE_VERSION:-2.25.0}" -NAMESPACE="${TELEPRESENCE_NAMESPACE:-ambassador}" -CHART_OCI="oci://ghcr.io/telepresenceio/telepresence-oss" - -while [[ $# -gt 0 ]]; do - case "$1" in - --version) TELEPRESENCE_VERSION="$2"; shift 2 ;; - --namespace) NAMESPACE="$2"; shift 2 ;; - *) echo "Unknown option: $1" >&2; exit 1 ;; - esac -done - -need() { command -v "$1" >/dev/null 2>&1 || { echo "Required: $1" >&2; exit 1; }; } -need helm -need kubectl - -# Use writable dirs for Helm cache/config so helm template can pull the chart without touching /root -HELM_RUN_DIR="${TMPDIR:-/tmp}/helm-telepresence-$$" -mkdir -p "$HELM_RUN_DIR" -export HELM_CACHE_HOME="${HELM_RUN_DIR}/cache" -export HELM_CONFIG_HOME="${HELM_RUN_DIR}/config" -export XDG_CACHE_HOME="${HELM_RUN_DIR}/xdg-cache" -export XDG_CONFIG_HOME="${HELM_RUN_DIR}/xdg-config" -trap "rm -rf '$HELM_RUN_DIR'" EXIT - -echo "==============================================" -echo " Install Telepresence Traffic Manager" -echo " Version: $TELEPRESENCE_VERSION" -echo " Namespace: $NAMESPACE" -echo "==============================================" - -# Install or upgrade (idempotent). If helm is snap-installed, it may fail in restricted -# environments with "mkdir /root/snap: permission denied"; then run this script with -# full permissions or install helm without snap (e.g. get.helm.sh). -kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f - -if helm status traffic-manager -n "$NAMESPACE" >/dev/null 2>&1; then - echo " Upgrading existing traffic-manager..." - helm upgrade --namespace "$NAMESPACE" --reuse-values \ - --version "$TELEPRESENCE_VERSION" \ - traffic-manager "$CHART_OCI" -else - echo " Installing traffic-manager..." - helm install --create-namespace --namespace "$NAMESPACE" \ - --version "$TELEPRESENCE_VERSION" \ - traffic-manager "$CHART_OCI" -fi - -echo " Waiting for Traffic Manager to be ready..." -kubectl wait --for=condition=Available deployment/traffic-manager -n "$NAMESPACE" --timeout=120s 2>/dev/null || true - -echo "" -echo " Done. Traffic Manager is in namespace '$NAMESPACE'." -echo " PR pipeline deploy-intercept pods will use it for intercepts." -echo " (Intercept sidecar uses the telepresence CLI image, not the tel2 agent)" -echo "" diff --git a/scripts/run-all-setup-and-test.sh b/scripts/run-all-setup-and-test.sh index 9765c93..669f24c 100755 --- a/scripts/run-all-setup-and-test.sh +++ b/scripts/run-all-setup-and-test.sh @@ -75,10 +75,10 @@ else echo ">>> 4. Tekton Results (skipped --skip-results)" fi -# 5. Telepresence Traffic Manager (required for intercept E2E) +# 5. mirrord intercept proxy RBAC (required for intercept E2E) echo "" -echo ">>> 5. Telepresence Traffic Manager" -run_step "5. Telepresence Traffic Manager" ./scripts/install-telepresence-traffic-manager.sh +echo ">>> 5. mirrord intercept proxy RBAC" +run_step "5. mirrord intercept proxy RBAC" ./scripts/install-mirrord-intercept-rbac.sh # 6. Git SSH key secret (required for clone-app-repos SSH pull; created from ~/.ssh if missing) echo "" diff --git a/scripts/run-e2e-with-intercepts.sh b/scripts/run-e2e-with-intercepts.sh index 6d3f727..952f95c 100755 --- a/scripts/run-e2e-with-intercepts.sh +++ b/scripts/run-e2e-with-intercepts.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash -# Run full E2E with live Telepresence intercepts: bootstrap (build + deploy full stack), +# Run full E2E with live mirrord intercepts: bootstrap (build + deploy full stack), # then PR pipeline (build changed-app, deploy intercepts, run E2E through entry). # NOTE: This script uses a PR number (e.g. --pr 1) with default git-revision (main). # That is a pipeline sanity check only — it does NOT test the PR feature (no real PR). # For the valid PR test, use create-test-pr.sh → generate-run pr → merge-pr.sh → generate-run merge. # See docs/PR-TEST-FLOW.md. -# Prerequisites: Kind, Tekton, Postgres, Results, Telepresence Traffic Manager. +# Prerequisites: Kind, Tekton, Postgres, Results (mirrord proxy RBAC is created by this script). # Required: Kubernetes secret with SSH key for cloning app repos, e.g.: # kubectl create secret generic git-ssh-key --from-file=id_ed25519=$HOME/.ssh/id_ed25519 -n $NAMESPACE # Override name with GIT_SSH_SECRET_NAME. # -# Usage: ./run-e2e-with-intercepts.sh [--stack STACK] [--changed-app APP] [--pr N] [--registry URL] [--namespace NS] [--intercept-backend telepresence|mirrord] [--skip-bootstrap] [--skip-install-check] [--no-verify-db] +# Usage: ./run-e2e-with-intercepts.sh [--stack STACK] [--changed-app APP] [--pr N] [--registry URL] [--namespace NS] [--intercept-backend mirrord] [--skip-bootstrap] [--skip-install-check] [--no-verify-db] # Require bash (script uses [[ ]], etc.); re-exec if run with sh if [ -z "${BASH_VERSION:-}" ]; then exec bash "$0" "$@" @@ -57,9 +57,6 @@ need jq if [[ "$SKIP_INSTALL_CHECK" != "true" ]]; then kubectl cluster-info &>/dev/null || { echo "No cluster. Run kind-with-registry.sh and install-tekton.sh." >&2; exit 1; } kubectl get deployment tekton-results-api -n "$NAMESPACE" &>/dev/null || { echo "Tekton Results not found. Run install-postgres-kind.sh and install-tekton-results.sh." >&2; exit 1; } - if [[ "$INTERCEPT_BACKEND" == "telepresence" ]]; then - kubectl get deployment traffic-manager -n ambassador &>/dev/null || { echo "Telepresence Traffic Manager not found. Run install-telepresence-traffic-manager.sh." >&2; exit 1; } - fi kubectl get secret "$GIT_SSH_SECRET_NAME" -n "$NAMESPACE" &>/dev/null || { echo "Secret $GIT_SSH_SECRET_NAME not found. Create it with: kubectl create secret generic $GIT_SSH_SECRET_NAME --from-file=id_ed25519=\$HOME/.ssh/id_ed25519 -n $NAMESPACE" >&2; exit 1; } fi @@ -72,7 +69,7 @@ kubectl create clusterrolebinding tekton-pr-sa-admin --clusterrole=cluster-admin "$SCRIPT_DIR/install-mirrord-intercept-rbac.sh" --namespace staging echo "==============================================" -echo " E2E with live Telepresence intercepts" +echo " E2E with live mirrord intercepts" echo " Stack: $STACK_FILE changed-app: $CHANGED_APP pr: $PR_NUMBER intercept-backend: $INTERCEPT_BACKEND" echo " Registry: $IMAGE_REGISTRY" echo "==============================================" diff --git a/scripts/run-product-intercept-e2e.sh b/scripts/run-product-intercept-e2e.sh index 40b6e5f..c086bb4 100755 --- a/scripts/run-product-intercept-e2e.sh +++ b/scripts/run-product-intercept-e2e.sh @@ -40,8 +40,8 @@ while [[ $# -gt 0 ]]; do esac done -[[ "$INTERCEPT_BACKEND" == "telepresence" || "$INTERCEPT_BACKEND" == "mirrord" ]] \ - || die "--intercept-backend must be mirrord or telepresence" +[[ "$INTERCEPT_BACKEND" == "mirrord" ]] \ + || die "--intercept-backend must be mirrord (Telepresence in-cluster was removed; see docs/intercept-backends.md)" [[ "$PR_NUMBER" =~ ^[0-9]+$ ]] || die "--pr must be numeric" need kubectl @@ -203,19 +203,9 @@ verify_pr_evidence() { resolve_api_token start_port_forward -# The pipeline SA cannot create ServiceAccounts. The mirrord proxy pod (and, -# for the experimental backend, the Telepresence client pod) needs an API -# identity the runner creates here. +# The pipeline SA cannot create ServiceAccounts. The mirrord proxy pod needs +# an API identity the runner creates here. "$(dirname "$0")/install-mirrord-intercept-rbac.sh" --namespace staging -if [[ "$INTERCEPT_BACKEND" == "telepresence" ]]; then - kubectl create namespace staging --dry-run=client -o yaml | kubectl apply -f - - kubectl create serviceaccount telepresence-intercept -n staging \ - --dry-run=client -o yaml | kubectl apply -f - - kubectl create clusterrolebinding telepresence-intercept-staging \ - --clusterrole=cluster-admin \ - --serviceaccount=staging:telepresence-intercept \ - --dry-run=client -o yaml | kubectl apply -f - -fi echo ">>> Trigger bootstrap through authenticated orchestrator API" bootstrap_payload="$(jq -nc --arg stack "stacks/$STACK_FILE" \ diff --git a/scripts/run-stack-tests-runners.sh b/scripts/run-stack-tests-runners.sh index 203c661..319328d 100755 --- a/scripts/run-stack-tests-runners.sh +++ b/scripts/run-stack-tests-runners.sh @@ -278,7 +278,7 @@ for APP in $APP_LIST; do [ "$BA" = "$APP" ] && IS_INTERCEPTED=true done if [ "$IS_INTERCEPTED" = "true" ]; then - echo " (INTERCEPTED — hitting PR build via Telepresence)" + echo " (INTERCEPTED — hitting PR build via mirrord)" else echo " (normal cluster deployment)" fi diff --git a/tasks/deploy-intercept.yaml b/tasks/deploy-intercept.yaml deleted file mode 100644 index 5fa7a56..0000000 --- a/tasks/deploy-intercept.yaml +++ /dev/null @@ -1,413 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: Task -metadata: - name: deploy-stack-intercepts - labels: - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: "1.0.0" -spec: - description: > - EXPERIMENTAL — not exercised by CI. Deploys PR pods and creates - in-cluster Telepresence header intercepts ONLY for the app(s) that - changed. The rest of the stack runs as-is in the cluster. The - CI-verified backend is deploy-intercept-mirrord; see - docs/intercept-backends.md for the history and how to reopen this path. - This task fails closed: the deploy step probes matched and unmatched - traffic before reporting success. - - For a stack A→B→C→D where C changed: - - A, B, D: normal deployed services (untouched) - - C: Telepresence intercepts the existing C service so that - requests carrying the PR's baggage header get routed - to the PR pod running the new C build - - The e2e test enters through A with the header; B forwards - it to C (intercepted → PR pod); C forwards to D normally. - - The intercept-header-value (e.g. x-dev-session:pr-42) is what - Telepresence matches on. Only traffic with that header hits the - PR pod — all other traffic continues to the normal C deployment. - params: - - name: stack-json - type: string - description: "Full stack graph JSON (used to resolve ports, namespaces, topology)" - - name: build-apps - type: string - description: "Space-separated list of apps that were built (ONLY these get intercepts)" - - name: propagation-chain - type: string - default: "" - description: "Full ordered chain from entry to leaf (for logging context)" - - name: built-images - type: string - description: "JSON map of app → image URI" - - name: intercept-header-value - type: string - description: "Header match expression for Telepresence (e.g. x-dev-session:pr-42)" - - name: default-namespace - type: string - default: "staging" - - name: telepresence-image - type: string - default: "localhost:5000/tekton-dag-build-telepresence:latest" - workspaces: - - name: shared-workspace - optional: true - description: "Workspace to write deployed-pods.json for pass-through result (M7)" - results: - - name: deployed-pods - description: "JSON map of app → pod name" - steps: - - name: deploy - image: bitnami/kubectl:latest - script: | - #!/bin/bash - set -e - - STACK_JSON='$(params.stack-json)' - BUILD_APPS="$(params.build-apps)" - CHAIN="$(params.propagation-chain)" - BUILT='$(params.built-images)' - INTERCEPT="$(params.intercept-header-value)" - DEFAULT_NS="$(params.default-namespace)" - - # Compute the full app list from the graph for context - ALL_APPS=$(echo "$STACK_JSON" | jq -r '.apps[].name' | tr '\n' ' ') - - echo "=============================================" - echo " Intercept Deployment Plan" - echo "=============================================" - echo " Full stack apps: $ALL_APPS" - echo " Propagation chain: ${CHAIN:-}" - echo " Intercepted apps: $BUILD_APPS" - echo " Intercept header: $INTERCEPT" - echo "" - echo " Apps NOT intercepted run their normal cluster deployments." - echo " Only traffic matching the header routes to PR pods." - echo "" - - # Show each intercepted app's propagation role and chain position - for APP in $BUILD_APPS; do - PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') - - echo " $APP:" - echo " propagation-role: $PROP_ROLE" - - # Check if there are other intercepted apps downstream of this one - HAS_DOWNSTREAM_INTERCEPT=false - FOUND_SELF=false - for C in $CHAIN; do - if [ "$C" = "$APP" ]; then - FOUND_SELF=true - continue - fi - if $FOUND_SELF; then - for BA in $BUILD_APPS; do - [ "$BA" = "$C" ] && HAS_DOWNSTREAM_INTERCEPT=true - done - fi - done - - case "$PROP_ROLE" in - originator) - echo " behavior: STARTS the baggage chain" - if $HAS_DOWNSTREAM_INTERCEPT; then - echo " app code: must set headers on outgoing requests (intercepted app downstream)" - else - echo " app code: must set headers on outgoing requests" - echo " note: no other intercepted apps downstream — header only needed to reach THIS app" - fi - ;; - forwarder) - if $HAS_DOWNSTREAM_INTERCEPT; then - echo " behavior: ACCEPTS incoming baggage and MUST FORWARD (intercepted app downstream)" - echo " app code: must parse incoming header, store in context, propagate on all outgoing calls" - else - echo " behavior: ACCEPTS incoming baggage, downstream calls are NORMAL" - echo " app code: header got traffic here via Telepresence — downstream calls go to" - echo " normal deployments, no forwarding needed for intercept routing" - fi - ;; - terminal) - echo " behavior: ACCEPTS incoming baggage, never forwards" - echo " app code: header got traffic here — end of the line" - ;; - esac - - # Chain position context - if [ -n "$CHAIN" ]; then - POSITION=0 - TOTAL=0 - for C in $CHAIN; do - TOTAL=$((TOTAL + 1)) - if [ "$C" = "$APP" ]; then - POSITION=$TOTAL - fi - done - if [ $POSITION -gt 0 ]; then - echo " chain position: $POSITION of $TOTAL" - UPSTREAM="" - DOWNSTREAM="" - FOUND=false - for C in $CHAIN; do - if [ "$C" = "$APP" ]; then - FOUND=true - continue - fi - if $FOUND; then - DOWNSTREAM="$DOWNSTREAM $C" - else - UPSTREAM="$UPSTREAM $C" - fi - done - [ -n "$UPSTREAM" ] && echo " upstream (normal): $UPSTREAM" - [ -n "$DOWNSTREAM" ] && echo " downstream (normal): $DOWNSTREAM" - else - echo " chain position: leaf (fan-out target)" - fi - fi - echo "" - done - - echo '{}' > /tmp/pods.json - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Deploying intercept: $APP" - echo "=========================================" - - IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - - POD_NAME="pr-${APP}-$(date +%s)" - - BAGGAGE_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a)) as $app | - ($app.downstream // []) as $down | - $app."propagation-role" // ( - if ($down|length)==0 then "terminal" - elif (($app.role // "")|ascii_downcase)=="frontend" then "originator" - else "forwarder" end) - ') - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') - DOWNSTREAM_URL=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a) | .downstream // []) as $down | - if ($down|length)>0 then "http://" + ($down[0]|tostring) else empty end - ') - - echo " Image: $IMAGE" - echo " Namespace: $NS" - echo " Ports: container=$CPORT service=$SPORT" - echo " Intercept: $INTERCEPT" - echo " Pod: $POD_NAME" - echo " Baggage: role=$BAGGAGE_ROLE header=$HEADER_NAME" - - if [ -z "$INTERCEPT" ]; then - echo "ERROR: intercept header is required so unmatched traffic stays on baseline" >&2 - exit 1 - fi - HTTP_HEADER="${INTERCEPT%%:*}=${INTERCEPT#*:}" - HTTP_MATCH="--http-header '${HTTP_HEADER}'" - - cat < /tmp/kubeconfig - export KUBECONFIG=/tmp/kubeconfig - mkdir -p /dev/net - [ -c /dev/net/tun ] || mknod /dev/net/tun c 10 200 - echo "telepresence version:" - /usr/local/bin/telepresence version - echo "connecting to traffic-manager..." - /usr/local/bin/telepresence connect --manager-namespace ambassador --namespace ${NS} --mapped-namespaces ${NS} --never-proxy ${PR_POD_IP}/32 - echo "waiting for telepresence daemons..." - i=0 - until /usr/local/bin/telepresence status 2>/dev/null | grep -qiE 'Status[[:space:]]*:[[:space:]]*Connected|Connected to context'; do - i=\$((i+1)) - if [ "\$i" -gt 30 ]; then - echo "telepresence status after connect:" - /usr/local/bin/telepresence status || true - break - fi - sleep 2 - done - echo "forwarding localhost:18080 -> ${PR_POD_IP}:${CPORT} (never-proxy, no TUN hairpin)" - socat TCP-LISTEN:18080,fork,reuseaddr,bind=127.0.0.1 TCP:${PR_POD_IP}:${CPORT} & - echo "creating intercept ${APP} on localhost:18080 (plaintext handler)..." - if ! /usr/local/bin/telepresence intercept ${APP} --port 18080 ${HTTP_MATCH} --plaintext; then - echo "=== telepresence list ===" >&2 - /usr/local/bin/telepresence list || true - echo "=== telepresence daemon logs ===" >&2 - for f in /tmp/.cache/telepresence/logs/*.log; do - echo "--- \$f ---" >&2 - tail -n 80 "\$f" >&2 || true - done - exit 1 - fi - echo "Intercept active for ${APP}!" - tail -f /dev/null - securityContext: - runAsUser: 0 - privileged: true - capabilities: - add: [NET_ADMIN, NET_RAW] - CLIENTPOD - - echo " Waiting until telepresence reports the intercept is active" - deadline=$((SECONDS + 180)) - until kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ - | grep -q "Intercept active for ${APP}!" \ - && kubectl logs "pod/${CLIENT_NAME}" -n "$NS" 2>/dev/null \ - | grep -qiE 'HTTP requests with|Intercepting.*[Hh]eader'; do - if [ "$SECONDS" -ge "$deadline" ]; then - echo "ERROR: intercept for ${APP} did not become active" >&2 - echo "=== client status ===" >&2 - kubectl get pod "${CLIENT_NAME}" -n "$NS" -o jsonpath='{.status.phase} {.status.containerStatuses}' >&2 || true - echo >&2 - echo "=== previous client logs ===" >&2 - kubectl logs "pod/${CLIENT_NAME}" -n "$NS" --previous >&2 || true - echo "=== current client logs ===" >&2 - kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true - exit 1 - fi - sleep 5 - done - - # Fail fast: a headered request through the service must reach the - # PR pod and echo the session value; unmatched must still get 200. - SMOKE_URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" - SMOKE_HDR_NAME="${INTERCEPT%%:*}" - SMOKE_HDR_VAL="${INTERCEPT#*:}" - echo " Smoke: headered request -> $SMOKE_URL" - smoke_ok=false - for attempt in 1 2 3 4 5 6; do - body=$(curl -s --connect-timeout 5 --max-time 15 \ - -H "${SMOKE_HDR_NAME}: ${SMOKE_HDR_VAL}" \ - -w '\n%{http_code}' "$SMOKE_URL" 2>/dev/null || true) - code=$(printf '%s' "$body" | tail -n1) - echo " attempt $attempt: headered HTTP ${code:-000}" - if [ "$code" = "200" ]; then smoke_ok=true; break; fi - sleep 5 - done - plain_code=$(curl -s -o /dev/null --connect-timeout 5 --max-time 15 \ - -w '%{http_code}' "$SMOKE_URL" 2>/dev/null || echo 000) - echo " unmatched HTTP ${plain_code}" - if ! $smoke_ok || [ "$plain_code" != "200" ]; then - echo "ERROR: intercept for ${APP} is active but does not serve traffic" >&2 - echo "=== client logs ===" >&2 - kubectl logs "pod/${CLIENT_NAME}" -n "$NS" >&2 || true - echo "=== telepresence daemon logs ===" >&2 - kubectl exec "pod/${CLIENT_NAME}" -n "$NS" -- sh -c \ - 'for f in /tmp/.cache/telepresence/logs/*.log; do echo "--- $f ---"; tail -n 120 "$f"; done' >&2 || true - echo "=== traffic-agent logs ===" >&2 - kubectl logs -n "$NS" "deploy/${APP}" -c traffic-agent --tail=120 >&2 || true - exit 1 - fi - echo " Traffic to $APP matching '$INTERCEPT' now routes to PR pod" - echo "" - - jq --arg a "$APP" --arg p "$POD_NAME" '. + {($a): $p}' \ - /tmp/pods.json > /tmp/pods-tmp.json - mv /tmp/pods-tmp.json /tmp/pods.json - done - - # Write to result and optionally to workspace for deploy-intercepts-result pass-through (M7) - cat /tmp/pods.json | tee $(results.deployed-pods.path) - WS_PATH="$(workspaces.shared-workspace.path)" - if [ -n "${WS_PATH}" ]; then - DEPLOYED_PODS_FILE="${WS_PATH}/deployed-pods.json" - mkdir -p "$(dirname "${DEPLOYED_PODS_FILE}")" - cp /tmp/pods.json "${DEPLOYED_PODS_FILE}" - fi \ No newline at end of file From a5885f8b6570162f2d01a1efbc16a88284687b61 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 22:35:44 -0400 Subject: [PATCH 26/30] mirrord proxy gate: ignore telemetry machine-ID error, disable analytics The fail-closed deploy gate matched 'ERROR mirrord' and tripped on mirrord's benign 'failed to obtain machine ID' telemetry line 2s after the proxy started, before the agent Job had even left ContainerCreating. - MIRRORD_TELEMETRY=false / MIRRORD_PROGRESS_MODE=off on the proxy pod - fatal-log pattern narrowed to agent creation/connection failures, Forbidden, and 'Error:'; a real crash still surfaces via phase=Failed - success message reports the actual probe code instead of claiming 200 Co-authored-by: Cursor --- tasks/deploy-intercept-mirrord.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 07aee29..246d511 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -197,6 +197,13 @@ spec: env: - name: HOME value: /tmp + # No analytics: without this mirrord logs a benign + # "ERROR mirrord::connection: failed to obtain machine ID" that + # looks like a failure in the gate below. + - name: MIRRORD_TELEMETRY + value: "false" + - name: MIRRORD_PROGRESS_MODE + value: "off" - name: PR_POD_IP value: "${PR_POD_IP}" - name: CPORT @@ -230,8 +237,11 @@ spec: RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") PROXY_IP=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.podIP}' 2>/dev/null || echo "") PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) + # Fatal log lines only. A generic "ERROR mirrord::..." is not + # fatal (e.g. the machine-ID telemetry lookup); a real crash ends + # the process and, with restartPolicy Never, moves the pod to Failed. if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ - || printf '%s' "$PROXY_LOG" | grep -Eq 'ERROR mirrord|Failed to create mirrord-agent|Forbidden|^Error:'; then + || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then break fi if [ "$PHASE" = "Running" ] && [ -n "$PROXY_IP" ]; then @@ -264,7 +274,11 @@ spec: kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true exit 1 fi - echo " Proxy ${PROXY_NAME} serving via socat -> PR pod (HTTP 200, 0 restarts)" + if [ "$CODE" = "200" ]; then + echo " Proxy ${PROXY_NAME} serving via socat -> PR pod (HTTP 200, 0 restarts)" + else + echo " Proxy ${PROXY_NAME} Running clean for 30s, 0 restarts (direct probe HTTP ${CODE}; routing is proven in validate-propagation)" + fi echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" echo "" From e90c4d5551dcc9b06a6a42204ca8426c24874eff Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 22:40:10 -0400 Subject: [PATCH 27/30] AGENTS.md: debug pipeline/intercept changes on a persistent local kind cluster first CI (intercept-e2e.yml) is ~20 min per cycle and only returns log zips. Four fixes tonight were debugged that way; each was a 2-minute kubectl question locally. Codify: bring up tekton-stack once, iterate against it, keep it up between runs, push to CI for confirmation. Co-authored-by: Cursor --- AGENTS.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 13527a1..f6d4989 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,33 @@ Do **not** stop after a single partial test run. Follow **[docs/AGENT-REGRESSION - Run **`bash scripts/run-regression-agent.sh`** (or **`run-regression-agent-full.sh`** if Results + DB must pass). - **Loop**: fix failures → re-run until **`regression exit code: 0`** and done criteria in the doc are met. +## Local kind first — CI is confirmation, not the debugger + +`intercept-e2e.yml` costs ~20 min per cycle (runner queue + `kind create` + image build + pipeline) and only hands back log zips after the cluster is gone. On 2026-09-27 four consecutive mirrord-intercept fixes were debugged that way; each was a two-minute `kubectl logs` question on a live cluster. + +When changing `tasks/**`, `pipeline/**`, `scripts/run-product-intercept-e2e.sh`, `scripts/run-e2e-with-intercepts.sh`, `operator/`, or `orchestrator/`: + +1. Bring up (or reuse) the persistent local cluster once — check `MemAvailable` in `/proc/meminfo` is above 8 GiB first: + + ```bash + bash scripts/run-cluster-ci.sh --skip-isolation # kind "tekton-stack" + registry + Tekton + kubectl create namespace staging --dry-run=client -o yaml | kubectl apply -f - + kubectl label namespace staging pod-security.kubernetes.io/enforce=privileged \ + pod-security.kubernetes.io/audit=privileged pod-security.kubernetes.io/warn=privileged --overwrite + kubectl create secret generic ssh-key-secret -n tekton-pipelines --dry-run=client -o yaml | kubectl apply -f - + bash build-images/build-and-push.sh localhost:5000 latest + ``` + +2. Iterate against it. Re-apply only what changed (`kubectl apply -f tasks/`, `kubectl apply -f pipeline/`, rebuild one tool image) and rerun + `bash scripts/run-product-intercept-e2e.sh --intercept-backend mirrord --pr 2>&1 | tee /tmp/intercept-local.log`. + Watch live: `kubectl get pods -n staging -w`, `kubectl logs -n staging `, `kubectl logs -n staging -l app=mirrord --tail=-1`. + +3. Do **not** `kind delete cluster --name tekton-stack` between iterations. Delete only when the cluster itself is suspect. Never touch other kind clusters on the machine. + +4. Push to CI when the local run is green. CI then confirms on a clean VM. + +Log-grep gates in tasks match **specific fatal messages**, never a generic `ERROR ` (mirrord emits a non-fatal telemetry `ERROR` line). See [docs/intercept-backends.md](docs/intercept-backends.md). + ## Quick commands | Intent | Command | From d5178515ebf33669ca269c827c017cad0289a61d Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 23:20:23 -0400 Subject: [PATCH 28/30] mirrord intercept: grant pods/portforward, anchor header_filter, positive deploy gate Proven on a local kind cluster (tekton-stack), then in the pipeline: 'PASS: intercept routing proven from PR pod access logs' with the unmatched negative control served by baseline. Two real bugs, both invisible from CI log zips: - RBAC: mirrord OSS reaches its agent through the Kubernetes port-forward API as a WebSocket upgrade. The mirrord-intercept Role lacked pods/portforward, so the agent started and the proxy died ~17s later with 'failed to switch protocol: 403 Forbidden'. Grant get+create. - header_filter: mirrord matches the regex against ': ' (colon + space). The param is 'name:value' and was passed verbatim, so it never matched and every request stayed on baseline. Build an anchored, case-insensitive filter from the pair; log it. Deploy gate now needs a positive marker: RUST_LOG=mirrord=info, parse 'Created agent pod ... pod_name' from the proxy log, require that agent pod and the proxy Running with 0 restarts and no fatal line 40s later. No direct probe of the proxy IP (socat's listener is virtual under the layer). Agent log is dumped on failure. Docs, static tests, and the last Telepresence wording in validate-original-traffic updated. Co-authored-by: Cursor --- artifacts/intercept-e2e/final-resources.txt | 32 + .../intercept-e2e/final-staging-resources.txt | 14 + artifacts/intercept-e2e/port-forward.log | 5 + .../intercept-e2e/pr-pipeline-results.json | 20 + artifacts/intercept-e2e/pr-pipelinerun.yaml | 830 ++++ artifacts/intercept-e2e/pr-pod-logs.txt | 540 +++ artifacts/intercept-e2e/pr-stackrun.yaml | 37 + artifacts/intercept-e2e/pr-taskruns.yaml | 3712 +++++++++++++++++ .../intercept-e2e/pr-traffic-evidence.log | 66 + artifacts/intercept-e2e/readyz.json | 1 + .../intercept-e2e/run-1-pipeline-results.json | 11 + .../intercept-e2e/run-1-pipelinerun.yaml | 482 +++ artifacts/intercept-e2e/run-1-pod-logs.txt | 305 ++ artifacts/intercept-e2e/run-1-stackrun.yaml | 33 + artifacts/intercept-e2e/run-1-taskruns.yaml | 1946 +++++++++ .../intercept-e2e/run-2-pipeline-results.json | 20 + .../intercept-e2e/run-2-pipelinerun.yaml | 830 ++++ artifacts/intercept-e2e/run-2-pod-logs.txt | 540 +++ artifacts/intercept-e2e/run-2-stackrun.yaml | 37 + artifacts/intercept-e2e/run-2-taskruns.yaml | 3712 +++++++++++++++++ .../intercept-e2e/trigger-bootstrap.json | 1 + artifacts/intercept-e2e/trigger-pr.json | 1 + docs/intercept-backends.md | 19 +- .../tests/test_m13_manifests.py | 10 +- scripts/install-mirrord-intercept-rbac.sh | 7 + tasks/deploy-intercept-mirrord.yaml | 84 +- tasks/validate-original-traffic.yaml | 2 +- 27 files changed, 13256 insertions(+), 41 deletions(-) create mode 100644 artifacts/intercept-e2e/final-resources.txt create mode 100644 artifacts/intercept-e2e/final-staging-resources.txt create mode 100644 artifacts/intercept-e2e/port-forward.log create mode 100644 artifacts/intercept-e2e/pr-pipeline-results.json create mode 100644 artifacts/intercept-e2e/pr-pipelinerun.yaml create mode 100644 artifacts/intercept-e2e/pr-pod-logs.txt create mode 100644 artifacts/intercept-e2e/pr-stackrun.yaml create mode 100644 artifacts/intercept-e2e/pr-taskruns.yaml create mode 100644 artifacts/intercept-e2e/pr-traffic-evidence.log create mode 100644 artifacts/intercept-e2e/readyz.json create mode 100644 artifacts/intercept-e2e/run-1-pipeline-results.json create mode 100644 artifacts/intercept-e2e/run-1-pipelinerun.yaml create mode 100644 artifacts/intercept-e2e/run-1-pod-logs.txt create mode 100644 artifacts/intercept-e2e/run-1-stackrun.yaml create mode 100644 artifacts/intercept-e2e/run-1-taskruns.yaml create mode 100644 artifacts/intercept-e2e/run-2-pipeline-results.json create mode 100644 artifacts/intercept-e2e/run-2-pipelinerun.yaml create mode 100644 artifacts/intercept-e2e/run-2-pod-logs.txt create mode 100644 artifacts/intercept-e2e/run-2-stackrun.yaml create mode 100644 artifacts/intercept-e2e/run-2-taskruns.yaml create mode 100644 artifacts/intercept-e2e/trigger-bootstrap.json create mode 100644 artifacts/intercept-e2e/trigger-pr.json diff --git a/artifacts/intercept-e2e/final-resources.txt b/artifacts/intercept-e2e/final-resources.txt new file mode 100644 index 0000000..b90d536 --- /dev/null +++ b/artifacts/intercept-e2e/final-resources.txt @@ -0,0 +1,32 @@ +NAME MODE PIPELINERUN PHASE AGE +stackrun.tektondag.io/stackrun-bootstrap-bhmj5 bootstrap stackrun-bootstrap-bhmj5 Completed 5m36s +stackrun.tektondag.io/stackrun-pr-27exw pr stackrun-pr-27exw Completed 4m14s + +NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME +pipelinerun.tekton.dev/stackrun-bootstrap-bhmj5 True Completed 5m36s 4m14s +pipelinerun.tekton.dev/stackrun-pr-27exw True Completed 4m14s 23s + +NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-compile-maven True Succeeded 5m7s 4m39s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-compile-npm True Succeeded 5m7s 4m40s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-containerize True Succeeded 4m39s 4m20s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-select-tool-apps True Succeeded 5m14s 5m7s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-clone-app-repos True Succeeded 5m20s 5m14s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-deploy-full-stack True Succeeded 4m19s 4m15s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-fetch-source True Succeeded 5m34s 5m26s +taskrun.tekton.dev/stackrun-bootstrap-bhmj5-resolve-stack True Succeeded 5m26s 5m20s +taskrun.tekton.dev/stackrun-pr-27exw-build-compile-npm True Succeeded 3m40s 3m13s +taskrun.tekton.dev/stackrun-pr-27exw-build-containerize True Succeeded 3m13s 2m54s +taskrun.tekton.dev/stackrun-pr-27exw-build-select-tool-apps True Succeeded 3m47s 3m41s +taskrun.tekton.dev/stackrun-pr-27exw-cleanup True Succeeded 31s 23s +taskrun.tekton.dev/stackrun-pr-27exw-clone-app-repos True Succeeded 3m54s 3m48s +taskrun.tekton.dev/stackrun-pr-27exw-deploy-intercepts-mirrord True Succeeded 2m54s 2m3s +taskrun.tekton.dev/stackrun-pr-27exw-deploy-intercepts-result True Succeeded 2m3s 119s +taskrun.tekton.dev/stackrun-pr-27exw-fetch-source True Succeeded 4m10s 4m2s +taskrun.tekton.dev/stackrun-pr-27exw-post-pr-comment True Succeeded 31s 26s +taskrun.tekton.dev/stackrun-pr-27exw-pr-snapshot-tag True Succeeded 3m54s 3m49s +taskrun.tekton.dev/stackrun-pr-27exw-query-test-plan True Succeeded 71s 66s +taskrun.tekton.dev/stackrun-pr-27exw-resolve-stack True Succeeded 4m2s 3m55s +taskrun.tekton.dev/stackrun-pr-27exw-run-tests True Succeeded 66s 31s +taskrun.tekton.dev/stackrun-pr-27exw-validate-original-traffic True Succeeded 119s 71s +taskrun.tekton.dev/stackrun-pr-27exw-validate-propagation True Succeeded 119s 113s diff --git a/artifacts/intercept-e2e/final-staging-resources.txt b/artifacts/intercept-e2e/final-staging-resources.txt new file mode 100644 index 0000000..55331fe --- /dev/null +++ b/artifacts/intercept-e2e/final-staging-resources.txt @@ -0,0 +1,14 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +pod/demo-api-7496dcb97b-jqllf 1/1 Running 0 31m 10.244.0.39 tekton-stack-control-plane +pod/demo-fe-6fb75c9d77-tmljz 1/1 Running 0 31m 10.244.0.37 tekton-stack-control-plane +pod/release-lifecycle-demo-5f59d66856-hds6g 1/1 Running 0 31m 10.244.0.38 tekton-stack-control-plane + +NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR +deployment.apps/demo-api 1/1 1 1 31m app localhost:5000/demo-api:base-1 app=demo-api +deployment.apps/demo-fe 1/1 1 1 31m app localhost:5000/demo-fe:base-1 app=demo-fe +deployment.apps/release-lifecycle-demo 1/1 1 1 31m app localhost:5000/release-lifecycle-demo:base-1 app=release-lifecycle-demo + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR +service/demo-api ClusterIP 10.96.247.51 80/TCP 31m app=demo-api +service/demo-fe ClusterIP 10.96.126.232 80/TCP 31m app=demo-fe +service/release-lifecycle-demo ClusterIP 10.96.203.80 80/TCP 31m app=release-lifecycle-demo diff --git a/artifacts/intercept-e2e/port-forward.log b/artifacts/intercept-e2e/port-forward.log new file mode 100644 index 0000000..77364ef --- /dev/null +++ b/artifacts/intercept-e2e/port-forward.log @@ -0,0 +1,5 @@ +Forwarding from 127.0.0.1:19091 -> 8080 +Forwarding from [::1]:19091 -> 8080 +Handling connection for 19091 +Handling connection for 19091 +Handling connection for 19091 diff --git a/artifacts/intercept-e2e/pr-pipeline-results.json b/artifacts/intercept-e2e/pr-pipeline-results.json new file mode 100644 index 0000000..a07e2ee --- /dev/null +++ b/artifacts/intercept-e2e/pr-pipeline-results.json @@ -0,0 +1,20 @@ +{ + "name": "stackrun-pr-27exw", + "condition": { + "lastTransitionTime": "2026-09-28T03:18:21Z", + "message": "Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8", + "reason": "Completed", + "status": "True", + "type": "Succeeded" + }, + "results": [ + { + "name": "test-summary", + "value": "{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": \"pass\",\n \"demo-api\": \"pass\"\n}\n" + }, + { + "name": "original-traffic-summary", + "value": "{\n \"demo-fe\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": \"pass\",\n \"overall\": \"pass\"\n}\n" + } + ] +} diff --git a/artifacts/intercept-e2e/pr-pipelinerun.yaml b/artifacts/intercept-e2e/pr-pipelinerun.yaml new file mode 100644 index 0000000..58a5f6c --- /dev/null +++ b/artifacts/intercept-e2e/pr-pipelinerun.yaml @@ -0,0 +1,830 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:30Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/pipeline: stack-pr-test + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw + namespace: tekton-pipelines + resourceVersion: "13751" + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b +spec: + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: git-revision + value: main + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: app-revisions + value: '{}' + - name: image-registry + value: localhost:5000 + - name: cache-repo + value: "" + - name: intercept-backend + value: mirrord + - name: dashboard-url + value: "" + - name: pr-repo-url + value: "" + - name: max-retries + value: "2" + pipelineRef: + name: stack-pr-test + taskRunTemplate: + serviceAccountName: tekton-pr-sa + timeouts: + pipeline: 2h0m0s + workspaces: + - name: shared-workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + status: {} + - name: ssh-key + secret: + secretName: ssh-key-secret + - name: build-cache + persistentVolumeClaim: + claimName: build-cache +status: + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-fetch-source + pipelineTaskName: fetch-source + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-resolve-stack + pipelineTaskName: resolve-stack + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-clone-app-repos + pipelineTaskName: clone-app-repos + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-pr-snapshot-tag + pipelineTaskName: pr-snapshot-tag + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-select-tool-apps + pipelineTaskName: build-select-tool-apps + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-compile-npm + pipelineTaskName: build-compile-npm + whenExpressions: + - input: "true" + operator: in + values: + - "true" + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-containerize + pipelineTaskName: build-containerize + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-deploy-intercepts-mirrord + pipelineTaskName: deploy-intercepts-mirrord + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-deploy-intercepts-result + pipelineTaskName: deploy-intercepts-result + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-validate-propagation + pipelineTaskName: validate-propagation + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-validate-original-traffic + pipelineTaskName: validate-original-traffic + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-query-test-plan + pipelineTaskName: query-test-plan + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-run-tests + pipelineTaskName: run-tests + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-cleanup + pipelineTaskName: cleanup + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-post-pr-comment + pipelineTaskName: post-pr-comment + completionTime: "2026-09-28T03:18:21Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:21Z" + message: 'Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8' + reason: Completed + status: "True" + type: Succeeded + finallyStartTime: "2026-09-28T03:18:14Z" + pipelineSpec: + description: | + PR testing pipeline. Uses the currently running apps in the cluster and only builds/replaces the one app being tested (changed-app). Other apps are left as-is; mirrord intercepts route PR traffic only to the new build. Tests one app at a time (changed-app is required when invoking this pipeline). 1. Clones platform repo and resolves the stack graph 2. Clones and builds ONLY the changed app (snapshot tag) — no build of other apps 3. Deploys intercepts only for that app; rest of stack keeps running as-is 4. Validates header propagation, runs test suites 5. Posts a PR comment; does **not** bump `versions.yaml` (snapshot image tags only) 6. Cleans up PR pods (always) PR builds use snapshot tagging so they are never confused with real releases. + finally: + - name: hook-post-test + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: cleanup + params: + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: intercept-backend + value: mirrord + taskRef: + kind: Task + name: cleanup-stack-pods + - name: post-pr-comment + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: pr-repo-url + value: "" + - name: pr-number + value: "903" + - name: pipeline-run-name + value: stackrun-pr-27exw + - name: namespace + value: tekton-pipelines + - name: status + value: Completed + - name: test-summary + value: $(tasks.run-tests.results.test-summary) + - name: dashboard-url + value: "" + - name: github-secret-name + value: github-token + taskRef: + kind: Task + name: post-pr-comment + params: + - description: Platform repo URL (e.g. tekton-dag) — has stacks/, versions; app + repos are cloned separately from stack + name: git-url + type: string + - description: Branch, tag, or SHA for platform repo and (unless overridden) app + repos + name: git-revision + type: string + - default: stacks/stack-one.yaml + description: Path to the stack YAML relative to repo root + name: stack-file + type: string + - default: "" + description: App being tested (required). Only this app is built and given an + intercept; other apps use existing cluster deployments. + name: changed-app + type: string + - description: PR number + name: pr-number + type: string + - default: '{}' + description: Optional JSON map app → revision for cloning app repos (e.g. {"demo-fe":"pr-branch"}). + Used when the PR is in the app repo so the changed app is checked out at its + PR branch. + name: app-revisions + type: string + - description: Container registry base (e.g. 123456.dkr.ecr.us-east-1.amazonaws.com) + name: image-registry + type: string + - default: '{}' + description: JSON map of app → version overrides (empty = use versions.yaml) + name: version-overrides + type: string + - default: ubuntu:22.04 + description: Pre-built image for npm compile + name: compile-image-npm + type: string + - default: ubuntu:22.04 + description: Pre-built image for Maven compile + name: compile-image-maven + type: string + - default: ubuntu:22.04 + description: Pre-built image for Gradle compile + name: compile-image-gradle + type: string + - default: ubuntu:22.04 + description: Pre-built image for pip compile + name: compile-image-pip + type: string + - default: ubuntu:22.04 + description: Pre-built image for Composer/PHP compile + name: compile-image-php + type: string + - default: localhost:5000/tekton-dag-build-mirrord:latest + description: Pre-built image for mirrord proxy pods (M7) + name: compile-image-mirrord + type: string + - default: mirrord + description: Intercept backend. Only mirrord is implemented; the param is kept + for API compatibility. + name: intercept-backend + type: string + - default: "" + description: Base URL of Tekton Dashboard; PR comment will include link to this + run (optional) + name: dashboard-url + type: string + - default: github-token + description: 'Kubernetes secret name for GitHub token (key: token) when posting + PR comments' + name: github-secret-name + type: string + - default: "" + description: When PR is in the app repo, pass the app repo URL here so the PR + comment is posted to the correct repo; empty = use git-url (platform repo) + name: pr-repo-url + type: string + - default: "" + description: Kaniko cache repo. Empty disables cache. + name: cache-repo + type: string + - default: "0" + description: Max concurrent Kaniko pods for containerize. 0 = unlimited. + name: max-parallel-builds + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after clone, before compile (e.g. + code-gen, license-scan). + name: pre-build-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after containerize, before deploy + (e.g. image-scan, SBOM). + name: post-build-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after deploy, before tests (e.g. + seed-data). + name: pre-test-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run in finally block after tests (e.g. + slack-notify). + name: post-test-task + type: string + - default: "2" + description: | + Preferred retry count for infrastructure-sensitive tasks (compile/containerize). Pipeline tasks use a fixed retries: 2 for those steps; test tasks stay at 0. Orchestrator sets this param from MAX_RETRIES / request body for auditability. + name: max-retries + type: string + results: + - description: "" + name: test-summary + value: $(tasks.run-tests.results.test-summary) + - description: "" + name: original-traffic-summary + value: $(tasks.validate-original-traffic.results.original-traffic-summary) + tasks: + - name: fetch-source + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + taskRef: + kind: Task + name: git-clone + workspaces: + - name: output + workspace: shared-workspace + - name: resolve-stack + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: version-overrides + value: '{}' + runAfter: + - fetch-source + taskRef: + kind: Task + name: resolve-stack + workspaces: + - name: source + workspace: shared-workspace + - name: clone-app-repos + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: git-revision + value: main + - name: app-revisions + value: '{}' + runAfter: + - resolve-stack + taskRef: + kind: Task + name: clone-app-repos + workspaces: + - name: source + workspace: shared-workspace + - name: ssh-key + workspace: ssh-key + - name: pr-snapshot-tag + params: + - name: snapshot-tag + value: stackrun-pr-27exw + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + runAfter: + - resolve-stack + taskRef: + kind: Task + name: pr-snapshot-tag + - name: build-select-tool-apps + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + runAfter: + - clone-app-repos + - pr-snapshot-tag + taskRef: + kind: Task + name: build-select-tool-apps + workspaces: + - name: source + workspace: shared-workspace + - name: hook-pre-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + runAfter: + - build-select-tool-apps + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: build-compile-npm + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-npm + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-npm + when: + - input: $(tasks.resolve-stack.results.run-compile-npm) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-maven + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-maven + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-maven + when: + - input: $(tasks.resolve-stack.results.run-compile-maven) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-gradle + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-gradle + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-gradle + when: + - input: $(tasks.resolve-stack.results.run-compile-gradle) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-pip + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-pip + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-pip + when: + - input: $(tasks.resolve-stack.results.run-compile-pip) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-composer + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-php + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-composer + when: + - input: $(tasks.resolve-stack.results.run-compile-composer) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-containerize + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + - name: image-tag + value: $(tasks.pr-snapshot-tag.results.snapshot-versions) + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + retries: 2 + runAfter: + - build-compile-npm + - build-compile-maven + - build-compile-gradle + - build-compile-pip + - build-compile-composer + taskRef: + kind: Task + name: build-containerize + workspaces: + - name: source + workspace: shared-workspace + - name: hook-post-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: image-registry + value: localhost:5000 + runAfter: + - build-containerize + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: deploy-intercepts-mirrord + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: mirrord-image + value: localhost:5000/tekton-dag-build-mirrord:latest + runAfter: + - build-containerize + taskRef: + kind: Task + name: deploy-intercept-mirrord + workspaces: + - name: shared-workspace + workspace: shared-workspace + - name: deploy-intercepts-result + runAfter: + - deploy-intercepts-mirrord + taskRef: + kind: Task + name: deploy-intercepts-result + workspaces: + - name: shared-workspace + workspace: shared-workspace + - name: validate-propagation + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) + runAfter: + - deploy-intercepts-result + taskRef: + kind: Task + name: validate-stack-propagation + - name: validate-original-traffic + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: entry-app + value: $(tasks.resolve-stack.results.entry-app) + runAfter: + - deploy-intercepts-result + taskRef: + kind: Task + name: validate-original-traffic + - name: hook-pre-test + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + runAfter: + - validate-propagation + - validate-original-traffic + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: query-test-plan + params: + - name: changed-app + value: demo-fe + runAfter: + - hook-pre-test + taskRef: + kind: Task + name: query-test-plan + - name: run-tests + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: app-list + value: $(tasks.resolve-stack.results.app-list) + - name: entry-app + value: $(tasks.resolve-stack.results.entry-app) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: tests-to-run + value: $(tasks.query-test-plan.results.tests-to-run) + - name: unmapped-area + value: $(tasks.query-test-plan.results.unmapped-area) + - name: apps-to-test + value: $(tasks.query-test-plan.results.apps-to-test) + runAfter: + - query-test-plan + taskRef: + kind: Task + name: run-stack-tests + workspaces: + - name: test-source + workspace: shared-workspace + workspaces: + - description: Shared PVC for source code and test data + name: shared-workspace + - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; + required for SSH pull + name: ssh-key + - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse + across runs. + name: build-cache + optional: true + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: test-summary + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: original-traffic-summary + value: | + { + "demo-fe": { + "health-check": "pass", + "http-code": "200" + }, + "release-lifecycle-demo": { + "health-check": "pass", + "http-code": "200" + }, + "demo-api": { + "health-check": "pass", + "http-code": "200" + }, + "e2e-no-header-passthrough": { + "status": "pass", + "http-code": "200" + }, + "artillery-no-header-burst": "pass", + "overall": "pass" + } + skippedTasks: + - name: hook-pre-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: build-compile-maven + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-gradle + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-pip + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-composer + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: hook-post-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: hook-pre-test + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: hook-post-test + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + startTime: "2026-09-28T03:14:30Z" diff --git a/artifacts/intercept-e2e/pr-pod-logs.txt b/artifacts/intercept-e2e/pr-pod-logs.txt new file mode 100644 index 0000000..39b2ad3 --- /dev/null +++ b/artifacts/intercept-e2e/pr-pod-logs.txt @@ -0,0 +1,540 @@ +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/prepare] 2026/09/28 03:14:58 Entrypoint initialization +[pod/stackrun-pr-27exw-query-test-plan-pod/place-scripts] 2026/09/28 03:17:34 Decoded script /tekton/scripts/script-0-c2df2 +[pod/stackrun-pr-27exw-resolve-stack-pod/prepare] 2026/09/28 03:14:43 Entrypoint initialization +[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization +[pod/stackrun-pr-27exw-build-compile-npm-pod/place-scripts] 2026/09/28 03:15:06 Decoded script /tekton/scripts/script-0-8kkrq +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Apps: demo-fe +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] PVC: pvc-c91a6da3ac +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cache: disabled +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Max parallel: 0 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Containerize: demo-fe +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565334 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:stackrun-pr-27exw +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:stackrun-pr-27exw +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565334 created +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] --- Waiting for final batch --- +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565334 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565334: Succeeded +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565334" deleted from tekton-pipelines namespace +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Built images: +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord Intercept Deployment +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Build apps: demo-fe +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept header: x-dev-session:pr-903 +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Namespace: staging +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying intercept: demo-fe +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying PR pod: pr-demo-fe-1790565353 in staging +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Baggage: role=originator header=x-dev-session +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 condition met +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] PR pod ready: pr-demo-fe-1790565353 (IP: 10.244.0.128) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord header_filter: (?i)^x-dev-session: pr-903$ +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] configmap/mirrord-config-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying mirrord proxy: mirrord-proxy-demo-fe-1790565353 +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/mirrord-proxy-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Proxy mirrord-proxy-demo-fe-1790565353 connected to agent mirrord-agent-iqefckhppq-9cpf8; both Running 40s, 0 restarts (routing is proven in validate-propagation) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept active for demo-fe (traffic with header -> PR pod pr-demo-fe-1790565353) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] { +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] "demo-fe": "pr-demo-fe-1790565353" +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] } +[pod/stackrun-pr-27exw-cleanup-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/prepare] 2026/09/28 03:15:50 Entrypoint initialization +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/place-scripts] 2026/09/28 03:16:42 Decoded script /tekton/scripts/script-0-n9wmm +[pod/stackrun-pr-27exw-fetch-source-pod/prepare] 2026/09/28 03:14:38 Entrypoint initialization +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' true '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cleandir +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.6958718,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.7070696,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cd /workspace/output/ +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git rev-parse HEAD +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + EXIT_CODE=0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 1790468109 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (1/2) Installing oniguruma (6.9.9-r0) +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (2/2) Installing jq (1.7.1-r0) +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Executing busybox-1.36.1-r20.trigger +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] OK: 9 MiB in 17 packages +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] {"demo-fe":"stackrun-pr-27exw"} +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Snapshot tag map: {"demo-fe":"stackrun-pr-27exw"} +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization +[pod/stackrun-pr-27exw-build-containerize-pod/prepare] 2026/09/28 03:15:31 Entrypoint initialization +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Done: demo-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/place-scripts] 2026/09/28 03:16:47 Decoded script /tekton/scripts/script-0-crgzs +[pod/stackrun-pr-27exw-clone-app-repos-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-5g7lz +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] Querying test plan: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=demo-fe&radius=1 +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] {"error":"orchestrator unreachable"} +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] WARN: test-plan query failed; will run all tests +[pod/stackrun-pr-27exw-build-compile-npm-pod/prepare] 2026/09/28 03:15:05 Entrypoint initialization +[pod/stackrun-pr-27exw-cleanup-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-c5pss +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Resolved versions: +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] { +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] } +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] x-dev-session:pr-903 +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] truefalsefalsefalsefalse +[pod/stackrun-pr-27exw-validate-original-traffic-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization +[pod/stackrun-pr-27exw-validate-propagation-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] Wrote deployed-pods to result: { +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] "demo-fe": "pr-demo-fe-1790565353" +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] } +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-lw67t +[pod/stackrun-pr-27exw-clone-app-repos-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/place-scripts] 2026/09/28 03:15:51 Decoded script /tekton/scripts/script-0-z777r +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/prepare] 2026/09/28 03:16:41 Entrypoint initialization +[pod/stackrun-pr-27exw-post-pr-comment-pod/step-post-comment] No GITHUB_TOKEN secret; skipping PR comment. +[pod/stackrun-pr-27exw-query-test-plan-pod/prepare] 2026/09/28 03:17:33 Entrypoint initialization +[pod/stackrun-pr-27exw-resolve-stack-pod/place-scripts] 2026/09/28 03:14:44 Decoded script /tekton/scripts/script-0-89bp6 +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 776ms +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] run `npm fund` for details +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix --force +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > vite build +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] transforming... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] rendering chunks... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] computing gzip size... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ built in 449ms +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Compile (npm) done. +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json +[pod/stackrun-pr-27exw-post-pr-comment-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization +[pod/stackrun-pr-27exw-post-pr-comment-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-h6gz2 +[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
+[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Stack Propagation Validation +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Header: x-dev-session = pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Baggage key: dev-session +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop count: 3 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Intercepted: demo-fe +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Deepest intercept: position 1 of 3 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation contract: +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 1. demo-fe (originator) ** PR BUILD ** → SETS header, sends to next hop +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 2. release-lifecycle-demo (forwarder) → NORMAL call (no intercept downstream, header not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 3. demo-api (terminal) → NORMAL call (no intercept downstream, header not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Sending test request to originator: http://demo-fe.staging.svc.cluster.local:80/propagation +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Headers: x-dev-session=pr-903, baggage=dev-session=pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Response: +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "app": "demo-fe", +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "session": "pr-903", +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "hops": [ +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "error": "HTTP Error 404: " +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop-by-hop verification (fail-closed): +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 1 demo-fe (originator) [INTERCEPTED]: PASS — REACHED session=pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 2 release-lifecycle-demo (forwarder): OK (beyond intercept — original override not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 3 demo-api (terminal): OK (beyond intercept — original override not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: original override 'pr-903' transferred hop-to-hop +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Routing proof (fail-closed): PR pod must serve matched traffic only +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe -> pr-demo-fe-1790565353: matched request HTTP 200, unmatched request HTTP 200 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe: PASS — PR pod pr-demo-fe-1790565353 served the matched request and not the unmatched one +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: intercept routing proven from PR pod access logs +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation validation complete. +[pod/stackrun-pr-27exw-build-containerize-pod/place-scripts] 2026/09/28 03:15:32 Decoded script /tekton/scripts/script-0-njrdt +[pod/stackrun-pr-27exw-fetch-source-pod/place-scripts] 2026/09/28 03:14:39 Decoded script /tekton/scripts/script-0-v9bbr +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Milestone 5: Original Traffic Validation +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] (intercepts are ACTIVE — these requests carry NO header) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Intercepted apps: demo-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Full chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry point: demo-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Expectation: every request WITHOUT the intercept header +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] reaches the ORIGINAL deployment, not the PR pod. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 1: Direct health check per service (no headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-fe: [INTERCEPTED — should still serve original on bare requests] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-fe.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] release-lifecycle-demo: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://release-lifecycle-demo.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-api: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-api.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 2: Full-chain passthrough (no intercept headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry URL: http://demo-fe.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: (no x-dev-session, no baggage) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] This request should flow through ALL original deployments. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Even intercepted apps should respond from their original pods +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] because no header matches the Telepresence intercept rule. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Response: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] tekton-dag-vue-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate]
+[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — full chain responding without headers +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 3: Artillery load burst (no intercept headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Short burst against entry point — no headers. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Confirms sustained original-traffic handling during intercept. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Test run id: tmxfc_9p9rm93yn875ngqdk84ekm5mdxf9g_jrkn +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase started: Burst without intercept headers (index: 0, duration: 10s) 03:17:21(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase completed: Burst without intercept headers (index: 0, duration: 10s) 03:17:31(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:30(+0000) (width: 7.202s) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 15240 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 5/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 2.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:40(+0000) (width: 1.204s) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 3810 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 3.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] All VUs finished. Total time: 10 seconds +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Summary report @ 03:17:32(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 19050 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Artillery burst: PASS +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Original Traffic Validation Summary +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASSED: Original traffic unaffected by active intercepts. +[pod/stackrun-pr-27exw-validate-propagation-pod/place-scripts] 2026/09/28 03:16:46 Decoded script /tekton/scripts/script-0-vmphb +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:14:59 Decoded script /tekton/scripts/script-0-pfvfz +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup: removing PR pods +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Deleting pod/pr-demo-fe-1790565353 in staging +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "pr-demo-fe-1790565353" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning orphaned pr-test pods... +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-proxy-demo-fe-1790565353" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning mirrord agent and proxy pods... +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-agent-iqefckhppq-9cpf8" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] No resources found +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup complete. diff --git a/artifacts/intercept-e2e/pr-stackrun.yaml b/artifacts/intercept-e2e/pr-stackrun.yaml new file mode 100644 index 0000000..3bfe20f --- /dev/null +++ b/artifacts/intercept-e2e/pr-stackrun.yaml @@ -0,0 +1,37 @@ +apiVersion: tektondag.io/v1alpha1 +kind: StackRun +metadata: + creationTimestamp: "2026-09-28T03:14:30Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + tektondag.io/mode: pr + name: stackrun-pr-27exw + namespace: tekton-pipelines + resourceVersion: "13752" + uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 +spec: + appRevisions: '{}' + cacheRepo: "" + changedApp: demo-fe + gitRevision: main + gitUrl: https://github.com/jmjava/tekton-dag.git + imageRegistry: localhost:5000 + interceptBackend: mirrord + maxRetries: 2 + mode: pr + prNumber: 903 + stackFile: stacks/stack-one.yaml + stackRef: stack-one + timeout: 2h +status: + conditions: + - lastTransitionTime: "2026-09-28T03:14:30Z" + message: PipelineRun stackrun-pr-27exw phase=Completed + observedGeneration: 1 + reason: Completed + status: "False" + type: Ready + observedGeneration: 1 + phase: Completed + pipelineRunName: stackrun-pr-27exw diff --git a/artifacts/intercept-e2e/pr-taskruns.yaml b/artifacts/intercept-e2e/pr-taskruns.yaml new file mode 100644 index 0000000..f61902f --- /dev/null +++ b/artifacts/intercept-e2e/pr-taskruns.yaml @@ -0,0 +1,3712 @@ +apiVersion: v1 +items: +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:04Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-compile-npm + tekton.dev/task: build-compile-npm + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-compile-npm + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12743" + uid: fdda3572-535a-4387-8b26-7248c7df0428 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: compile-image-npm + value: ubuntu:22.04 + retries: 2 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-compile-npm + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + - name: build-cache + persistentVolumeClaim: + claimName: build-cache + status: + artifacts: {} + completionTime: "2026-09-28T03:15:31Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:31Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-compile-npm-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:15:04Z" + steps: + - container: step-compile-npm + imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 + name: compile-npm + provenance: {} + terminated: + containerID: containerd://43ce915d1a0a09e87dcad9297d5ee92597300ec9fd1f6b19481e001c679eb5df + exitCode: 0 + finishedAt: "2026-09-28T03:15:30Z" + reason: Completed + startedAt: "2026-09-28T03:15:10Z" + terminationReason: Completed + taskSpec: + description: Runs npm compile for apps in .tool-apps.json (invoked only when + build-apps include npm). + params: + - name: stack-json + type: string + - default: ubuntu:22.04 + name: compile-image-npm + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: COMPILE_IMAGE + value: ubuntu:22.04 + image: ubuntu:22.04 + name: compile-npm + script: | + #!/usr/bin/env bash + set -e + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi + [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" + APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) + [ -z "$APPS" ] && echo "No npm apps" && exit 0 + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 + fi + for APP in $APPS; do + echo "=== Compile (npm): $APP ===" + CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') + PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') + POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') + CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') + APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" + [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + cd "$APP_DIR" + [ -n "$PRE_CMD" ] && eval "$PRE_CMD" + if [ -n "$CMD" ]; then + RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') + eval "$RUN_CMD" + else + [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present + fi + [ -n "$POST_CMD" ] && eval "$POST_CMD" + done + echo "Compile (npm) done." + workingDir: /workspace/source + workspaces: + - name: source + - name: build-cache + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:31Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-containerize + tekton.dev/task: build-containerize + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-containerize + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12863" + uid: 23bcfc3f-1b78-4504-bb52-697f12eee6cc + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: image-registry + value: localhost:5000 + - name: image-tag + value: '{"demo-fe":"stackrun-pr-27exw"}' + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + retries: 2 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-containerize + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:15:50Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:50Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-containerize-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: built-images + type: string + value: | + { + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + startTime: "2026-09-28T03:15:31Z" + steps: + - container: step-containerize + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: containerize + provenance: {} + terminated: + containerID: containerd://aade96dbc2d6995b603ef23548575566ef8e30f4bc14971b2e0a370689799f08 + exitCode: 0 + finishedAt: "2026-09-28T03:15:49Z" + message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:stackrun-pr-27exw\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:15:34Z" + terminationReason: Completed + taskSpec: + description: | + Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. + params: + - name: stack-json + type: string + - name: build-apps + type: string + - name: image-registry + type: string + - name: image-tag + type: string + - default: pr- + name: tag-prefix + type: string + - default: "" + description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables + cache. + name: cache-repo + type: string + - default: "0" + description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). + name: max-parallel-builds + type: string + results: + - description: JSON map of app-name → full image URI + name: built-images + type: string + steps: + - computeResources: {} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: bitnami/kubectl:latest + name: containerize + script: | + #!/bin/bash + set -e + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + REGISTRY="localhost:5000" + IMAGE_TAG='{"demo-fe":"stackrun-pr-27exw"}' + TAG_PREFIX="" + CACHE_REPO="" + MAX_PARALLEL="0" + SOURCE_PVC="pvc-c91a6da3ac" + SOURCE_PATH="/workspace/source" + NS="$POD_NAMESPACE" + + PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') + PUSH_CACHE="" + if [ -n "$CACHE_REPO" ]; then + PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') + fi + + if [ -z "$SOURCE_PVC" ]; then + echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 + exit 1 + fi + + IS_JSON=false + case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac + + TS=$(date +%s) + + echo "=============================================" + echo " Parallel Containerize (Kaniko pods)" + echo "=============================================" + echo " Apps: $BUILD_APPS" + echo " PVC: $SOURCE_PVC" + echo " Cache: ${CACHE_REPO:-disabled}" + echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" + echo "" + + > /tmp/pod-list.txt + > /tmp/app-images.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + + wait_for_batch() { + local BATCH_FAILED="" + while IFS= read -r P; do + [ -z "$P" ] && continue + echo " Waiting: $P" >&2 + while true; do + PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") + case "$PH" in + Succeeded) echo " $P: Succeeded" >&2; break ;; + Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; + *) sleep 5 ;; + esac + done + done < /tmp/batch-pods.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + echo "$BATCH_FAILED" + } + + FAILED="" + + for APP in $BUILD_APPS; do + echo "=========================================" + echo " Containerize: $APP" + echo "=========================================" + + if $IS_JSON; then + APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) + [ -z "$APP_VER" ] && APP_VER="latest" + TAG="${TAG_PREFIX}${APP_VER}" + else + TAG="${TAG_PREFIX}${IMAGE_TAG}" + fi + + CONTEXT_PATH="${SOURCE_PATH}/${APP}" + FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" + PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" + PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" + + if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then + echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + continue + fi + + KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" + if [ -n "$PUSH_CACHE" ]; then + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" + else + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" + fi + KANIKO_ARGS="${KANIKO_ARGS}]" + + POD_NAME="kaniko-${APP}-${TS}" + echo " Launching: $POD_NAME" + echo " Push to: $PUSH_IMAGE" + echo " Pull as: $PULL_IMAGE" + + cat <> /tmp/pod-list.txt + echo "$POD_NAME" >> /tmp/batch-pods.txt + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + BATCH_COUNT=$((BATCH_COUNT + 1)) + echo "" + + if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then + echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + done + + if [ -s /tmp/batch-pods.txt ]; then + echo " --- Waiting for final batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + + echo "" + echo " Cleaning up Kaniko pods..." + while IFS= read -r POD_NAME; do + [ -z "$POD_NAME" ] && continue + kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & + done < /tmp/pod-list.txt + wait + + if [ -n "$FAILED" ]; then + echo "FAILED: Kaniko pods failed:$FAILED" >&2 + for P in $FAILED; do + echo "--- Logs for $P ---" + kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true + done + exit 1 + fi + + > /tmp/parts.txt + while IFS='=' read -r APP IMG; do + [ -z "$APP" ] && continue + echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt + done < /tmp/app-images.txt + + TOTAL=$(wc -l < /tmp/parts.txt) + COUNT=0 + echo '{' > /tmp/built.json + while IFS= read -r line; do + COUNT=$((COUNT + 1)) + if [ "$COUNT" -lt "$TOTAL" ]; then + echo "${line}," >> /tmp/built.json + else + echo "${line}" >> /tmp/built.json + fi + done < /tmp/parts.txt + echo '}' >> /tmp/built.json + + echo "" + echo " Built images:" + cat /tmp/built.json + cat /tmp/built.json | tee /tekton/results/built-images + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:57Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-select-tool-apps + tekton.dev/task: build-select-tool-apps + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-select-tool-apps + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12598" + uid: 7fd8c6db-96f9-422b-886c-0619452f5c67 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-select-tool-apps + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:15:03Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:03Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-select-tool-apps-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:14:57Z" + steps: + - container: step-select-tool-apps + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: select-tool-apps + provenance: {} + terminated: + containerID: containerd://e9ec0062367c667f256c7db155c97349e621a9c9909ce13cf4d98312986afd29 + exitCode: 0 + finishedAt: "2026-09-28T03:15:02Z" + reason: Completed + startedAt: "2026-09-28T03:15:02Z" + terminationReason: Completed + taskSpec: + description: Writes .tool-apps.json from stack-json and build-apps; used by + conditional compile tasks. + params: + - name: stack-json + type: string + - name: build-apps + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: BUILD_APPS + value: demo-fe + image: alpine:3.19 + name: select-tool-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" + for app in $BUILD_APPS; do + tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) NPM_APPS="$NPM_APPS $app" ;; + maven) MAVEN_APPS="$MAVEN_APPS $app" ;; + gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; + pip) PIP_APPS="$PIP_APPS $app" ;; + composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; + esac + done + jq -n \ + --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ + '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json + echo "Tool app lists written to .tool-apps.json" + workingDir: /workspace/source + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:18:13Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: finally + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: cleanup + tekton.dev/task: cleanup-stack-pods + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-cleanup + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13749" + uid: 01a6f20e-b5cb-4b58-a591-e4b2cfc4c69f + spec: + params: + - name: deployed-pods + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: intercept-backend + value: mirrord + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: cleanup-stack-pods + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:18:21Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:21Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-cleanup-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:18:13Z" + steps: + - container: step-cleanup + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: cleanup + provenance: {} + terminated: + containerID: containerd://ff60c3d658ef971f654359bc451a08191c9eed7c2eea50b35543cf4d37006564 + exitCode: 0 + finishedAt: "2026-09-28T03:18:20Z" + reason: Completed + startedAt: "2026-09-28T03:18:17Z" + terminationReason: Completed + taskSpec: + description: | + Cleans up all PR pods deployed for a stack pipeline run. Runs as a finally task so cleanup happens even on failure. + params: + - default: '{}' + description: JSON map of app → pod name (from deploy-stack-intercepts) + name: deployed-pods + type: string + - default: staging + name: default-namespace + type: string + - default: '{}' + name: stack-json + type: string + - default: telepresence + description: When mirrord, also delete mirrord agent and proxy pods + name: intercept-backend + type: string + steps: + - computeResources: {} + image: bitnami/kubectl:latest + name: cleanup + script: | + #!/bin/bash + set -e + + PODS='{ + "demo-fe": "pr-demo-fe-1790565353" + } + ' + DEFAULT_NS="staging" + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + INTERCEPT_BACKEND="mirrord" + + echo "=========================================" + echo " Cleanup: removing PR pods" + echo "=========================================" + + if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then + echo " No pods to clean up." + exit 0 + fi + + for APP in $(echo "$PODS" | jq -r 'keys[]'); do + POD=$(echo "$PODS" | jq -r --arg a "$APP" '.[$a]') + + NS="$DEFAULT_NS" + if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") + fi + + echo " Deleting pod/$POD in $NS" + kubectl delete pod "$POD" -n "$NS" --ignore-not-found=true + done + + # Also clean up any leftover pods from this pipeline + echo " Cleaning orphaned pr-test pods..." + kubectl delete pods -l managed-by=tekton-job-standardization \ + -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + + # When mirrord was used: remove mirrord agent and proxy pods in same namespace(s) + if [ "$INTERCEPT_BACKEND" = "mirrord" ]; then + echo " Cleaning mirrord agent and proxy pods..." + for APP in $(echo "$PODS" | jq -r 'keys[]'); do + NS="$DEFAULT_NS" + if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") + fi + kubectl delete pods -l app=mirrord -n "$NS" --ignore-not-found=true 2>/dev/null || true + kubectl delete pods -l app=mirrord-proxy -n "$NS" --ignore-not-found=true 2>/dev/null || true + done + # Fallback: delete in default namespace if no apps in PODS + if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then + kubectl delete pods -l app=mirrord -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + kubectl delete pods -l app=mirrord-proxy -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + fi + fi + + echo " Cleanup complete." +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: clone-app-repos + tekton.dev/task: clone-app-repos + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-clone-app-repos + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12529" + uid: 81533211-9697-469e-b476-bcea52ae3080 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: git-revision + value: main + - name: app-revisions + value: '{}' + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: clone-app-repos + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + - name: ssh-key + secret: + secretName: ssh-key-secret + status: + artifacts: {} + completionTime: "2026-09-28T03:14:56Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:56Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-clone-app-repos-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:14:50Z" + steps: + - container: step-clone-apps + imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f + name: clone-apps + provenance: {} + terminated: + containerID: containerd://5707f7167ce70a72e624d0bcdace677780459f7eb1c7acf0ab606075d565760b + exitCode: 0 + finishedAt: "2026-09-28T03:14:55Z" + reason: Completed + startedAt: "2026-09-28T03:14:54Z" + terminationReason: Completed + taskSpec: + description: | + Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. + params: + - description: Stack graph JSON (from resolve-stack) + name: stack-json + type: string + - description: Space-separated list of app names to clone + name: build-apps + type: string + - default: main + description: Branch or SHA to check out for app repos (default; overridden + by app-revisions per app) + name: git-revision + type: string + - default: '{}' + description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). + Used for PR builds where the changed app is checked out at its PR branch. + name: app-revisions + type: string + steps: + - computeResources: {} + image: alpine/git:latest + name: clone-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + DEFAULT_REVISION="main" + APP_REVISIONS='{}' + WORKSPACE="/workspace/source" + + # Clear existing app dirs so we get a fresh clone (no stale/cached content) + echo " Clearing existing app dirs..." + for APP in $BUILD_APPS; do + rm -rf "$WORKSPACE/$APP" + done + + # Prefer authenticated SSH when a key is present. Public repositories + # can be cloned over HTTPS from an empty Secret workspace. + mkdir -p /root/.ssh + chmod 700 /root/.ssh + KEY_DIR="/workspace/ssh-key" + CLONE_TRANSPORT=https + if [ -f "$KEY_DIR/id_ed25519" ]; then + cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + CLONE_TRANSPORT=ssh + elif [ -f "$KEY_DIR/id_rsa" ]; then + cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa + chmod 600 /root/.ssh/id_rsa + CLONE_TRANSPORT=ssh + else + echo " No SSH key found; cloning public repositories over HTTPS" + fi + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true + fi + + # Clone all app repos in parallel (M7.1) + clone_app() { + local APP="$1" REPO="$2" REVISION="$3" URL="$4" + echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" + git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" + if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then + echo "ERROR: could not fetch $REVISION for $APP" >&2 + exit 1 + fi + git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD + echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" + echo " Done: $APP" + } + + PIDS="" + for APP in $BUILD_APPS; do + REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') + if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then + echo " WARN: No repo for app $APP in stack, skipping" + continue + fi + REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') + [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + URL="git@github.com:${REPO}.git" + else + URL="https://github.com/${REPO}.git" + fi + clone_app "$APP" "$REPO" "$REVISION" "$URL" & + PIDS="$PIDS $!" + done + + CLONE_FAILED=false + for PID in $PIDS; do + if ! wait "$PID"; then + CLONE_FAILED=true + fi + done + if [ "$CLONE_FAILED" = "true" ]; then + echo "ERROR: One or more clones failed" >&2 + exit 1 + fi + + echo "" + echo "App repos cloned (parallel). Listing:" + for APP in $BUILD_APPS; do + [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true + done + workingDir: /workspace/source + workspaces: + - description: Workspace with platform repo at root; app repos will be cloned + into source/ + name: source + - description: Volume that may contain id_ed25519 or id_rsa for private-repository + SSH clones + name: ssh-key +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: deploy-intercepts-mirrord + tekton.dev/task: deploy-intercept-mirrord + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-deploy-intercepts-mirrord + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13112" + uid: 9b6af9c4-b873-4957-92b4-e57095fbd860 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: built-images + value: | + { + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: mirrord-image + value: localhost:5000/tekton-dag-build-mirrord:latest + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: deploy-intercept-mirrord + timeout: 1h0m0s + workspaces: + - name: shared-workspace + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:16:41Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:41Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-deploy-intercepts-mirrord-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: deployed-pods + type: string + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + startTime: "2026-09-28T03:15:50Z" + steps: + - container: step-deploy + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: deploy + provenance: {} + terminated: + containerID: containerd://88587dcb06e8b0adec20ea28a8fb6e6b5d1c0894f1a9830b852865fb2cfa658e + exitCode: 0 + finishedAt: "2026-09-28T03:16:40Z" + message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:15:53Z" + terminationReason: Completed + taskSpec: + description: | + Deploys PR pods with mirrord-based intercepts (M7). For each built app: 1) Deploys a PR pod running only the built image (no Telepresence sidecar). 2) Deploys a mirrord-proxy pod that runs mirrord exec wrapping a socat proxy; + traffic matching the intercept header is stolen from the original deployment + and forwarded to the PR pod. Same interface as deploy-stack-intercepts; + use when intercept-backend=mirrord. + params: + - description: Full stack graph JSON (used to resolve ports, namespaces, topology) + name: stack-json + type: string + - description: Space-separated list of apps that were built (ONLY these get + intercepts) + name: build-apps + type: string + - default: "" + description: Full ordered chain from entry to leaf (for logging context) + name: propagation-chain + type: string + - description: JSON map of app → image URI + name: built-images + type: string + - description: Header match for mirrord (e.g. x-dev-session:pr-42) + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: localhost:5000/tekton-dag-build-mirrord:latest + description: Image for mirrord proxy pods (mirrord CLI + socat) + name: mirrord-image + type: string + - default: mirrord-intercept + description: | + ServiceAccount the proxy pod runs as. mirrord exec must read the target + Deployment and create the mirrord-agent Job; the default SA cannot. + Create it with scripts/install-mirrord-intercept-rbac.sh. + name: proxy-service-account + type: string + results: + - description: JSON map of app → pod name (PR pods) + name: deployed-pods + type: string + steps: + - computeResources: {} + image: bitnami/kubectl:latest + name: deploy + script: | + #!/bin/bash + set -e + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILT='{ + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + ' + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + MIRRORD_IMAGE="localhost:5000/tekton-dag-build-mirrord:latest" + PROXY_SA="mirrord-intercept" + DEPLOYED_PODS_FILE="/workspace/shared-workspace/deployed-pods.json" + + echo "=============================================" + echo " mirrord Intercept Deployment" + echo "=============================================" + echo " Build apps: $BUILD_APPS" + echo " Intercept header: $INTERCEPT" + echo " Namespace: $DEFAULT_NS" + echo "" + + echo '{}' > /tmp/pods.json + + for APP in $BUILD_APPS; do + echo "=========================================" + echo " Deploying intercept: $APP" + echo "=========================================" + + IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') + + TS=$(date +%s) + POD_NAME="pr-${APP}-${TS}" + PROXY_NAME="mirrord-proxy-${APP}-${TS}" + CM_NAME="mirrord-config-${APP}-${TS}" + + BAGGAGE_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + (.apps[] | select(.name==$a)) as $app | + ($app.downstream // []) as $down | + $app."propagation-role" // ( + if ($down|length)==0 then "terminal" + elif (($app.role // "")|ascii_downcase)=="frontend" then "originator" + else "forwarder" end) + ') + BAGGAGE_HEADER=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') + DOWNSTREAM_URL=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + (.apps[] | select(.name==$a) | .downstream // []) as $down | + if ($down|length)>0 then "http://" + ($down[0]|tostring) else empty end + ') + + echo " Deploying PR pod: $POD_NAME in $NS" + echo " Baggage: role=$BAGGAGE_ROLE header=$BAGGAGE_HEADER" + cat <: " (colon + space). The param is "name:value" + # with no space, so passing it verbatim never matched (2026-09-27, + # found on local kind). Build an anchored, case-insensitive filter. + if [ -n "$INTERCEPT" ]; then + HDR_NAME="${INTERCEPT%%:*}" + HDR_VAL="${INTERCEPT#*:}" + HDR_VAL="${HDR_VAL# }" + HEADER_FILTER="(?i)^${HDR_NAME}: ${HDR_VAL}\$" + else + HEADER_FILTER=".*" + fi + echo " mirrord header_filter: ${HEADER_FILTER}" + MIRRORD_CONFIG=$(jq -n \ + --arg path "deployment/${APP}" \ + --arg ns "$NS" \ + --arg header "$HEADER_FILTER" \ + '{ + target: { path: $path, namespace: $ns }, + agent: { namespace: $ns }, + feature: { + network: { + incoming: { mode: "steal", http_filter: { header_filter: $header } }, + outgoing: true + }, + fs: "local" + } + }') + + kubectl create configmap "$CM_NAME" --namespace "$NS" --from-literal=config.json="$MIRRORD_CONFIG" + + echo " Deploying mirrord proxy: $PROXY_NAME" + cat < ${PR_POD_IP}:${CPORT}" + exec /usr/local/bin/mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} + env: + - name: HOME + value: /tmp + - name: MIRRORD_TELEMETRY + value: "false" + - name: MIRRORD_PROGRESS_MODE + value: "off" + # INFO gives the gate below its positive marker: + # 'Created agent pod ... pod_name: "mirrord-agent-..."'. + # (mirrord still prints a non-fatal + # 'ERROR mirrord::connection: failed to obtain machine ID'.) + - name: RUST_LOG + value: "mirrord=info" + - name: PR_POD_IP + value: "${PR_POD_IP}" + - name: CPORT + value: "${CPORT}" + volumeMounts: + - name: config + mountPath: /config + readOnly: true + securityContext: + runAsUser: 0 + privileged: true + capabilities: + add: [SYS_ADMIN, SYS_PTRACE, NET_ADMIN] + volumes: + - name: config + configMap: + name: ${CM_NAME} + PROXYPOD + + # Fail closed, with a positive marker. A Ready flicker is not proof: + # with no readiness probe a container is Ready the instant it runs, + # and mirrord exec can fail seconds later. Observed on kind: the + # proxy logs 'Created agent pod' at ~1s; without pods/portforward + # RBAC the WebSocket upgrade 403s at ~+17s and the agent gives up at + # ~+30s. So require: proxy Running, zero restarts, no fatal log + # line, the agent pod named in the proxy log Running, and all of + # that still true 40s after the agent pod was first seen. The + # proxy's own IP:port is NOT probed - under the mirrord layer socat's + # listener is virtual; routing is proven in validate-propagation. + PROXY_OK=false + AGENT_POD="" + AGENT_SEEN=0 + DEADLINE=$(( $(date +%s) + 180 )) + while [ "$(date +%s)" -lt "$DEADLINE" ]; do + PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") + PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) + # Fatal log lines only. A generic "ERROR mirrord::..." is not + # fatal (the machine-ID telemetry lookup); a real crash ends the + # process and, with restartPolicy Never, moves the pod to Failed. + if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ + || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then + break + fi + if [ -z "$AGENT_POD" ]; then + AGENT_POD=$(printf '%s' "$PROXY_LOG" | sed -n 's/.*Created agent pod.*pod_name: "\([^"]*\)".*/\1/p' | head -n 1) + [ -z "$AGENT_POD" ] || AGENT_SEEN=$(date +%s) + fi + if [ "$PHASE" = "Running" ] && [ -n "$AGENT_POD" ]; then + AGENT_PHASE=$(kubectl get "pod/${AGENT_POD}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + if [ "$AGENT_PHASE" = "Failed" ] || [ "$AGENT_PHASE" = "Succeeded" ]; then + break + fi + if [ "$AGENT_PHASE" = "Running" ] && [ $(( $(date +%s) - AGENT_SEEN )) -ge 40 ]; then + PROXY_OK=true + break + fi + fi + sleep 3 + done + if ! $PROXY_OK; then + echo "ERROR: mirrord proxy ${PROXY_NAME} did not establish an agent connection (proxy phase=${PHASE:-?} restarts=${RESTARTS:-?} agent=${AGENT_POD:-none} agent phase=${AGENT_PHASE:-?})" >&2 + echo "--- proxy pod log ---" >&2 + kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true + echo "--- proxy pod describe ---" >&2 + kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true + echo "--- mirrord agent jobs/pods in $NS ---" >&2 + kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true + if [ -n "$AGENT_POD" ]; then + echo "--- mirrord agent log (${AGENT_POD}) ---" >&2 + kubectl logs "pod/${AGENT_POD}" -n "$NS" --tail=-1 2>&1 | tail -n 60 >&2 || true + fi + exit 1 + fi + echo " Proxy ${PROXY_NAME} connected to agent ${AGENT_POD}; both Running 40s, 0 restarts (routing is proven in validate-propagation)" + echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" + echo "" + + jq --arg a "$APP" --arg p "$POD_NAME" '. + {($a): $p}' /tmp/pods.json > /tmp/pods-tmp.json + mv /tmp/pods-tmp.json /tmp/pods.json + done + + mkdir -p "$(dirname "${DEPLOYED_PODS_FILE}")" + cat /tmp/pods.json > "$DEPLOYED_PODS_FILE" + cat /tmp/pods.json | tee /tekton/results/deployed-pods + workspaces: + - description: Workspace to write deployed-pods.json for pass-through result + name: shared-workspace +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:41Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: deploy-intercepts-result + tekton.dev/task: deploy-intercepts-result + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-deploy-intercepts-result + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13164" + uid: a8029dc7-4483-4afc-aaf7-baf9cd82fe8f + spec: + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: deploy-intercepts-result + timeout: 1h0m0s + workspaces: + - name: shared-workspace + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:16:45Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:45Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-deploy-intercepts-result-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: deployed-pods + type: string + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + startTime: "2026-09-28T03:16:41Z" + steps: + - container: step-pass-through + imageID: docker.io/library/busybox@sha256:fd7dc98638c8e305f4dc34e979f1c0fdfdcaeb0fbf8fcff77ae834b6da3d7e6e + name: pass-through + provenance: {} + terminated: + containerID: containerd://16624b1833c51db43313d16cfc5dcc811bc38eb73185092c1784d5ec1cf18715 + exitCode: 0 + finishedAt: "2026-09-28T03:16:44Z" + message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:16:44Z" + terminationReason: Completed + taskSpec: + description: | + Pass-through task (M7). Reads deployed-pods.json from the shared workspace (written by either deploy-intercepts-telepresence or deploy-intercepts-mirrord) and writes it to the deployed-pods result. Downstream and finally tasks reference this task's result so they work with either intercept backend. + results: + - description: JSON map of app → pod name + name: deployed-pods + type: string + steps: + - computeResources: {} + image: busybox + name: pass-through + script: | + #!/bin/sh + set -e + FILE="/workspace/shared-workspace/deployed-pods.json" + if [ ! -f "$FILE" ]; then + echo '{}' > "/tekton/results/deployed-pods" + echo "No deployed-pods.json found; wrote empty object." + exit 0 + fi + cp "$FILE" "/tekton/results/deployed-pods" + echo "Wrote deployed-pods to result: $(cat /tekton/results/deployed-pods)" + workspaces: + - description: Workspace containing deployed-pods.json from the deploy step + name: shared-workspace +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tekton.dev/categories: Git + tekton.dev/deprecated: "true" + tekton.dev/displayName: git clone + tekton.dev/pipelines.minVersion: 0.38.0 + tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 + tekton.dev/tags: git + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:33Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: fetch-source + tekton.dev/task: git-clone + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-fetch-source + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12350" + uid: 8def9798-f6a9-48d1-acca-b7a8a67a4502 + spec: + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: git-clone + timeout: 1h0m0s + workspaces: + - name: output + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:14:42Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:42Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-fetch-source-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: commit + type: string + value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 + - name: committer-date + type: string + value: "1790468109" + - name: url + type: string + value: https://github.com/jmjava/tekton-dag.git + startTime: "2026-09-28T03:14:34Z" + steps: + - container: step-clone + imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df + name: clone + provenance: {} + terminated: + containerID: containerd://419cbb2591b360883fdf88f1585593564cbedb42861e6839d6a884ba928fbfd5 + exitCode: 0 + finishedAt: "2026-09-28T03:14:41Z" + message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:41Z" + terminationReason: Completed + taskSpec: + description: |- + These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. + The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. + params: + - description: Repository URL to clone from. + name: url + type: string + - default: "" + description: Revision to checkout. (branch, tag, sha, ref, etc...) + name: revision + type: string + - default: "" + description: Refspec to fetch before checking out revision. + name: refspec + type: string + - default: "true" + description: Initialize and fetch git submodules. + name: submodules + type: string + - default: "1" + description: Perform a shallow clone, fetching only the most recent N commits. + name: depth + type: string + - default: "true" + description: Set the `http.sslVerify` global git config. Setting this to `false` + is not advised unless you are sure that you trust your git remote. + name: sslVerify + type: string + - default: ca-bundle.crt + description: file name of mounted crt using ssl-ca-directory workspace. default + value is ca-bundle.crt. + name: crtFileName + type: string + - default: "" + description: Subdirectory inside the `output` Workspace to clone the repo + into. + name: subdirectory + type: string + - default: "" + description: Define the directory patterns to match or exclude when performing + a sparse checkout. + name: sparseCheckoutDirectories + type: string + - default: "true" + description: Clean out the contents of the destination directory if it already + exists before cloning. + name: deleteExisting + type: string + - default: "" + description: HTTP proxy server for non-SSL requests. + name: httpProxy + type: string + - default: "" + description: HTTPS proxy server for SSL requests. + name: httpsProxy + type: string + - default: "" + description: Opt out of proxying HTTP/HTTPS requests. + name: noProxy + type: string + - default: "true" + description: Log the commands that are executed during `git-clone`'s operation. + name: verbose + type: string + - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + description: The image providing the git-init binary that this Task runs. + name: gitInitImage + type: string + - default: /home/git + description: | + Absolute path to the user's home directory. + name: userHome + type: string + results: + - description: The precise commit SHA that was fetched by this Task. + name: commit + type: string + - description: The precise URL that was fetched by this Task. + name: url + type: string + - description: The epoch timestamp of the commit that was fetched by this Task. + name: committer-date + type: string + steps: + - computeResources: {} + env: + - name: HOME + value: /home/git + - name: PARAM_URL + value: https://github.com/jmjava/tekton-dag.git + - name: PARAM_REVISION + value: main + - name: PARAM_REFSPEC + - name: PARAM_SUBMODULES + value: "true" + - name: PARAM_DEPTH + value: "1" + - name: PARAM_SSL_VERIFY + value: "true" + - name: PARAM_CRT_FILENAME + value: ca-bundle.crt + - name: PARAM_SUBDIRECTORY + - name: PARAM_DELETE_EXISTING + value: "true" + - name: PARAM_HTTP_PROXY + - name: PARAM_HTTPS_PROXY + - name: PARAM_NO_PROXY + - name: PARAM_VERBOSE + value: "true" + - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES + - name: PARAM_USER_HOME + value: /home/git + - name: WORKSPACE_OUTPUT_PATH + value: /workspace/output + - name: WORKSPACE_SSH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSH_DIRECTORY_PATH + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH + - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSL_CA_DIRECTORY_PATH + image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + name: clone + script: | + #!/usr/bin/env sh + set -eu + + if [ "${PARAM_VERBOSE}" = "true" ] ; then + set -x + fi + + if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" + chmod 400 "${PARAM_USER_HOME}/.git-credentials" + chmod 400 "${PARAM_USER_HOME}/.gitconfig" + fi + + if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then + cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh + chmod 700 "${PARAM_USER_HOME}"/.ssh + chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* + fi + + if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then + export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" + if [ "${PARAM_CRT_FILENAME}" != "" ] ; then + export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" + fi + fi + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" + # or the root of a mounted volume. + if [ -d "${CHECKOUT_DIR}" ] ; then + # Delete non-hidden files and directories + rm -rf "${CHECKOUT_DIR:?}"/* + # Delete files and directories starting with . but excluding .. + rm -rf "${CHECKOUT_DIR}"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "${CHECKOUT_DIR}"/..?* + fi + } + + if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then + cleandir || true + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" + /ko-app/git-init \ + -url="${PARAM_URL}" \ + -revision="${PARAM_REVISION}" \ + -refspec="${PARAM_REFSPEC}" \ + -path="${CHECKOUT_DIR}" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth="${PARAM_DEPTH}" \ + -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" + cd "${CHECKOUT_DIR}" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "${EXIT_CODE}" != 0 ] ; then + exit "${EXIT_CODE}" + fi + RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" + printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" + printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" + printf "%s" "${PARAM_URL}" > "/tekton/results/url" + securityContext: + runAsNonRoot: true + runAsUser: 65532 + workspaces: + - description: The git repo will be cloned onto the volume backing this Workspace. + name: output + - description: | + A .ssh directory with private key, known_hosts, config, etc. Copied to + the user's home before git commands are executed. Used to authenticate + with the git remote when performing the clone. Binding a Secret to this + Workspace is strongly recommended over other volume types. + name: ssh-directory + optional: true + - description: | + A Workspace containing a .gitconfig and .git-credentials file. These + will be copied to the user's home before any git commands are run. Any + other files in this Workspace are ignored. It is strongly recommended + to use ssh-directory over basic-auth whenever possible and to bind a + Secret to this Workspace over other volume types. + name: basic-auth + optional: true + - description: | + A workspace containing CA certificates, this will be used by Git to + verify the peer with when fetching or pushing over HTTPS. + name: ssl-ca-directory + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:18:13Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: finally + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: post-pr-comment + tekton.dev/task: post-pr-comment + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-post-pr-comment + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13724" + uid: 6f0a708a-b5d0-4854-8e36-8489cd782565 + spec: + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: pr-repo-url + value: "" + - name: pr-number + value: "903" + - name: pipeline-run-name + value: stackrun-pr-27exw + - name: namespace + value: tekton-pipelines + - name: status + value: Completed + - name: test-summary + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: dashboard-url + value: "" + - name: github-secret-name + value: github-token + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: post-pr-comment + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:18:18Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:18Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-post-pr-comment-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:18:13Z" + steps: + - container: step-post-comment + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: post-comment + provenance: {} + terminated: + containerID: containerd://21a5e3c7b0296249f6ba5e7ddc75583d38b35208765e9f4f315c439ec97f4135 + exitCode: 0 + finishedAt: "2026-09-28T03:18:18Z" + reason: Completed + startedAt: "2026-09-28T03:18:17Z" + terminationReason: Completed + taskSpec: + description: Post a comment on the GitHub PR with run status and Tekton Dashboard + link. + params: + - description: Git repo URL (e.g. https://github.com/owner/repo.git); used when + pr-repo-url is empty + name: git-url + type: string + - default: "" + description: When set, PR comment is posted to this repo (app repo); when + empty, git-url is used + name: pr-repo-url + type: string + - description: PR number (issue number for the comment) + name: pr-number + type: string + - description: Name of this PipelineRun + name: pipeline-run-name + type: string + - description: Namespace of the PipelineRun + name: namespace + type: string + - description: Pipeline status (Succeeded or Failed) + name: status + type: string + - default: "" + description: Optional test summary JSON string + name: test-summary + type: string + - default: "" + description: Base URL of Tekton Dashboard (e.g. https://dashboard.example.com); + comment will include link to this run + name: dashboard-url + type: string + - default: github-token + description: Kubernetes secret name containing key 'token' (GitHub token with + repo scope) + name: github-secret-name + type: string + steps: + - computeResources: {} + env: + - name: GITHUB_TOKEN + valueFrom: + secretKeyRef: + key: token + name: github-token + optional: true + - name: GIT_URL + value: https://github.com/jmjava/tekton-dag.git + - name: PR_REPO_URL + - name: PR_NUMBER + value: "903" + - name: RUN_NAME + value: stackrun-pr-27exw + - name: NAMESPACE + value: tekton-pipelines + - name: STATUS + value: Completed + - name: TEST_SUMMARY + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: DASHBOARD_URL + image: alpine:3.19 + name: post-comment + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq >/dev/null 2>&1 + if [ -z "$GITHUB_TOKEN" ]; then + echo "No GITHUB_TOKEN secret; skipping PR comment." + exit 0 + fi + # Use pr-repo-url when set (PR in app repo), else git-url (platform repo) + COMMENT_URL="${PR_REPO_URL:-$GIT_URL}" + # Derive owner/repo from URL (https://github.com/owner/repo or git@github.com:owner/repo.git) + REPO="${COMMENT_URL#*github.com/}" + REPO="${REPO#*:}" + REPO="${REPO%.git}" + REPO="${REPO#*/}" + OWNER="${COMMENT_URL#*github.com/}" + OWNER="${OWNER#*:}" + OWNER="${OWNER%.git}" + OWNER="${OWNER%%/*}" + if [ -z "$OWNER" ] || [ -z "$REPO" ]; then + echo "Could not parse owner/repo from COMMENT_URL=$COMMENT_URL" + exit 0 + fi + BODY="## Tekton Pipeline Run" + BODY="${BODY}\n\n**Status:** ${STATUS}" + if [ -n "$TEST_SUMMARY" ]; then + BODY="${BODY}\n\n**Test summary:**\n\`\`\`json\n${TEST_SUMMARY}\n\`\`\`" + fi + if [ -n "$DASHBOARD_URL" ]; then + DASH_URL="${DASHBOARD_URL%/}/#/namespaces/${NAMESPACE}/pipelineruns/${RUN_NAME}" + BODY="${BODY}\n\n[View in Tekton Dashboard](${DASH_URL})" + fi + BODY="${BODY}\n\n_PipelineRun: \`${RUN_NAME}\`_" + JSON_BODY=$(printf '%s' "$BODY" | jq -Rs '{ body: . }') + curl -sS -X POST \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/${OWNER}/${REPO}/issues/${PR_NUMBER}/comments" \ + -d "$JSON_BODY" || echo "Failed to post comment (non-fatal)" + echo "Posted comment to PR #${PR_NUMBER}" +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: pr-snapshot-tag + tekton.dev/task: pr-snapshot-tag + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-pr-snapshot-tag + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12519" + uid: f20ab2ae-22ca-4bbe-b0fb-b96944cbf80f + spec: + params: + - name: snapshot-tag + value: stackrun-pr-27exw + - name: build-apps + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: pr-snapshot-tag + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:14:55Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:55Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-pr-snapshot-tag-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: snapshot-versions + type: string + value: '{"demo-fe":"stackrun-pr-27exw"}' + startTime: "2026-09-28T03:14:50Z" + steps: + - container: step-build-map + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: build-map + provenance: {} + terminated: + containerID: containerd://c5716e5e72905a52dc998aa1872d5f2bf2eb2d5042db77b0fb3c12be588bd7b2 + exitCode: 0 + finishedAt: "2026-09-28T03:14:54Z" + message: '[{"key":"snapshot-versions","value":"{\"demo-fe\":\"stackrun-pr-27exw\"}","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:54Z" + terminationReason: Completed + taskSpec: + description: | + Builds a JSON map of app -> snapshot tag for PR pipeline image tagging. PR builds are not releases; they use a run-specific snapshot tag (e.g. the pipeline run name) so images are clearly non-release. + params: + - description: 'Tag to use for all apps (e.g. pipeline run name: stack-pr-2-6xnbj)' + name: snapshot-tag + type: string + - description: Space-separated list of app names to tag + name: build-apps + type: string + results: + - description: JSON map of app -> snapshot-tag for use as image-tag in build-apps + name: snapshot-versions + type: string + steps: + - computeResources: {} + image: alpine:3.19 + name: build-map + script: | + #!/bin/sh + set -e + apk add --no-cache jq + TAG="stackrun-pr-27exw" + APPS="demo-fe" + OUT="{}" + for APP in $APPS; do + [ -z "$APP" ] && continue + OUT=$(echo "$OUT" | jq -c --arg app "$APP" --arg tag "$TAG" '. + {($app): $tag}') + done + echo -n "$OUT" | tee /tekton/results/snapshot-versions + echo "" + echo "Snapshot tag map: $OUT" + securityContext: + runAsUser: 0 +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:17:33Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: query-test-plan + tekton.dev/task: query-test-plan + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-query-test-plan + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13467" + uid: c622eecb-453b-4bb2-bae0-a44faa8afbcc + spec: + params: + - name: changed-app + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: query-test-plan + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:17:38Z" + conditions: + - lastTransitionTime: "2026-09-28T03:17:38Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-query-test-plan-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: apps-to-test + type: string + value: "" + - name: test-plan-message + type: string + value: test-plan query failed; running all tests + - name: tests-to-run + type: string + value: "" + - name: unmapped-area + type: string + value: "" + startTime: "2026-09-28T03:17:33Z" + steps: + - container: step-query + imageID: docker.io/curlimages/curl@sha256:58adaa4e8dca9c988bae2aba4ab3434a0bb2da16bbe3f92dec39ec7785166777 + name: query + provenance: {} + terminated: + containerID: containerd://4b984b91895eabb1a52cc6ec9190ad1ca37ace0f34e3a9305c7a7a597bf3f03e + exitCode: 0 + finishedAt: "2026-09-28T03:17:37Z" + message: '[{"key":"apps-to-test","value":"","type":1},{"key":"test-plan-message","value":"test-plan + query failed; running all tests","type":1},{"key":"tests-to-run","value":"","type":1},{"key":"unmapped-area","value":"","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:17:37Z" + terminationReason: Completed + taskSpec: + description: | + Query the orchestrator's test-plan endpoint to get the minimal set of regression tests for the changed app. Outputs a comma-separated list of test IDs (or an unmapped-area flag). + params: + - description: The app that changed in this PR + name: changed-app + type: string + - default: "1" + description: Graph traversal depth (1=direct, 2+=neighbors) + name: blast-radius + type: string + - default: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080 + description: Orchestrator service URL + name: orchestrator-url + type: string + results: + - description: Comma-separated test IDs to run, or empty + name: tests-to-run + type: string + - description: Service name if no mapped tests, or empty + name: unmapped-area + type: string + - description: Comma-separated service/app names whose tests should run, or + empty + name: apps-to-test + type: string + - description: Human-readable summary of the test plan + name: test-plan-message + type: string + steps: + - computeResources: {} + image: curlimages/curl:latest + name: query + script: | + #!/bin/sh + set -e + + APP="demo-fe" + RADIUS="1" + URL="http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=${APP}&radius=${RADIUS}" + + echo "Querying test plan: $URL" + RESPONSE=$(curl -sf "$URL" 2>/dev/null || echo '{"error":"orchestrator unreachable"}') + echo "$RESPONSE" | head -c 2000 + echo "" + + if echo "$RESPONSE" | grep -q '"error"'; then + echo "WARN: test-plan query failed; will run all tests" + echo -n "" > /tekton/results/tests-to-run + echo -n "" > /tekton/results/unmapped-area + echo -n "" > /tekton/results/apps-to-test + echo -n "test-plan query failed; running all tests" > /tekton/results/test-plan-message + exit 0 + fi + + TESTS=$(echo "$RESPONSE" | sed 's/.*"tests":\[//' | sed 's/\].*//' | \ + sed 's/{"id":"//g' | sed 's/","type":"[^"]*"}//g' | tr ',' '\n' | \ + paste -sd ',' -) + UNMAPPED=$(echo "$RESPONSE" | sed -n 's/.*"unmapped_area":"\([^"]*\)".*/\1/p') + MESSAGE=$(echo "$RESPONSE" | sed -n 's/.*"message":"\([^"]*\)".*/\1/p') + SERVICES=$(echo "$RESPONSE" | sed -n 's/.*"services":\[\([^]]*\)\].*/\1/p' | \ + sed 's/"//g') + + echo "" + echo "Tests to run: ${TESTS:-}" + echo "Apps to test: ${SERVICES:-}" + echo "Unmapped area: ${UNMAPPED:-}" + echo "Message: $MESSAGE" + + echo -n "${TESTS}" > /tekton/results/tests-to-run + echo -n "${UNMAPPED}" > /tekton/results/unmapped-area + echo -n "${SERVICES}" > /tekton/results/apps-to-test + echo -n "${MESSAGE}" > /tekton/results/test-plan-message +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:42Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: resolve-stack + tekton.dev/task: resolve-stack + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-resolve-stack + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12428" + uid: 376d8b76-abf1-4c49-b657-9448bc1cb54a + spec: + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: version-overrides + value: '{}' + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: resolve-stack + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:14:49Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:49Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-resolve-stack-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: app-list + type: string + value: demo-fe release-lifecycle-demo demo-api + - name: build-apps + type: string + value: demo-fe + - name: entry-app + type: string + value: demo-fe + - name: intercept-header-value + type: string + value: x-dev-session:pr-903 + - name: propagation-chain + type: string + value: | + demo-fe release-lifecycle-demo demo-api + - name: resolved-versions + type: string + value: | + {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} + - name: run-compile-composer + type: string + value: "false" + - name: run-compile-gradle + type: string + value: "false" + - name: run-compile-maven + type: string + value: "false" + - name: run-compile-npm + type: string + value: "true" + - name: run-compile-pip + type: string + value: "false" + - name: stack-json + type: string + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + startTime: "2026-09-28T03:14:42Z" + steps: + - container: step-resolve + imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 + name: resolve + provenance: {} + terminated: + containerID: containerd://719cd458394417bd85ec21f0ce71520758fc66a2796903f1ed3ab3b97bad691c + exitCode: 0 + finishedAt: "2026-09-28T03:14:48Z" + message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"x-dev-session:pr-903","type":1},{"key":"propagation-chain","value":"demo-fe + release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"false","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo + 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence + (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm + install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:48Z" + terminationReason: Completed + taskSpec: + description: | + Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. + params: + - description: Path to the stack YAML relative to workspace root + name: stack-file + type: string + - default: stacks/versions.yaml + description: Path to versions.yaml relative to workspace root + name: versions-file + type: string + - default: '{}' + description: | + JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. + name: version-overrides + type: string + - default: "" + description: App whose PR triggered this run (empty = build all) + name: changed-app + type: string + - default: "" + description: PR number for intercept-header generation + name: pr-number + type: string + results: + - description: Full stack graph as JSON (includes build config per app) + name: stack-json + type: string + - description: Space-separated list of apps in topological order + name: app-list + type: string + - description: Entry-point app (typically the frontend) + name: entry-app + type: string + - description: Ordered chain of apps for header propagation validation + name: propagation-chain + type: string + - description: Header value to use for Telepresence intercepts + name: intercept-header-value + type: string + - description: Space-separated list of apps to build (changed-app or all) + name: build-apps + type: string + - description: true if any build-app uses npm (so only that compile step runs) + name: run-compile-npm + type: string + - description: true if any build-app uses maven + name: run-compile-maven + type: string + - description: true if any build-app uses gradle + name: run-compile-gradle + type: string + - description: true if any build-app uses pip + name: run-compile-pip + type: string + - description: true if any build-app uses composer + name: run-compile-composer + type: string + - description: JSON map of app → version (registry defaults merged with overrides) + name: resolved-versions + type: string + steps: + - computeResources: {} + env: + - name: YQ_VERSION + value: v4.45.4 + - name: JQ_VERSION + value: jq-1.7.1 + image: alpine:3.21 + name: resolve + script: | + #!/bin/sh + set -eu + + arch=$(uname -m) + case "$arch" in + x86_64) arch=amd64 ;; + aarch64|arm64) arch=arm64 ;; + *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; + esac + install_static() { + dest="$1" + url="$2" + wget -q -O "$dest" "$url" + chmod +x "$dest" + } + # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). + if ! apk add --no-cache jq yq-go; then + echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 + install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" + install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" + fi + command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } + command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } + + STACK="stacks/stack-one.yaml" + VFILE="stacks/versions.yaml" + OVERRIDES='{}' + CHANGED="demo-fe" + PR="903" + + if [ ! -f "$STACK" ]; then + echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 + ls -la >&2 + ls -la stacks >&2 || true + exit 1 + fi + + STACK_JSON=$(yq -o=json "$STACK") + + # ---------------------------------------------------------- + # Build the full graph JSON (preserves build config per app) + # ---------------------------------------------------------- + echo "$STACK_JSON" | jq -c '{ + name: .name, + description: .description, + propagation: .propagation, + defaults: .defaults, + apps: [.apps[] | { + name: .name, + repo: .repo, + role: .role, + "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), + namespace: (.namespace // null), + "container-port": (."container-port" // null), + "service-port": (."service-port" // null), + "context-dir": (."context-dir" // "."), + dockerfile: (.dockerfile // "Dockerfile"), + build: (.build // {tool:"none", runtime:"custom"}), + downstream: (.downstream // []), + tests: (.tests // {}) + }] + }' > /tmp/stack.json + + cat /tmp/stack.json | tee /tekton/results/stack-json + + # ---------------------------------------------------------- + # Resolve versions: registry defaults + overrides + # ---------------------------------------------------------- + VERSIONS_JSON="{}" + if [ -f "$VFILE" ]; then + VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' + [to_entries[] | {key: .key, value: .value.version}] | from_entries + ') + fi + + # Only keep versions for apps actually in this stack + APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') + STACK_VERSIONS="{}" + for APP in $APP_NAMES; do + VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') + done + + # Merge overrides on top + if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then + echo "Applying version overrides: $OVERRIDES" + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') + fi + + echo "Resolved versions:" + echo "$STACK_VERSIONS" | jq '.' + echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions + echo "" + + # ---------------------------------------------------------- + # Topological order + # ---------------------------------------------------------- + TOPO=$(cat /tmp/stack.json | jq -r ' + def vis($n;$adj): + if (.t|index($n)) then .err=true + elif (.v|index($n)) then . + else .t+=[$n] | + reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | + .t-=[$n] | .v+=[$n] | .o+=[$n] + end; + def topo: + . as $g | + ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | + ($g.apps | map(.name)) as $all | + {v:[],t:[],o:[],err:false} | + reduce $all[] as $n (.; + if (.v|index($n)) then . else .|vis($n;$adj) end + ) | + if .err then error("cycle") else .o|reverse end; + topo | join(" ") + ') + echo -n "$TOPO" | tee /tekton/results/app-list + echo "" + + # ---------------------------------------------------------- + # Entry point (app that no other app lists as downstream) + # ---------------------------------------------------------- + ENTRY=$(cat /tmp/stack.json | jq -r ' + (.apps|map(.downstream)|flatten) as $deps | + .apps[] | select(.name as $n | ($deps|index($n))|not) | .name + ' | head -1) + echo -n "$ENTRY" | tee /tekton/results/entry-app + echo "" + + # ---------------------------------------------------------- + # Propagation chain from entry + # ---------------------------------------------------------- + cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' + def walk($name): + . as $g | + ($g.apps[]|select(.name==$name)) as $app | + if $app then [$name] + reduce ($app.downstream//[])[] as $d + ([]; . + ($g|walk($d))) + else [] end; + walk($s) | join(" ") + ' | tee /tekton/results/propagation-chain + + # ---------------------------------------------------------- + # Intercept header + # ---------------------------------------------------------- + if [ -n "$PR" ]; then + HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value + else + echo -n "" | tee /tekton/results/intercept-header-value + fi + echo "" + + # ---------------------------------------------------------- + # Build list + # ---------------------------------------------------------- + if [ -n "$CHANGED" ]; then + echo -n "$CHANGED" | tee /tekton/results/build-apps + else + echo -n "$TOPO" | tee /tekton/results/build-apps + fi + echo "" + + # ---------------------------------------------------------- + # Which compile steps to run (only tools used by build-apps) + # ---------------------------------------------------------- + BUILD_APPS=$(cat /tekton/results/build-apps) + RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" + for app in $BUILD_APPS; do + tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) RUN_NPM="true" ;; + maven) RUN_MAVEN="true" ;; + gradle) RUN_GRADLE="true" ;; + pip) RUN_PIP="true" ;; + composer) RUN_COMPOSER="true" ;; + esac + done + echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm + echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven + echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle + echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip + echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer + echo "" + securityContext: + runAsUser: 0 + workingDir: /workspace/source + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:17:38Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: run-tests + tekton.dev/task: run-stack-tests + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-run-tests + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13622" + uid: 9237177e-0f17-43e6-b91f-ed70a25b84d6 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: app-list + value: demo-fe release-lifecycle-demo demo-api + - name: entry-app + value: demo-fe + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: tests-to-run + value: "" + - name: unmapped-area + value: "" + - name: apps-to-test + value: "" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: run-stack-tests + timeout: 1h0m0s + workspaces: + - name: test-source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:18:13Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:13Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-run-tests-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: test-summary + type: string + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + startTime: "2026-09-28T03:17:38Z" + steps: + - container: step-run-tests + imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 + name: run-tests + provenance: {} + terminated: + containerID: containerd://eeb81d93deb7f10a0abb876f47148c2dbe9d9641ac87b1435b85e1a517052e56 + exitCode: 0 + finishedAt: "2026-09-28T03:18:12Z" + message: '[{"key":"test-summary","value":"{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": + \"pass\",\n \"demo-api\": \"pass\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:17:43Z" + terminationReason: Completed + taskSpec: + description: | + Two-phase test execution: + Phase 1 — E2E through entry point: + Always sends requests through the stack's entry app (frontend) + with the intercept header. This exercises the full chain and + proves the intercepted PR app works in context. + For A→B→C→D where C is intercepted, the request enters A, + flows through B, hits the PR build of C via Telepresence, + then continues to D. The header propagates end-to-end. + + Phase 2 — Per-app tests: + Runs each app's configured test suites (Postman, Playwright, + Artillery) with the intercept header attached. For intercepted + apps this validates the PR build directly. For non-intercepted + apps this validates they still work with the header present. + + Runner logic lives in scripts/run-stack-tests-runners.sh and is mounted from ConfigMap run-stack-tests-runners so the Task does not depend on the cloned platform git-revision. + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated list of apps in topological order + name: app-list + type: string + - description: Entry-point app (frontend / root of the graph) + name: entry-app + type: string + - description: Full ordered chain from entry to leaves + name: propagation-chain + type: string + - description: Space-separated list of intercepted apps (changed in this PR) + name: build-apps + type: string + - default: "" + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: "" + description: Comma-separated test IDs from query-test-plan. Empty = run all + tests. + name: tests-to-run + type: string + - default: "" + description: Service name with no mapped regression tests. Non-empty = report + unmapped. + name: unmapped-area + type: string + - default: "" + description: Comma-separated service/app names whose tests should run. Empty + = run all. + name: apps-to-test + type: string + results: + - description: JSON summary of test results per app + e2e + name: test-summary + type: string + steps: + - computeResources: {} + image: node:22-alpine + name: run-tests + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq bash >/dev/null 2>&1 + + npm install -g newman artillery >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + APP_LIST="demo-fe release-lifecycle-demo demo-api" + ENTRY_APP="demo-fe" + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + TESTS_TO_RUN="" + UNMAPPED_AREA="" + APPS_TO_TEST="" + TEST_SOURCE="/workspace/test-source" + TEST_SUMMARY_PATH="/tekton/results/test-summary" + export STACK_JSON APP_LIST ENTRY_APP CHAIN BUILD_APPS INTERCEPT \ + DEFAULT_NS TESTS_TO_RUN UNMAPPED_AREA APPS_TO_TEST \ + TEST_SOURCE TEST_SUMMARY_PATH + + RUNNERS="/opt/tekton-dag/run-stack-tests-runners.sh" + if [ ! -f "$RUNNERS" ]; then + echo "ERROR: run-stack-tests runners ConfigMap missing: $RUNNERS" >&2 + exit 1 + fi + # shellcheck disable=SC1090 + . "$RUNNERS" + volumeMounts: + - mountPath: /opt/tekton-dag + name: runners-script + workingDir: /workspace/test-source + volumes: + - configMap: + name: run-stack-tests-runners + name: runners-script + workspaces: + - name: test-source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:45Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: validate-original-traffic + tekton.dev/task: validate-original-traffic + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-validate-original-traffic + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13402" + uid: 44cb7b2e-2172-49ff-8295-3b83a2260049 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: entry-app + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: validate-original-traffic + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:17:33Z" + conditions: + - lastTransitionTime: "2026-09-28T03:17:33Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-validate-original-traffic-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: original-traffic-summary + type: string + value: | + { + "demo-fe": { + "health-check": "pass", + "http-code": "200" + }, + "release-lifecycle-demo": { + "health-check": "pass", + "http-code": "200" + }, + "demo-api": { + "health-check": "pass", + "http-code": "200" + }, + "e2e-no-header-passthrough": { + "status": "pass", + "http-code": "200" + }, + "artillery-no-header-burst": "pass", + "overall": "pass" + } + startTime: "2026-09-28T03:16:45Z" + steps: + - container: step-validate + imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 + name: validate + provenance: {} + terminated: + containerID: containerd://d9397c9746f9b3fb25cb7a2012a638548ac84da8e0bde7d616fff9c30de12520 + exitCode: 0 + finishedAt: "2026-09-28T03:17:32Z" + message: '[{"key":"original-traffic-summary","value":"{\n \"demo-fe\": {\n \"health-check\": + \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": + {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": + {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": + {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": + \"pass\",\n \"overall\": \"pass\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:16:50Z" + terminationReason: Completed + taskSpec: + description: | + Milestone 5 — Validates that original (non-intercepted) traffic continues to work while Telepresence intercepts are active. + Sends requests to every app in the stack WITHOUT the intercept header. These requests must reach the original deployments, not the PR pods. This proves the intercept is additive (header-based split) and does not disrupt normal service operation. + For a stack A→B→C→D where C is intercepted: + - Request WITHOUT header enters A → B → C (original) → D + - All four services respond normally from their original deployments + - The PR pod for C is never hit because no header is present + + Two checks per app: + 1. Direct health check — curl the service without headers + 2. Entry-point passthrough — request enters through the entry app + without headers, exercises the full chain via original deployments + + If Artillery is available, also runs a short load burst without headers to confirm sustained traffic handling during the intercept window. + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated ordered list of apps in the chain + name: propagation-chain + type: string + - default: "" + description: Space-separated list of intercepted apps (for reporting only) + name: build-apps + type: string + - description: Entry-point app (frontend / root of the graph) + name: entry-app + type: string + - default: staging + name: default-namespace + type: string + results: + - description: 'JSON summary: per-app health + e2e passthrough without headers' + name: original-traffic-summary + type: string + steps: + - computeResources: {} + image: node:22-alpine + name: validate + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq bash >/dev/null 2>&1 + npm install -g artillery >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + ENTRY_APP="demo-fe" + DEFAULT_NS="staging" + + echo '{}' > /tmp/orig-summary.json + OVERALL_PASS=true + + echo "============================================================" + echo " Milestone 5: Original Traffic Validation" + echo " (intercepts are ACTIVE — these requests carry NO header)" + echo "============================================================" + echo "" + echo " Intercepted apps: ${BUILD_APPS:-}" + echo " Full chain: $CHAIN" + echo " Entry point: $ENTRY_APP" + echo "" + echo " Expectation: every request WITHOUT the intercept header" + echo " reaches the ORIGINAL deployment, not the PR pod." + echo "" + + # =========================================================== + # Phase 1: Direct health check per service (no headers) + # =========================================================== + echo "############################################################" + echo " PHASE 1: Direct health check per service (no headers)" + echo "############################################################" + echo "" + + for APP in $CHAIN; do + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + MARKER="" + $IS_INTERCEPTED && MARKER=" [INTERCEPTED — should still serve original on bare requests]" + + echo " $APP:${MARKER}" + echo " URL: $URL" + echo " Headers: " + + HTTP_CODE=$(curl -s -o /tmp/orig-response-${APP}.txt -w "%{http_code}" \ + --connect-timeout 10 --max-time 30 \ + "$URL" 2>/dev/null || echo "000") + + if [ "$HTTP_CODE" = "000" ]; then + echo " WARN: Service not reachable (may be expected in dry-run)" + STATUS="unreachable" + elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then + echo " PASS: HTTP $HTTP_CODE — original deployment responding" + STATUS="pass" + else + echo " FAIL: HTTP $HTTP_CODE — unexpected response" + STATUS="fail" + OVERALL_PASS=false + fi + + jq --arg a "$APP" --arg s "$STATUS" --arg c "$HTTP_CODE" \ + '. + {($a): {"health-check": $s, "http-code": $c}}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + echo "" + done + + # =========================================================== + # Phase 2: Full-chain passthrough via entry point (no headers) + # =========================================================== + echo "############################################################" + echo " PHASE 2: Full-chain passthrough (no intercept headers)" + echo "############################################################" + echo "" + + ENTRY_NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + ENTRY_SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + ENTRY_URL="http://${ENTRY_APP}.${ENTRY_NS}.svc.cluster.local:${ENTRY_SPORT}/" + + echo " Entry URL: $ENTRY_URL" + echo " Headers: (no x-dev-session, no baggage)" + echo "" + echo " This request should flow through ALL original deployments." + echo " Even intercepted apps should respond from their original pods" + echo " because no header matches the Telepresence intercept rule." + echo "" + + PASSTHROUGH_RESULT=$(curl -s \ + --connect-timeout 15 --max-time 60 \ + "$ENTRY_URL" 2>/dev/null || echo '{"error":"unreachable"}') + + echo " Response:" + echo "$PASSTHROUGH_RESULT" | jq '.' 2>/dev/null || echo " $PASSTHROUGH_RESULT" + echo "" + + PASSTHROUGH_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + --connect-timeout 15 --max-time 60 \ + "$ENTRY_URL" 2>/dev/null || echo "000") + + if [ "$PASSTHROUGH_CODE" = "000" ]; then + echo " WARN: Entry point not reachable" + PASSTHROUGH_STATUS="unreachable" + elif [ "$PASSTHROUGH_CODE" -ge 200 ] && [ "$PASSTHROUGH_CODE" -lt 400 ]; then + echo " PASS: HTTP $PASSTHROUGH_CODE — full chain responding without headers" + PASSTHROUGH_STATUS="pass" + else + echo " FAIL: HTTP $PASSTHROUGH_CODE" + PASSTHROUGH_STATUS="fail" + OVERALL_PASS=false + fi + + jq --arg s "$PASSTHROUGH_STATUS" --arg c "$PASSTHROUGH_CODE" \ + '. + {"e2e-no-header-passthrough": {"status": $s, "http-code": $c}}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + # =========================================================== + # Phase 3: Artillery burst without headers + # =========================================================== + echo "" + echo "############################################################" + echo " PHASE 3: Artillery load burst (no intercept headers)" + echo "############################################################" + echo "" + echo " Short burst against entry point — no headers." + echo " Confirms sustained original-traffic handling during intercept." + echo "" + + cat > /tmp/original-traffic-artillery.yml </dev/null; then + echo " Artillery burst: PASS" + else + ARTY_EXIT=$? + if [ $ARTY_EXIT -eq 127 ]; then + echo " Artillery not available — skipping load burst (non-fatal)" + ARTILLERY_STATUS="skipped" + else + echo " Artillery burst: FAIL (exit $ARTY_EXIT)" + ARTILLERY_STATUS="fail" + OVERALL_PASS=false + fi + fi + + jq --arg s "$ARTILLERY_STATUS" \ + '. + {"artillery-no-header-burst": $s}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + # =========================================================== + # Summary + # =========================================================== + echo "" + echo "============================================================" + echo " Original Traffic Validation Summary" + echo "============================================================" + + jq --arg o "$([ "$OVERALL_PASS" = "true" ] && echo pass || echo fail)" \ + '. + {"overall": $o}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + cat /tmp/orig-summary.json | jq '.' + cat /tmp/orig-summary.json | tee /tekton/results/original-traffic-summary + + if [ "$OVERALL_PASS" = "false" ]; then + echo "" + echo "FAILED: Original traffic was disrupted while intercepts were active." + exit 1 + fi + + echo "" + echo "PASSED: Original traffic unaffected by active intercepts." +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:45Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: validate-propagation + tekton.dev/task: validate-stack-propagation + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-validate-propagation + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13256" + uid: 3537be13-4e47-4a45-91a9-e1685d434007 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: deployed-pods + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: validate-stack-propagation + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:16:51Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:51Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-validate-propagation-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:16:45Z" + steps: + - container: step-validate + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: validate + provenance: {} + terminated: + containerID: containerd://602973402dcb5a72a08d1cf9c3ce9a00c7d7c424f80ff394201939858f43fede + exitCode: 0 + finishedAt: "2026-09-28T03:16:50Z" + reason: Completed + startedAt: "2026-09-28T03:16:49Z" + terminationReason: Completed + taskSpec: + description: | + Fail-closed check that the original override header is transferred hop-to-hop up to the intercepted app(s). A rewritten or dropped value (e.g. pr-42 → local-debug) fails the task: intercepts only match the original session. + The header only needs to propagate from the entry point UP TO the intercepted app. Beyond the intercept, downstream calls are normal — there's no Telepresence intercept on those services to match on, so the header doesn't need to be there. + Example: A(originator) → B(forwarder) → C(terminal), D(terminal) + If B is intercepted: + - Header must reach B (A originates → B receives via Telepresence) + - B's calls to C and D are normal calls to normal deployments + - C and D do NOT need the header — no intercept to match + If C is intercepted: + - Header must reach C (A originates → B forwards → C receives) + - D is untouched + If B AND C are intercepted: + - Header must reach B AND continue to C + - B must forward because there's another intercept downstream + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated ordered list of apps in the chain + name: propagation-chain + type: string + - default: "" + description: Space-separated list of intercepted apps + name: build-apps + type: string + - description: Header value used for intercepts (e.g. x-dev-session:pr-42) + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: "" + description: | + JSON map app -> PR pod name from deploy-intercepts. When non-empty the + task also proves routing: a header-matched request must be served by + that PR pod and an unmatched request must not be (read from the pod's + access log through the Kubernetes API). + name: deployed-pods + type: string + steps: + - computeResources: {} + image: alpine:3.19 + name: validate + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + + HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') + + HEADER_VAL="" + if [ -n "$INTERCEPT" ]; then + HEADER_VAL=$(echo "$INTERCEPT" | cut -d: -f2-) + fi + + COUNT=0 + for APP in $CHAIN; do COUNT=$((COUNT + 1)); done + + # Find the deepest intercepted app in the chain + # Header only needs to propagate up to this point + DEEPEST_INTERCEPT_POS=0 + POS=0 + for APP in $CHAIN; do + POS=$((POS + 1)) + for BA in $BUILD_APPS; do + if [ "$BA" = "$APP" ]; then + DEEPEST_INTERCEPT_POS=$POS + fi + done + done + + echo "=============================================" + echo " Stack Propagation Validation" + echo "=============================================" + echo " Chain: $CHAIN" + echo " Header: $HEADER_NAME = $HEADER_VAL" + echo " Baggage key: $BAGGAGE_KEY" + echo " Hop count: $COUNT" + echo " Intercepted: ${BUILD_APPS:-}" + echo " Deepest intercept: position $DEEPEST_INTERCEPT_POS of $COUNT" + echo "" + + # Show the propagation contract for each hop + echo " Propagation contract:" + HOP=0 + PAST_DEEPEST=false + for APP in $CHAIN; do + HOP=$((HOP + 1)) + PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then + PAST_DEEPEST=true + fi + + TAG="" + $IS_INTERCEPTED && TAG=" ** PR BUILD **" + + if $PAST_DEEPEST; then + echo " $HOP. $APP ($PROP_ROLE) → NORMAL call (no intercept downstream, header not required)" + else + case "$PROP_ROLE" in + originator) echo " $HOP. $APP ($PROP_ROLE)${TAG} → SETS header, sends to next hop" ;; + forwarder) + # Only needs to forward if there's another intercepted app downstream + HAS_DOWNSTREAM_INTERCEPT=false + CHECK_POS=0 + for C in $CHAIN; do + CHECK_POS=$((CHECK_POS + 1)) + if [ $CHECK_POS -gt $HOP ]; then + for BA in $BUILD_APPS; do + [ "$BA" = "$C" ] && HAS_DOWNSTREAM_INTERCEPT=true + done + fi + done + + if $IS_INTERCEPTED && ! $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, downstream calls are NORMAL (no forwarding needed)" + elif $IS_INTERCEPTED && $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, MUST FORWARD (intercepted app downstream)" + elif $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, MUST FORWARD (intercepted app downstream)" + else + echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, downstream calls NORMAL" + fi + ;; + terminal) echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header, END of chain" ;; + *) echo " $HOP. $APP ($PROP_ROLE)${TAG}" ;; + esac + fi + done + echo "" + + if [ "$COUNT" -le 1 ]; then + echo "Single-app stack — health check only." + ENTRY=$(echo $CHAIN | awk '{print $1}') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + URL="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}/propagation" + + echo " Health check: $URL" + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + --connect-timeout 10 --max-time 30 \ + "$URL" 2>/dev/null || echo "000") + + if [ "$HTTP_CODE" = "000" ]; then + echo " WARN: Service not reachable (may be expected in dry-run)" + elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then + echo " PASS: HTTP $HTTP_CODE" + else + echo " WARN: HTTP $HTTP_CODE (non-fatal for PR validation)" + fi + exit 0 + fi + + # Multi-hop validation — enter through the originator + ENTRY=$(echo $CHAIN | awk '{print $1}') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + BASE="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}" + TRACEPARENT="00-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 32)-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 16)-01" + + fetch_originator() { + body_file=$(mktemp) + http_code=$(curl -s -o "$body_file" -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + -H "traceparent: ${TRACEPARENT}" \ + --connect-timeout 10 --max-time 60 \ + "$1" 2>/dev/null || true) + [ -n "$http_code" ] || http_code="000" + printf '%s' "$http_code" > /tmp/originator-http-code + cat "$body_file" + rm -f "$body_file" + } + + URL="${BASE}/propagation" + echo "Sending test request to originator: $URL" + echo " Headers: ${HEADER_NAME}=${HEADER_VAL}, baggage=${BAGGAGE_KEY}=${HEADER_VAL}" + echo "" + + RESULT=$(fetch_originator "$URL") + HTTP_CODE=$(cat /tmp/originator-http-code 2>/dev/null || echo "000") + if [ "$HTTP_CODE" = "404" ] || [ "$HTTP_CODE" = "000" ] \ + || echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then + URL="${BASE}/" + echo " /propagation unavailable (HTTP $HTTP_CODE) — retrying $URL" + RESULT=$(fetch_originator "$URL") + fi + + echo "Response:" + echo "$RESULT" | jq '.' 2>/dev/null || echo "$RESULT" + echo "" + + FAILED=0 + + if echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then + echo "FAIL: originator unreachable — cannot prove hop-to-hop copy" + FAILED=1 + fi + + HEADER_FOUND=false + if [ -n "$HEADER_VAL" ] && printf '%s' "$RESULT" | grep -Fq "$HEADER_VAL"; then + HEADER_FOUND=true + fi + + REWRITTEN=false + REWRITE_VALS=$(printf '%s' "$RESULT" | jq -r ' + .. | objects + | (.session // .devSession // .headerValue // empty) + | select(type=="string" and . != "") + ' 2>/dev/null || true) + if [ -n "$HEADER_VAL" ] && [ -n "$REWRITE_VALS" ]; then + for SV in $REWRITE_VALS; do + if [ "$SV" != "$HEADER_VAL" ]; then + REWRITTEN=true + echo "FAIL: original override '$HEADER_VAL' was rewritten to '$SV'" + FAILED=1 + fi + done + fi + + if [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND; then + echo "FAIL: original override '$HEADER_VAL' missing from response" + FAILED=1 + fi + + echo "Hop-by-hop verification (fail-closed):" + HOP=0 + for APP in $CHAIN; do + HOP=$((HOP + 1)) + PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + MARKER="" + $IS_INTERCEPTED && MARKER=" [INTERCEPTED]" + + REPO_BASE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|.repo // ""' | awk -F/ '{print $NF}') + REACHED=false + echo "$RESULT" | grep -qi "$APP" && REACHED=true + if [ -n "$REPO_BASE" ]; then + echo "$RESULT" | grep -qi "$REPO_BASE" && REACHED=true + fi + + HOP_SESSION=$(printf '%s' "$RESULT" | jq -r --arg a "$APP" ' + [.. | objects | select((.app // .name // .service // "") | ascii_downcase | contains($a | ascii_downcase))] + | map(.session // .devSession // .headerValue // empty) + | map(select(. != "")) + | first // empty + ' 2>/dev/null || true) + + HEADER_REQUIRED=true + if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then + HEADER_REQUIRED=false + fi + + if ! $HEADER_REQUIRED; then + echo " HOP $HOP $APP ($PROP_ROLE): OK (beyond intercept — original override not required)" + elif ! $REACHED; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — NOT REACHED (header required at this hop)" + FAILED=1 + elif [ -n "$HOP_SESSION" ] && [ -n "$HEADER_VAL" ] && [ "$HOP_SESSION" != "$HEADER_VAL" ]; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — rewritten session='$HOP_SESSION' (expected '$HEADER_VAL')" + FAILED=1 + elif [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND && [ -z "$HOP_SESSION" ]; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — original override not confirmed" + FAILED=1 + else + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: PASS — REACHED session=${HOP_SESSION:-$HEADER_VAL}" + fi + done + + echo "" + if [ "$FAILED" -ne 0 ]; then + echo "FAIL: original override was not transferred hop-to-hop" + exit 1 + fi + if $HEADER_FOUND; then + echo "PASS: original override '$HEADER_VAL' transferred hop-to-hop" + else + echo "PASS: hop-to-hop verification complete" + fi + echo "" + + # ------------------------------------------------------------------ + # Routing proof (fail-closed). The /propagation echo above is served + # identically by the baseline and the PR pod, so it cannot tell which + # pod answered. Prove it from the PR pod's own access log: a request + # tagged with a unique query string and carrying the header must show + # up there; an untagged-header request with a different tag must not. + # ------------------------------------------------------------------ + DEPLOYED_PODS='{ + "demo-fe": "pr-demo-fe-1790565353" + } + ' + if [ -n "$HEADER_VAL" ] && [ -n "$BUILD_APPS" ] \ + && [ -n "$DEPLOYED_PODS" ] && [ "$DEPLOYED_PODS" != "{}" ]; then + echo "Routing proof (fail-closed): PR pod must serve matched traffic only" + SA_DIR=/var/run/secrets/kubernetes.io/serviceaccount + API="https://kubernetes.default.svc" + pod_log() { + # $1 namespace, $2 pod. Prefer the app container; fall back to the + # pod default if that container name does not exist. + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?container=pr-component&sinceSeconds=600" || true) + if printf '%s' "$out" | grep -q '"kind":"Status"'; then + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?sinceSeconds=600" || true) + fi + printf '%s' "$out" + } + for APP in $BUILD_APPS; do + POD=$(echo "$DEPLOYED_PODS" | jq -r --arg a "$APP" '.[$a] // empty') + if [ -z "$POD" ]; then + echo " $APP: FAIL — no PR pod recorded in deployed-pods" + FAILED=1 + continue + fi + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + SVC="http://${APP}.${NS}.svc.cluster.local:${SPORT}" + TAG=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12) + HIT="probehit${TAG}" + MISS="probemiss${TAG}" + + HIT_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${HIT}" 2>/dev/null || echo "000") + MISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${MISS}" 2>/dev/null || echo "000") + echo " $APP -> $POD: matched request HTTP $HIT_CODE, unmatched request HTTP $MISS_CODE" + + LOG="" + ATTEMPT=0 + while [ $ATTEMPT -lt 10 ]; do + ATTEMPT=$((ATTEMPT + 1)) + LOG=$(pod_log "$NS" "$POD") + if printf '%s' "$LOG" | grep -q "$HIT"; then break; fi + sleep 2 + done + + if ! printf '%s' "$LOG" | grep -q "$HIT"; then + echo " $APP: FAIL — header-matched request never reached PR pod $POD (intercept is not routing)" + echo " --- last 20 log lines of $POD ---" + printf '%s\n' "$LOG" | tail -n 20 | sed 's/^/ /' + FAILED=1 + elif printf '%s' "$LOG" | grep -q "$MISS"; then + echo " $APP: FAIL — unmatched request also reached PR pod $POD (intercept steals all traffic)" + FAILED=1 + else + echo " $APP: PASS — PR pod $POD served the matched request and not the unmatched one" + fi + done + echo "" + if [ "$FAILED" -ne 0 ]; then + echo "FAIL: intercept routing not proven" + exit 1 + fi + echo "PASS: intercept routing proven from PR pod access logs" + echo "" + elif [ -n "$BUILD_APPS" ]; then + echo "Routing proof skipped: deployed-pods not provided" + echo "" + fi + + echo "Propagation validation complete." +kind: List +metadata: + resourceVersion: "" diff --git a/artifacts/intercept-e2e/pr-traffic-evidence.log b/artifacts/intercept-e2e/pr-traffic-evidence.log new file mode 100644 index 0000000..573a53a --- /dev/null +++ b/artifacts/intercept-e2e/pr-traffic-evidence.log @@ -0,0 +1,66 @@ +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
+[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization +[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl diff --git a/artifacts/intercept-e2e/readyz.json b/artifacts/intercept-e2e/readyz.json new file mode 100644 index 0000000..bf2d58c --- /dev/null +++ b/artifacts/intercept-e2e/readyz.json @@ -0,0 +1 @@ +{"stacks_loaded":9,"status":"ok"} diff --git a/artifacts/intercept-e2e/run-1-pipeline-results.json b/artifacts/intercept-e2e/run-1-pipeline-results.json new file mode 100644 index 0000000..f911afb --- /dev/null +++ b/artifacts/intercept-e2e/run-1-pipeline-results.json @@ -0,0 +1,11 @@ +{ + "name": "stackrun-bootstrap-bhmj5", + "condition": { + "lastTransitionTime": "2026-09-28T03:14:30Z", + "message": "Tasks Completed: 8 (Failed: 0, Cancelled 0), Skipped: 5", + "reason": "Completed", + "status": "True", + "type": "Succeeded" + }, + "results": [] +} diff --git a/artifacts/intercept-e2e/run-1-pipelinerun.yaml b/artifacts/intercept-e2e/run-1-pipelinerun.yaml new file mode 100644 index 0000000..8a71589 --- /dev/null +++ b/artifacts/intercept-e2e/run-1-pipelinerun.yaml @@ -0,0 +1,482 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:08Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/pipeline: stack-bootstrap + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5 + namespace: tekton-pipelines + resourceVersion: "12223" + uid: eb808615-af94-42bf-939a-f2c547b42675 +spec: + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: git-revision + value: main + - name: stack-file + value: stacks/stack-one.yaml + - name: image-registry + value: localhost:5000 + - name: cache-repo + value: "" + - name: max-retries + value: "2" + pipelineRef: + name: stack-bootstrap + taskRunTemplate: + serviceAccountName: tekton-pr-sa + timeouts: + pipeline: 2h0m0s + workspaces: + - name: shared-workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + status: {} + - name: ssh-key + secret: + secretName: ssh-key-secret + - name: build-cache + persistentVolumeClaim: + claimName: build-cache +status: + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-fetch-source + pipelineTaskName: fetch-source + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-resolve-stack + pipelineTaskName: resolve-stack + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-clone-app-repos + pipelineTaskName: clone-app-repos + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-build-select-tool-apps + pipelineTaskName: build-select-tool-apps + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-build-compile-npm + pipelineTaskName: build-compile-npm + whenExpressions: + - input: "true" + operator: in + values: + - "true" + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-build-compile-maven + pipelineTaskName: build-compile-maven + whenExpressions: + - input: "true" + operator: in + values: + - "true" + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-build-containerize + pipelineTaskName: build-containerize + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-bootstrap-bhmj5-deploy-full-stack + pipelineTaskName: deploy-full-stack + completionTime: "2026-09-28T03:14:30Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:30Z" + message: 'Tasks Completed: 8 (Failed: 0, Cancelled 0), Skipped: 5' + reason: Completed + status: "True" + type: Succeeded + pipelineSpec: + description: | + One-time bootstrap: clone, resolve, build all stack apps, deploy full stack. Run this so the cluster has every app running (Services by app name). Then run stack-pr-test with a changed-app to add intercepts and run E2E. + params: + - description: Platform repo URL (has stacks/; app repos come from stack) + name: git-url + type: string + - description: Branch, tag, or SHA + name: git-revision + type: string + - default: stacks/stack-one.yaml + description: Path to stack YAML relative to repo root + name: stack-file + type: string + - description: Container registry base (e.g. localhost:5000) + name: image-registry + type: string + - default: base-1 + description: Tag for base images (e.g. base-1) + name: image-tag + type: string + - default: ubuntu:22.04 + description: Image for npm compile step + name: compile-image-npm + type: string + - default: ubuntu:22.04 + description: Image for Maven compile step + name: compile-image-maven + type: string + - default: ubuntu:22.04 + description: Image for Gradle compile step + name: compile-image-gradle + type: string + - default: ubuntu:22.04 + description: Image for pip compile step + name: compile-image-pip + type: string + - default: ubuntu:22.04 + description: Image for Composer/PHP compile step + name: compile-image-php + type: string + - default: "" + description: Kaniko cache repo. Empty disables cache. + name: cache-repo + type: string + - default: "0" + description: Max concurrent Kaniko pods for containerize. 0 = unlimited. + name: max-parallel-builds + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task to run after clone, before compile. + name: pre-build-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task to run after containerize, before deploy. + name: post-build-task + type: string + tasks: + - name: fetch-source + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + taskRef: + kind: Task + name: git-clone + workspaces: + - name: output + workspace: shared-workspace + - name: resolve-stack + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: version-overrides + value: '{}' + runAfter: + - fetch-source + taskRef: + kind: Task + name: resolve-stack + workspaces: + - name: source + workspace: shared-workspace + - name: clone-app-repos + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: git-revision + value: main + runAfter: + - resolve-stack + taskRef: + kind: Task + name: clone-app-repos + workspaces: + - name: source + workspace: shared-workspace + - name: ssh-key + workspace: ssh-key + - name: build-select-tool-apps + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + runAfter: + - clone-app-repos + taskRef: + kind: Task + name: build-select-tool-apps + workspaces: + - name: source + workspace: shared-workspace + - name: hook-pre-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + runAfter: + - build-select-tool-apps + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: build-compile-npm + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-npm + value: ubuntu:22.04 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-npm + when: + - input: $(tasks.resolve-stack.results.run-compile-npm) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-maven + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-maven + value: ubuntu:22.04 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-maven + when: + - input: $(tasks.resolve-stack.results.run-compile-maven) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-gradle + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-gradle + value: ubuntu:22.04 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-gradle + when: + - input: $(tasks.resolve-stack.results.run-compile-gradle) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-pip + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-pip + value: ubuntu:22.04 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-pip + when: + - input: $(tasks.resolve-stack.results.run-compile-pip) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-composer + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-php + value: ubuntu:22.04 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-composer + when: + - input: $(tasks.resolve-stack.results.run-compile-composer) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-containerize + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + - name: image-tag + value: base-1 + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + runAfter: + - build-compile-npm + - build-compile-maven + - build-compile-gradle + - build-compile-pip + - build-compile-composer + taskRef: + kind: Task + name: build-containerize + workspaces: + - name: source + workspace: shared-workspace + - name: hook-post-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: image-registry + value: localhost:5000 + runAfter: + - build-containerize + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: deploy-full-stack + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: default-namespace + value: staging + runAfter: + - build-containerize + taskRef: + kind: Task + name: deploy-full-stack + workspaces: + - name: shared-workspace + - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; + required for SSH pull + name: ssh-key + - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse + across runs. + name: build-cache + optional: true + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + skippedTasks: + - name: hook-pre-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: build-compile-gradle + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-pip + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-composer + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: hook-post-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + startTime: "2026-09-28T03:13:08Z" diff --git a/artifacts/intercept-e2e/run-1-pod-logs.txt b/artifacts/intercept-e2e/run-1-pod-logs.txt new file mode 100644 index 0000000..4a71ff5 --- /dev/null +++ b/artifacts/intercept-e2e/run-1-pod-logs.txt @@ -0,0 +1,305 @@ +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/prepare] 2026/09/28 03:13:38 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/prepare] 2026/09/28 03:13:19 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/place-scripts] 2026/09/28 03:13:38 Decoded script /tekton/scripts/script-0-x4dvx +[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/prepare] 2026/09/28 03:13:31 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/prepare] 2026/09/28 03:14:25 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/prepare] 2026/09/28 03:13:38 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/place-scripts] 2026/09/28 03:14:26 Decoded script /tekton/scripts/script-0-xsnqx +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/place-scripts] 2026/09/28 03:14:07 Decoded script /tekton/scripts/script-0-nc9v2 +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/place-scripts] 2026/09/28 03:13:38 Decoded script /tekton/scripts/script-0-nlv58 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/prepare] 2026/09/28 03:14:06 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] === Compile (maven): release-lifecycle-demo === +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Scanning for projects... +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -----------------< com.example:tekton-dag-spring-boot >----------------- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building tekton-dag-spring-boot 0.1.0 +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --------------------------------[ jar ]--------------------------------- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-clean-plugin:3.3.2:clean (default-clean) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Copying 1 resource from src/main/resources to target/classes +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Copying 0 resource from src/main/resources to target/classes +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :source +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 2 source files with javac [debug release 21] to target/classes +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/release-lifecycle-demo/src/test/resources +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:testCompile (default-testCompile) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :dependency +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 1 source file with javac [debug release 21] to target/test-classes +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-surefire-plugin:3.1.2:test (default-test) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Tests are skipped. +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building jar: /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- spring-boot-maven-plugin:3.2.0:repackage (repackage) @ tekton-dag-spring-boot --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Replacing main artifact /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar with repackaged archive, adding nested dependencies in BOOT-INF/. +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] The original artifact has been renamed to /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar.original +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] BUILD SUCCESS +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Total time: 1.435 s +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Finished at: 2026-09-28T03:14:03Z +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] === Compile (maven): demo-api === +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Scanning for projects... +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -------------< com.example:tekton-dag-spring-boot-gradle >-------------- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building tekton-dag-spring-boot-gradle 0.1.0 +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --------------------------------[ jar ]--------------------------------- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-clean-plugin:3.3.2:clean (default-clean) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/main/resources +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/main/resources +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :source +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 3 source files with javac [debug release 21] to target/classes +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/test/resources +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:testCompile (default-testCompile) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] No sources to compile +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-surefire-plugin:3.1.2:test (default-test) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Tests are skipped. +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building jar: /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- spring-boot-maven-plugin:3.2.0:repackage (repackage) @ tekton-dag-spring-boot-gradle --- +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Replacing main artifact /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar with repackaged archive, adding nested dependencies in BOOT-INF/. +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] The original artifact has been renamed to /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar.original +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] BUILD SUCCESS +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Total time: 1.328 s +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Finished at: 2026-09-28T03:14:05Z +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ +[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] Compile (maven) done. +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 1s +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] run `npm fund` for details +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] npm audit fix +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] npm audit fix --force +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] > vite build +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] transforming... +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] rendering chunks... +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] computing gzip size... +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] ✓ built in 468ms +[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] Compile (npm) done. +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] Resolved versions: +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] { +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] } +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] truetruefalsefalsefalse +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/place-scripts] 2026/09/28 03:13:25 Decoded script /tekton/scripts/script-0-l6cgk +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/prepare] 2026/09/28 03:13:14 Entrypoint initialization +[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' true '=' true ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + cleandir +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] {"level":"info","ts":1790565198.504641,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] {"level":"info","ts":1790565198.5168085,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + cd /workspace/output/ +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git rev-parse HEAD +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + EXIT_CODE=0 +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' 1790468109 +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Apps: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] PVC: pvc-58ec7948bb +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Cache: disabled +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Max parallel: 0 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: demo-fe +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565249 created +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-release-lifecycle-demo-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/release-lifecycle-demo:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/release-lifecycle-demo:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-release-lifecycle-demo-1790565249 created +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: demo-api +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-demo-api-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-api:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-api:base-1 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-demo-api-1790565249 created +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] --- Waiting for final batch --- +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565249: Succeeded +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-release-lifecycle-demo-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-release-lifecycle-demo-1790565249: Succeeded +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-demo-api-1790565249 +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-demo-api-1790565249: Succeeded +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565249" deleted from tekton-pipelines namespace +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-demo-api-1790565249" deleted from tekton-pipelines namespace +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-release-lifecycle-demo-1790565249" deleted from tekton-pipelines namespace +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Built images: +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] { +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:base-1", +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-api": "localhost:5000/demo-api:base-1" +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] } +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] { +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:base-1", +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-api": "localhost:5000/demo-api:base-1" +[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] } +[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:13:31 Decoded script /tekton/scripts/script-0-sl58b +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] ============================================= +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploy full stack (base for intercept E2E) +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] ============================================= +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying demo-fe -> staging (image: localhost:5000/demo-fe:base-1) +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=originator +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=demo-fe +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] DOWNSTREAM_URL=http://release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BFF_UPSTREAM=http://release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging configured +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-fe unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/demo-fe unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying release-lifecycle-demo -> staging (image: localhost:5000/release-lifecycle-demo:base-1) +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=forwarder +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] DOWNSTREAM_URL=http://demo-api +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BFF_UPSTREAM=http://demo-api +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/release-lifecycle-demo unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/release-lifecycle-demo unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying demo-api -> staging (image: localhost:5000/demo-api:base-1) +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=terminal +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=demo-api +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-api unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/demo-api unchanged +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Waiting for Deployments to be available... +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-fe condition met +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/release-lifecycle-demo condition met +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-api condition met +[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Full stack deployed. +[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/place-scripts] 2026/09/28 03:13:14 Decoded script /tekton/scripts/script-0-9lrll +[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/place-scripts] 2026/09/28 03:13:19 Decoded script /tekton/scripts/script-0-mtbsv +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning release-lifecycle-demo from https://github.com/jmjava/tekton-dag-spring-boot.git (revision: main) -> /workspace/source/release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning demo-api from https://github.com/jmjava/tekton-dag-spring-boot-gradle.git (revision: main) -> /workspace/source/demo-api +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [release-lifecycle-demo] Cloning into '/workspace/source/release-lifecycle-demo'... +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-api] Cloning into '/workspace/source/demo-api'... +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: demo-fe +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-spring-boot +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at d13b03e Merge pull request #1 from jmjava/milestone-4 +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [release-lifecycle-demo] at d13b03e (main) +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-spring-boot-gradle +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at c0840ee Fix Dockerfile: use target/*.jar (Maven output) instead of build/libs +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-api] at c0840ee (main) +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: demo-api +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/release-lifecycle-demo +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-api +[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/prepare] 2026/09/28 03:13:25 Entrypoint initialization diff --git a/artifacts/intercept-e2e/run-1-stackrun.yaml b/artifacts/intercept-e2e/run-1-stackrun.yaml new file mode 100644 index 0000000..4b9b720 --- /dev/null +++ b/artifacts/intercept-e2e/run-1-stackrun.yaml @@ -0,0 +1,33 @@ +apiVersion: tektondag.io/v1alpha1 +kind: StackRun +metadata: + creationTimestamp: "2026-09-28T03:13:08Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + tektondag.io/mode: bootstrap + name: stackrun-bootstrap-bhmj5 + namespace: tekton-pipelines + resourceVersion: "12224" + uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 +spec: + cacheRepo: "" + gitRevision: main + gitUrl: https://github.com/jmjava/tekton-dag.git + imageRegistry: localhost:5000 + maxRetries: 2 + mode: bootstrap + stackFile: stacks/stack-one.yaml + stackRef: stack-one + timeout: 2h +status: + conditions: + - lastTransitionTime: "2026-09-28T03:13:08Z" + message: PipelineRun stackrun-bootstrap-bhmj5 phase=Completed + observedGeneration: 1 + reason: Completed + status: "False" + type: Ready + observedGeneration: 1 + phase: Completed + pipelineRunName: stackrun-bootstrap-bhmj5 diff --git a/artifacts/intercept-e2e/run-1-taskruns.yaml b/artifacts/intercept-e2e/run-1-taskruns.yaml new file mode 100644 index 0000000..9a19f78 --- /dev/null +++ b/artifacts/intercept-e2e/run-1-taskruns.yaml @@ -0,0 +1,1946 @@ +apiVersion: v1 +items: +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:37Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: build-compile-maven + tekton.dev/task: build-compile-maven + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-build-compile-maven + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "12019" + uid: 6226e26c-ded1-4c51-970c-8af2f72fe8eb + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: compile-image-maven + value: ubuntu:22.04 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-compile-maven + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + - name: build-cache + persistentVolumeClaim: + claimName: build-cache + status: + artifacts: {} + completionTime: "2026-09-28T03:14:05Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:05Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-build-compile-maven-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:13:37Z" + steps: + - container: step-compile-maven + imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 + name: compile-maven + provenance: {} + terminated: + containerID: containerd://988f0c82664fbb0c360df98044cf1f3a332fed1d58b8a01b160546e4adc4fb14 + exitCode: 0 + finishedAt: "2026-09-28T03:14:05Z" + reason: Completed + startedAt: "2026-09-28T03:13:42Z" + terminationReason: Completed + taskSpec: + description: Runs Maven compile for apps in .tool-apps.json (invoked only when + build-apps include maven). + params: + - name: stack-json + type: string + - default: ubuntu:22.04 + name: compile-image-maven + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: COMPILE_IMAGE + value: ubuntu:22.04 + image: ubuntu:22.04 + name: compile-maven + script: | + #!/usr/bin/env bash + set -e + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates openjdk-21-jdk-headless >/dev/null 2>&1; fi + [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.m2/repository" && export MAVEN_OPTS="-Dmaven.repo.local=$CACHE/.m2/repository" + APPS=$(jq -r '.maven[]' .tool-apps.json 2>/dev/null || true) + [ -z "$APPS" ] && echo "No maven apps" && exit 0 + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then + apt-get install -y -qq maven >/dev/null 2>&1 || { curl -fsSL https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz | tar xz -C /opt && ln -sf /opt/apache-maven-3.9.6/bin/mvn /usr/local/bin/mvn; } + fi + for APP in $APPS; do + echo "=== Compile (maven): $APP ===" + CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') + PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') + POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') + CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') + APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" + [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + cd "$APP_DIR" + [ -n "$PRE_CMD" ] && eval "$PRE_CMD" + [ -n "$CMD" ] && eval "$CMD" || mvn -B clean package -DskipTests + [ -n "$POST_CMD" ] && eval "$POST_CMD" + done + echo "Compile (maven) done." + workingDir: /workspace/source + workspaces: + - name: source + - name: build-cache + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:37Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: build-compile-npm + tekton.dev/task: build-compile-npm + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-build-compile-npm + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "12006" + uid: 57a2df7c-a576-453c-941f-fd80c8bc7fc0 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: compile-image-npm + value: ubuntu:22.04 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-compile-npm + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + - name: build-cache + persistentVolumeClaim: + claimName: build-cache + status: + artifacts: {} + completionTime: "2026-09-28T03:14:04Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:04Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-build-compile-npm-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:13:37Z" + steps: + - container: step-compile-npm + imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 + name: compile-npm + provenance: {} + terminated: + containerID: containerd://2a88534b4d567c2a447812b431effbdd77879224eaa274ad80d2acb055b49211 + exitCode: 0 + finishedAt: "2026-09-28T03:14:04Z" + reason: Completed + startedAt: "2026-09-28T03:13:42Z" + terminationReason: Completed + taskSpec: + description: Runs npm compile for apps in .tool-apps.json (invoked only when + build-apps include npm). + params: + - name: stack-json + type: string + - default: ubuntu:22.04 + name: compile-image-npm + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: COMPILE_IMAGE + value: ubuntu:22.04 + image: ubuntu:22.04 + name: compile-npm + script: | + #!/usr/bin/env bash + set -e + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi + [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" + APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) + [ -z "$APPS" ] && echo "No npm apps" && exit 0 + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 + fi + for APP in $APPS; do + echo "=== Compile (npm): $APP ===" + CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') + PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') + POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') + CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') + APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" + [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + cd "$APP_DIR" + [ -n "$PRE_CMD" ] && eval "$PRE_CMD" + if [ -n "$CMD" ]; then + RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') + eval "$RUN_CMD" + else + [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present + fi + [ -n "$POST_CMD" ] && eval "$POST_CMD" + done + echo "Compile (npm) done." + workingDir: /workspace/source + workspaces: + - name: source + - name: build-cache + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:14:05Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: build-containerize + tekton.dev/task: build-containerize + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-build-containerize + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "12160" + uid: 4f6f41e1-94c6-4849-8fb4-151102447280 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe release-lifecycle-demo demo-api + - name: image-registry + value: localhost:5000 + - name: image-tag + value: base-1 + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-containerize + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + status: + artifacts: {} + completionTime: "2026-09-28T03:14:24Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:24Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-build-containerize-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: built-images + type: string + value: | + { + "demo-fe": "localhost:5000/demo-fe:base-1", + "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", + "demo-api": "localhost:5000/demo-api:base-1" + } + startTime: "2026-09-28T03:14:05Z" + steps: + - container: step-containerize + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: containerize + provenance: {} + terminated: + containerID: containerd://e9dd691b622fdde8a7e2821346833a013c35fd181c2de93ef237372ea47ac262 + exitCode: 0 + finishedAt: "2026-09-28T03:14:24Z" + message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:base-1\",\n \"release-lifecycle-demo\": + \"localhost:5000/release-lifecycle-demo:base-1\",\n \"demo-api\": \"localhost:5000/demo-api:base-1\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:09Z" + terminationReason: Completed + taskSpec: + description: | + Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. + params: + - name: stack-json + type: string + - name: build-apps + type: string + - name: image-registry + type: string + - name: image-tag + type: string + - default: pr- + name: tag-prefix + type: string + - default: "" + description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables + cache. + name: cache-repo + type: string + - default: "0" + description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). + name: max-parallel-builds + type: string + results: + - description: JSON map of app-name → full image URI + name: built-images + type: string + steps: + - computeResources: {} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: bitnami/kubectl:latest + name: containerize + script: | + #!/bin/bash + set -e + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe release-lifecycle-demo demo-api" + REGISTRY="localhost:5000" + IMAGE_TAG='base-1' + TAG_PREFIX="" + CACHE_REPO="" + MAX_PARALLEL="0" + SOURCE_PVC="pvc-58ec7948bb" + SOURCE_PATH="/workspace/source" + NS="$POD_NAMESPACE" + + PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') + PUSH_CACHE="" + if [ -n "$CACHE_REPO" ]; then + PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') + fi + + if [ -z "$SOURCE_PVC" ]; then + echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 + exit 1 + fi + + IS_JSON=false + case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac + + TS=$(date +%s) + + echo "=============================================" + echo " Parallel Containerize (Kaniko pods)" + echo "=============================================" + echo " Apps: $BUILD_APPS" + echo " PVC: $SOURCE_PVC" + echo " Cache: ${CACHE_REPO:-disabled}" + echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" + echo "" + + > /tmp/pod-list.txt + > /tmp/app-images.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + + wait_for_batch() { + local BATCH_FAILED="" + while IFS= read -r P; do + [ -z "$P" ] && continue + echo " Waiting: $P" >&2 + while true; do + PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") + case "$PH" in + Succeeded) echo " $P: Succeeded" >&2; break ;; + Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; + *) sleep 5 ;; + esac + done + done < /tmp/batch-pods.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + echo "$BATCH_FAILED" + } + + FAILED="" + + for APP in $BUILD_APPS; do + echo "=========================================" + echo " Containerize: $APP" + echo "=========================================" + + if $IS_JSON; then + APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) + [ -z "$APP_VER" ] && APP_VER="latest" + TAG="${TAG_PREFIX}${APP_VER}" + else + TAG="${TAG_PREFIX}${IMAGE_TAG}" + fi + + CONTEXT_PATH="${SOURCE_PATH}/${APP}" + FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" + PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" + PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" + + if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then + echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + continue + fi + + KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" + if [ -n "$PUSH_CACHE" ]; then + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" + else + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" + fi + KANIKO_ARGS="${KANIKO_ARGS}]" + + POD_NAME="kaniko-${APP}-${TS}" + echo " Launching: $POD_NAME" + echo " Push to: $PUSH_IMAGE" + echo " Pull as: $PULL_IMAGE" + + cat <> /tmp/pod-list.txt + echo "$POD_NAME" >> /tmp/batch-pods.txt + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + BATCH_COUNT=$((BATCH_COUNT + 1)) + echo "" + + if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then + echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + done + + if [ -s /tmp/batch-pods.txt ]; then + echo " --- Waiting for final batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + + echo "" + echo " Cleaning up Kaniko pods..." + while IFS= read -r POD_NAME; do + [ -z "$POD_NAME" ] && continue + kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & + done < /tmp/pod-list.txt + wait + + if [ -n "$FAILED" ]; then + echo "FAILED: Kaniko pods failed:$FAILED" >&2 + for P in $FAILED; do + echo "--- Logs for $P ---" + kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true + done + exit 1 + fi + + > /tmp/parts.txt + while IFS='=' read -r APP IMG; do + [ -z "$APP" ] && continue + echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt + done < /tmp/app-images.txt + + TOTAL=$(wc -l < /tmp/parts.txt) + COUNT=0 + echo '{' > /tmp/built.json + while IFS= read -r line; do + COUNT=$((COUNT + 1)) + if [ "$COUNT" -lt "$TOTAL" ]; then + echo "${line}," >> /tmp/built.json + else + echo "${line}" >> /tmp/built.json + fi + done < /tmp/parts.txt + echo '}' >> /tmp/built.json + + echo "" + echo " Built images:" + cat /tmp/built.json + cat /tmp/built.json | tee /tekton/results/built-images + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:30Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: build-select-tool-apps + tekton.dev/task: build-select-tool-apps + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-build-select-tool-apps + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "11826" + uid: ef45341a-f32a-47d1-908d-af426141d9c9 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe release-lifecycle-demo demo-api + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-select-tool-apps + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + status: + artifacts: {} + completionTime: "2026-09-28T03:13:37Z" + conditions: + - lastTransitionTime: "2026-09-28T03:13:37Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-build-select-tool-apps-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:13:30Z" + steps: + - container: step-select-tool-apps + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: select-tool-apps + provenance: {} + terminated: + containerID: containerd://e57aa968193bebc54f1afdc7d06aee6f8c9aa94dbf0a0a14cb9b7c72506c7fd2 + exitCode: 0 + finishedAt: "2026-09-28T03:13:37Z" + reason: Completed + startedAt: "2026-09-28T03:13:36Z" + terminationReason: Completed + taskSpec: + description: Writes .tool-apps.json from stack-json and build-apps; used by + conditional compile tasks. + params: + - name: stack-json + type: string + - name: build-apps + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: BUILD_APPS + value: demo-fe release-lifecycle-demo demo-api + image: alpine:3.19 + name: select-tool-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" + for app in $BUILD_APPS; do + tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) NPM_APPS="$NPM_APPS $app" ;; + maven) MAVEN_APPS="$MAVEN_APPS $app" ;; + gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; + pip) PIP_APPS="$PIP_APPS $app" ;; + composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; + esac + done + jq -n \ + --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ + '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json + echo "Tool app lists written to .tool-apps.json" + workingDir: /workspace/source + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:24Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: clone-app-repos + tekton.dev/task: clone-app-repos + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-clone-app-repos + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "11755" + uid: 39decb57-ff32-4e53-85e9-69061edd8499 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe release-lifecycle-demo demo-api + - name: git-revision + value: main + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: clone-app-repos + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + - name: ssh-key + secret: + secretName: ssh-key-secret + status: + artifacts: {} + completionTime: "2026-09-28T03:13:30Z" + conditions: + - lastTransitionTime: "2026-09-28T03:13:30Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-clone-app-repos-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:13:24Z" + steps: + - container: step-clone-apps + imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f + name: clone-apps + provenance: {} + terminated: + containerID: containerd://0e99c8112e3feb6bcb6b3b43aa019a9d2af8b258d97732657befd2e6666e415c + exitCode: 0 + finishedAt: "2026-09-28T03:13:30Z" + reason: Completed + startedAt: "2026-09-28T03:13:29Z" + terminationReason: Completed + taskSpec: + description: | + Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. + params: + - description: Stack graph JSON (from resolve-stack) + name: stack-json + type: string + - description: Space-separated list of app names to clone + name: build-apps + type: string + - default: main + description: Branch or SHA to check out for app repos (default; overridden + by app-revisions per app) + name: git-revision + type: string + - default: '{}' + description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). + Used for PR builds where the changed app is checked out at its PR branch. + name: app-revisions + type: string + steps: + - computeResources: {} + image: alpine/git:latest + name: clone-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe release-lifecycle-demo demo-api" + DEFAULT_REVISION="main" + APP_REVISIONS='{}' + WORKSPACE="/workspace/source" + + # Clear existing app dirs so we get a fresh clone (no stale/cached content) + echo " Clearing existing app dirs..." + for APP in $BUILD_APPS; do + rm -rf "$WORKSPACE/$APP" + done + + # Prefer authenticated SSH when a key is present. Public repositories + # can be cloned over HTTPS from an empty Secret workspace. + mkdir -p /root/.ssh + chmod 700 /root/.ssh + KEY_DIR="/workspace/ssh-key" + CLONE_TRANSPORT=https + if [ -f "$KEY_DIR/id_ed25519" ]; then + cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + CLONE_TRANSPORT=ssh + elif [ -f "$KEY_DIR/id_rsa" ]; then + cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa + chmod 600 /root/.ssh/id_rsa + CLONE_TRANSPORT=ssh + else + echo " No SSH key found; cloning public repositories over HTTPS" + fi + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true + fi + + # Clone all app repos in parallel (M7.1) + clone_app() { + local APP="$1" REPO="$2" REVISION="$3" URL="$4" + echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" + git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" + if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then + echo "ERROR: could not fetch $REVISION for $APP" >&2 + exit 1 + fi + git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD + echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" + echo " Done: $APP" + } + + PIDS="" + for APP in $BUILD_APPS; do + REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') + if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then + echo " WARN: No repo for app $APP in stack, skipping" + continue + fi + REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') + [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + URL="git@github.com:${REPO}.git" + else + URL="https://github.com/${REPO}.git" + fi + clone_app "$APP" "$REPO" "$REVISION" "$URL" & + PIDS="$PIDS $!" + done + + CLONE_FAILED=false + for PID in $PIDS; do + if ! wait "$PID"; then + CLONE_FAILED=true + fi + done + if [ "$CLONE_FAILED" = "true" ]; then + echo "ERROR: One or more clones failed" >&2 + exit 1 + fi + + echo "" + echo "App repos cloned (parallel). Listing:" + for APP in $BUILD_APPS; do + [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true + done + workingDir: /workspace/source + workspaces: + - description: Workspace with platform repo at root; app repos will be cloned + into source/ + name: source + - description: Volume that may contain id_ed25519 or id_rsa for private-repository + SSH clones + name: ssh-key +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:14:25Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: deploy-full-stack + tekton.dev/task: deploy-full-stack + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-deploy-full-stack + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "12221" + uid: a1ed4745-7f31-407c-a1d3-4e75f35d049a + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: built-images + value: | + { + "demo-fe": "localhost:5000/demo-fe:base-1", + "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", + "demo-api": "localhost:5000/demo-api:base-1" + } + - name: default-namespace + value: staging + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: deploy-full-stack + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:14:29Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:29Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-deploy-full-stack-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:14:25Z" + steps: + - container: step-deploy + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: deploy + provenance: {} + terminated: + containerID: containerd://f121b1c7185724070652ab471061fb045f783983ff3927008c366cb65ca16cfd + exitCode: 0 + finishedAt: "2026-09-28T03:14:29Z" + reason: Completed + startedAt: "2026-09-28T03:14:28Z" + terminationReason: Completed + taskSpec: + description: | + Deploys the full stack so every app has a Deployment and Service in the cluster. Used once (bootstrap) before running PR pipeline with intercepts. deploy-stack-intercepts expects these Services to exist; it only adds PR pods + Telepresence intercept for changed app(s). M13: injects stack secrets/config blocks as envFrom and volume mounts; fails fast when referenced Secrets are missing. Also injects BAGGAGE_* / APP_NAME / DOWNSTREAM_URL so install() copies the original override header hop-to-hop without a hand-written env block. + params: + - description: Full stack graph JSON (apps, defaults.namespace, ports, secrets, + config) + name: stack-json + type: string + - description: JSON map of app name → image URI + name: built-images + type: string + - default: staging + description: Namespace for apps that do not specify one + name: default-namespace + type: string + - default: "true" + description: When true, fail if referenced Secrets are missing before apply + name: validate-secrets + type: string + steps: + - computeResources: {} + image: bitnami/kubectl:latest + name: deploy + script: | + #!/bin/bash + set -euo pipefail + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILT='{ + "demo-fe": "localhost:5000/demo-fe:base-1", + "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", + "demo-api": "localhost:5000/demo-api:base-1" + } + ' + DEFAULT_NS="staging" + VALIDATE_SECRETS="true" + + echo "=============================================" + echo " Deploy full stack (base for intercept E2E)" + echo "=============================================" + + for APP in $(echo "$STACK_JSON" | jq -r '.apps[].name'); do + IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') + if [ -z "$IMAGE" ] || [ "$IMAGE" = "null" ]; then + echo " SKIP $APP: no image in built-images" + continue + fi + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + + # Pre-deploy Secret + ConfigMap validation (M13) + if [ "$VALIDATE_SECRETS" = "true" ]; then + MISSING_SECRETS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + .apps[] | select(.name==$a) | + [(.secrets."env-from" // [])[], ((.secrets."volume-mounts" // [])[]?.secret // empty)] | + unique | .[] + ') + for S in $MISSING_SECRETS; do + if ! kubectl get secret "$S" -n "$NS" >/dev/null 2>&1; then + echo "ERROR: app $APP references Secret '$S' which is missing in namespace $NS" + exit 1 + fi + done + MISSING_CMS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + .apps[] | select(.name==$a) | + [(.config."env-from" // [])[], ((.config."volume-mounts" // [])[]?.configmap // empty)] | + unique | .[] + ') + for C in $MISSING_CMS; do + if ! kubectl get configmap "$C" -n "$NS" >/dev/null 2>&1; then + echo "ERROR: app $APP references ConfigMap '$C' which is missing in namespace $NS" + exit 1 + fi + done + fi + + # Build Deployment JSON with optional envFrom / volumes from stack secrets+config + # Volume names are lowercased and sanitized for DNS-1123. + DEPLOY_JSON=$(echo "$STACK_JSON" | jq -c --arg a "$APP" --arg ns "$NS" \ + --arg img "$IMAGE" --argjson cport "$CPORT" ' + def volname($prefix; $i; $n): + (($prefix + "-" + ($i|tostring) + "-" + $n) + | ascii_downcase + | gsub("_"; "-") + | gsub("[^a-z0-9-]"; "-") + | gsub("-+"; "-") + | sub("^-+"; "") + | sub("-+$"; "") + | .[0:63]); + (.apps[] | select(.name==$a)) as $app | + ($app.secrets."env-from" // []) as $senv | + ($app.config."env-from" // []) as $cenv | + ($app.secrets."volume-mounts" // []) as $svm | + ($app.config."volume-mounts" // []) as $cvm | + [ + ($senv[] | {secretRef: {name: .}}), + ($cenv[] | {configMapRef: {name: .}}) + ] as $envFrom | + [ + ($svm | to_entries[] | { + name: volname("secret"; .key; .value.secret), + mountPath: .value."mount-path", + readOnly: true + }), + ($cvm | to_entries[] | { + name: volname("cm"; .key; .value.configmap), + mountPath: .value."mount-path", + readOnly: true + }) + ] as $mounts | + [ + ($svm | to_entries[] | { + name: volname("secret"; .key; .value.secret), + secret: {secretName: .value.secret} + }), + ($cvm | to_entries[] | { + name: volname("cm"; .key; .value.configmap), + configMap: {name: .value.configmap} + }) + ] as $vols | + ($app.downstream // []) as $down | + (.propagation."header-name" // "x-dev-session") as $hname | + (.propagation."baggage-key" // "dev-session") as $bkey | + ((.propagation.enabled // true) | tostring) as $penabled | + ($app."propagation-role" // ( + if ($down|length)==0 then "terminal" + elif (($app.role // "")|ascii_downcase) == "frontend" then "originator" + else "forwarder" + end + )) as $role | + ( + if ($penabled == "false" or $penabled == "False") then [] + else + [ + {name: "BAGGAGE_ENABLED", value: "true"}, + {name: "BAGGAGE_ROLE", value: $role}, + {name: "BAGGAGE_HEADER_NAME", value: $hname}, + {name: "BAGGAGE_KEY", value: $bkey}, + {name: "APP_NAME", value: $a} + ] + + (if ($down|length) > 0 then + [ + {name: "DOWNSTREAM_URL", value: ("http://" + ($down[0]|tostring))}, + {name: "BFF_UPSTREAM", value: ("http://" + ($down[0]|tostring))} + ] + else [] end) + end + ) as $baggageEnv | + { + apiVersion: "apps/v1", + kind: "Deployment", + metadata: { + name: $a, + namespace: $ns, + labels: {app: $a, "app.kubernetes.io/part-of": "tekton-stack"} + }, + spec: { + replicas: 1, + selector: {matchLabels: {app: $a}}, + template: { + metadata: {labels: {app: $a}}, + spec: ({ + containers: [( + { + name: "app", + image: $img, + ports: [{containerPort: ($cport|tonumber)}], + readinessProbe: { + tcpSocket: {port: ($cport|tonumber)}, + initialDelaySeconds: 15, + periodSeconds: 10 + } + } + + (if ($baggageEnv|length) > 0 then {env: $baggageEnv} else {} end) + + (if ($envFrom|length) > 0 then {envFrom: $envFrom} else {} end) + + (if ($mounts|length) > 0 then {volumeMounts: $mounts} else {} end) + )], + } + (if ($vols|length) > 0 then {volumes: $vols} else {} end)) + } + } + } + ') + + echo "" + echo " Deploying $APP -> $NS (image: $IMAGE)" + echo "$DEPLOY_JSON" | jq -r ' + .spec.template.spec.containers[0].env // [] + | map(" " + .name + "=" + .value) + | if length>0 then " Baggage env:\n" + join("\n") else empty end + ' + kubectl create namespace "$NS" --dry-run=client -o yaml | kubectl apply -f - + echo "$DEPLOY_JSON" | kubectl apply -f - + + kubectl apply -f - </dev/null || echo " WARN: $APP not ready yet" + done + echo " Full stack deployed." +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tekton.dev/categories: Git + tekton.dev/deprecated: "true" + tekton.dev/displayName: git clone + tekton.dev/pipelines.minVersion: 0.38.0 + tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 + tekton.dev/tags: git + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:09Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: fetch-source + tekton.dev/task: git-clone + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-fetch-source + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "11623" + uid: cabd5d48-bdfa-468e-99b9-9372a25d89c0 + spec: + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: git-clone + timeout: 1h0m0s + workspaces: + - name: output + persistentVolumeClaim: + claimName: pvc-58ec7948bb + status: + artifacts: {} + completionTime: "2026-09-28T03:13:18Z" + conditions: + - lastTransitionTime: "2026-09-28T03:13:18Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-fetch-source-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: commit + type: string + value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 + - name: committer-date + type: string + value: "1790468109" + - name: url + type: string + value: https://github.com/jmjava/tekton-dag.git + startTime: "2026-09-28T03:13:10Z" + steps: + - container: step-clone + imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df + name: clone + provenance: {} + terminated: + containerID: containerd://41189653631b01ce136c423c7421a71c5a9d1d34ab07e1e5c54cc8f110181e9b + exitCode: 0 + finishedAt: "2026-09-28T03:13:18Z" + message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:13:17Z" + terminationReason: Completed + taskSpec: + description: |- + These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. + The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. + params: + - description: Repository URL to clone from. + name: url + type: string + - default: "" + description: Revision to checkout. (branch, tag, sha, ref, etc...) + name: revision + type: string + - default: "" + description: Refspec to fetch before checking out revision. + name: refspec + type: string + - default: "true" + description: Initialize and fetch git submodules. + name: submodules + type: string + - default: "1" + description: Perform a shallow clone, fetching only the most recent N commits. + name: depth + type: string + - default: "true" + description: Set the `http.sslVerify` global git config. Setting this to `false` + is not advised unless you are sure that you trust your git remote. + name: sslVerify + type: string + - default: ca-bundle.crt + description: file name of mounted crt using ssl-ca-directory workspace. default + value is ca-bundle.crt. + name: crtFileName + type: string + - default: "" + description: Subdirectory inside the `output` Workspace to clone the repo + into. + name: subdirectory + type: string + - default: "" + description: Define the directory patterns to match or exclude when performing + a sparse checkout. + name: sparseCheckoutDirectories + type: string + - default: "true" + description: Clean out the contents of the destination directory if it already + exists before cloning. + name: deleteExisting + type: string + - default: "" + description: HTTP proxy server for non-SSL requests. + name: httpProxy + type: string + - default: "" + description: HTTPS proxy server for SSL requests. + name: httpsProxy + type: string + - default: "" + description: Opt out of proxying HTTP/HTTPS requests. + name: noProxy + type: string + - default: "true" + description: Log the commands that are executed during `git-clone`'s operation. + name: verbose + type: string + - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + description: The image providing the git-init binary that this Task runs. + name: gitInitImage + type: string + - default: /home/git + description: | + Absolute path to the user's home directory. + name: userHome + type: string + results: + - description: The precise commit SHA that was fetched by this Task. + name: commit + type: string + - description: The precise URL that was fetched by this Task. + name: url + type: string + - description: The epoch timestamp of the commit that was fetched by this Task. + name: committer-date + type: string + steps: + - computeResources: {} + env: + - name: HOME + value: /home/git + - name: PARAM_URL + value: https://github.com/jmjava/tekton-dag.git + - name: PARAM_REVISION + value: main + - name: PARAM_REFSPEC + - name: PARAM_SUBMODULES + value: "true" + - name: PARAM_DEPTH + value: "1" + - name: PARAM_SSL_VERIFY + value: "true" + - name: PARAM_CRT_FILENAME + value: ca-bundle.crt + - name: PARAM_SUBDIRECTORY + - name: PARAM_DELETE_EXISTING + value: "true" + - name: PARAM_HTTP_PROXY + - name: PARAM_HTTPS_PROXY + - name: PARAM_NO_PROXY + - name: PARAM_VERBOSE + value: "true" + - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES + - name: PARAM_USER_HOME + value: /home/git + - name: WORKSPACE_OUTPUT_PATH + value: /workspace/output + - name: WORKSPACE_SSH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSH_DIRECTORY_PATH + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH + - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSL_CA_DIRECTORY_PATH + image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + name: clone + script: | + #!/usr/bin/env sh + set -eu + + if [ "${PARAM_VERBOSE}" = "true" ] ; then + set -x + fi + + if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" + chmod 400 "${PARAM_USER_HOME}/.git-credentials" + chmod 400 "${PARAM_USER_HOME}/.gitconfig" + fi + + if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then + cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh + chmod 700 "${PARAM_USER_HOME}"/.ssh + chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* + fi + + if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then + export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" + if [ "${PARAM_CRT_FILENAME}" != "" ] ; then + export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" + fi + fi + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" + # or the root of a mounted volume. + if [ -d "${CHECKOUT_DIR}" ] ; then + # Delete non-hidden files and directories + rm -rf "${CHECKOUT_DIR:?}"/* + # Delete files and directories starting with . but excluding .. + rm -rf "${CHECKOUT_DIR}"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "${CHECKOUT_DIR}"/..?* + fi + } + + if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then + cleandir || true + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" + /ko-app/git-init \ + -url="${PARAM_URL}" \ + -revision="${PARAM_REVISION}" \ + -refspec="${PARAM_REFSPEC}" \ + -path="${CHECKOUT_DIR}" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth="${PARAM_DEPTH}" \ + -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" + cd "${CHECKOUT_DIR}" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "${EXIT_CODE}" != 0 ] ; then + exit "${EXIT_CODE}" + fi + RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" + printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" + printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" + printf "%s" "${PARAM_URL}" > "/tekton/results/url" + securityContext: + runAsNonRoot: true + runAsUser: 65532 + workspaces: + - description: The git repo will be cloned onto the volume backing this Workspace. + name: output + - description: | + A .ssh directory with private key, known_hosts, config, etc. Copied to + the user's home before git commands are executed. Used to authenticate + with the git remote when performing the clone. Binding a Secret to this + Workspace is strongly recommended over other volume types. + name: ssh-directory + optional: true + - description: | + A Workspace containing a .gitconfig and .git-credentials file. These + will be copied to the user's home before any git commands are run. Any + other files in this Workspace are ignored. It is strongly recommended + to use ssh-directory over basic-auth whenever possible and to bind a + Secret to this Workspace over other volume types. + name: basic-auth + optional: true + - description: | + A workspace containing CA certificates, this will be used by Git to + verify the peer with when fetching or pushing over HTTPS. + name: ssl-ca-directory + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 + creationTimestamp: "2026-09-28T03:13:18Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-bootstrap + tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 + tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 + tekton.dev/pipelineTask: resolve-stack + tekton.dev/task: resolve-stack + tektondag.io/stackrun: stackrun-bootstrap-bhmj5 + name: stackrun-bootstrap-bhmj5-resolve-stack + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-bootstrap-bhmj5 + uid: eb808615-af94-42bf-939a-f2c547b42675 + resourceVersion: "11686" + uid: 090c3a47-e421-425c-80ba-2c394be4472c + spec: + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: version-overrides + value: '{}' + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: resolve-stack + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-58ec7948bb + status: + artifacts: {} + completionTime: "2026-09-28T03:13:24Z" + conditions: + - lastTransitionTime: "2026-09-28T03:13:24Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-bootstrap-bhmj5-resolve-stack-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: app-list + type: string + value: demo-fe release-lifecycle-demo demo-api + - name: build-apps + type: string + value: demo-fe release-lifecycle-demo demo-api + - name: entry-app + type: string + value: demo-fe + - name: intercept-header-value + type: string + value: "" + - name: propagation-chain + type: string + value: | + demo-fe release-lifecycle-demo demo-api + - name: resolved-versions + type: string + value: | + {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} + - name: run-compile-composer + type: string + value: "false" + - name: run-compile-gradle + type: string + value: "false" + - name: run-compile-maven + type: string + value: "true" + - name: run-compile-npm + type: string + value: "true" + - name: run-compile-pip + type: string + value: "false" + - name: stack-json + type: string + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + startTime: "2026-09-28T03:13:18Z" + steps: + - container: step-resolve + imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 + name: resolve + provenance: {} + terminated: + containerID: containerd://1bcf97d69257e9e85826432d8d17a5bb97132804eed50d42c3447167d4f4639d + exitCode: 0 + finishedAt: "2026-09-28T03:13:24Z" + message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe + release-lifecycle-demo demo-api","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"","type":1},{"key":"propagation-chain","value":"demo-fe + release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"true","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo + 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence + (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm + install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:13:23Z" + terminationReason: Completed + taskSpec: + description: | + Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. + params: + - description: Path to the stack YAML relative to workspace root + name: stack-file + type: string + - default: stacks/versions.yaml + description: Path to versions.yaml relative to workspace root + name: versions-file + type: string + - default: '{}' + description: | + JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. + name: version-overrides + type: string + - default: "" + description: App whose PR triggered this run (empty = build all) + name: changed-app + type: string + - default: "" + description: PR number for intercept-header generation + name: pr-number + type: string + results: + - description: Full stack graph as JSON (includes build config per app) + name: stack-json + type: string + - description: Space-separated list of apps in topological order + name: app-list + type: string + - description: Entry-point app (typically the frontend) + name: entry-app + type: string + - description: Ordered chain of apps for header propagation validation + name: propagation-chain + type: string + - description: Header value to use for Telepresence intercepts + name: intercept-header-value + type: string + - description: Space-separated list of apps to build (changed-app or all) + name: build-apps + type: string + - description: true if any build-app uses npm (so only that compile step runs) + name: run-compile-npm + type: string + - description: true if any build-app uses maven + name: run-compile-maven + type: string + - description: true if any build-app uses gradle + name: run-compile-gradle + type: string + - description: true if any build-app uses pip + name: run-compile-pip + type: string + - description: true if any build-app uses composer + name: run-compile-composer + type: string + - description: JSON map of app → version (registry defaults merged with overrides) + name: resolved-versions + type: string + steps: + - computeResources: {} + env: + - name: YQ_VERSION + value: v4.45.4 + - name: JQ_VERSION + value: jq-1.7.1 + image: alpine:3.21 + name: resolve + script: | + #!/bin/sh + set -eu + + arch=$(uname -m) + case "$arch" in + x86_64) arch=amd64 ;; + aarch64|arm64) arch=arm64 ;; + *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; + esac + install_static() { + dest="$1" + url="$2" + wget -q -O "$dest" "$url" + chmod +x "$dest" + } + # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). + if ! apk add --no-cache jq yq-go; then + echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 + install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" + install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" + fi + command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } + command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } + + STACK="stacks/stack-one.yaml" + VFILE="stacks/versions.yaml" + OVERRIDES='{}' + CHANGED="" + PR="" + + if [ ! -f "$STACK" ]; then + echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 + ls -la >&2 + ls -la stacks >&2 || true + exit 1 + fi + + STACK_JSON=$(yq -o=json "$STACK") + + # ---------------------------------------------------------- + # Build the full graph JSON (preserves build config per app) + # ---------------------------------------------------------- + echo "$STACK_JSON" | jq -c '{ + name: .name, + description: .description, + propagation: .propagation, + defaults: .defaults, + apps: [.apps[] | { + name: .name, + repo: .repo, + role: .role, + "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), + namespace: (.namespace // null), + "container-port": (."container-port" // null), + "service-port": (."service-port" // null), + "context-dir": (."context-dir" // "."), + dockerfile: (.dockerfile // "Dockerfile"), + build: (.build // {tool:"none", runtime:"custom"}), + downstream: (.downstream // []), + tests: (.tests // {}) + }] + }' > /tmp/stack.json + + cat /tmp/stack.json | tee /tekton/results/stack-json + + # ---------------------------------------------------------- + # Resolve versions: registry defaults + overrides + # ---------------------------------------------------------- + VERSIONS_JSON="{}" + if [ -f "$VFILE" ]; then + VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' + [to_entries[] | {key: .key, value: .value.version}] | from_entries + ') + fi + + # Only keep versions for apps actually in this stack + APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') + STACK_VERSIONS="{}" + for APP in $APP_NAMES; do + VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') + done + + # Merge overrides on top + if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then + echo "Applying version overrides: $OVERRIDES" + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') + fi + + echo "Resolved versions:" + echo "$STACK_VERSIONS" | jq '.' + echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions + echo "" + + # ---------------------------------------------------------- + # Topological order + # ---------------------------------------------------------- + TOPO=$(cat /tmp/stack.json | jq -r ' + def vis($n;$adj): + if (.t|index($n)) then .err=true + elif (.v|index($n)) then . + else .t+=[$n] | + reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | + .t-=[$n] | .v+=[$n] | .o+=[$n] + end; + def topo: + . as $g | + ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | + ($g.apps | map(.name)) as $all | + {v:[],t:[],o:[],err:false} | + reduce $all[] as $n (.; + if (.v|index($n)) then . else .|vis($n;$adj) end + ) | + if .err then error("cycle") else .o|reverse end; + topo | join(" ") + ') + echo -n "$TOPO" | tee /tekton/results/app-list + echo "" + + # ---------------------------------------------------------- + # Entry point (app that no other app lists as downstream) + # ---------------------------------------------------------- + ENTRY=$(cat /tmp/stack.json | jq -r ' + (.apps|map(.downstream)|flatten) as $deps | + .apps[] | select(.name as $n | ($deps|index($n))|not) | .name + ' | head -1) + echo -n "$ENTRY" | tee /tekton/results/entry-app + echo "" + + # ---------------------------------------------------------- + # Propagation chain from entry + # ---------------------------------------------------------- + cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' + def walk($name): + . as $g | + ($g.apps[]|select(.name==$name)) as $app | + if $app then [$name] + reduce ($app.downstream//[])[] as $d + ([]; . + ($g|walk($d))) + else [] end; + walk($s) | join(" ") + ' | tee /tekton/results/propagation-chain + + # ---------------------------------------------------------- + # Intercept header + # ---------------------------------------------------------- + if [ -n "$PR" ]; then + HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value + else + echo -n "" | tee /tekton/results/intercept-header-value + fi + echo "" + + # ---------------------------------------------------------- + # Build list + # ---------------------------------------------------------- + if [ -n "$CHANGED" ]; then + echo -n "$CHANGED" | tee /tekton/results/build-apps + else + echo -n "$TOPO" | tee /tekton/results/build-apps + fi + echo "" + + # ---------------------------------------------------------- + # Which compile steps to run (only tools used by build-apps) + # ---------------------------------------------------------- + BUILD_APPS=$(cat /tekton/results/build-apps) + RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" + for app in $BUILD_APPS; do + tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) RUN_NPM="true" ;; + maven) RUN_MAVEN="true" ;; + gradle) RUN_GRADLE="true" ;; + pip) RUN_PIP="true" ;; + composer) RUN_COMPOSER="true" ;; + esac + done + echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm + echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven + echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle + echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip + echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer + echo "" + securityContext: + runAsUser: 0 + workingDir: /workspace/source + workspaces: + - name: source +kind: List +metadata: + resourceVersion: "" diff --git a/artifacts/intercept-e2e/run-2-pipeline-results.json b/artifacts/intercept-e2e/run-2-pipeline-results.json new file mode 100644 index 0000000..a07e2ee --- /dev/null +++ b/artifacts/intercept-e2e/run-2-pipeline-results.json @@ -0,0 +1,20 @@ +{ + "name": "stackrun-pr-27exw", + "condition": { + "lastTransitionTime": "2026-09-28T03:18:21Z", + "message": "Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8", + "reason": "Completed", + "status": "True", + "type": "Succeeded" + }, + "results": [ + { + "name": "test-summary", + "value": "{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": \"pass\",\n \"demo-api\": \"pass\"\n}\n" + }, + { + "name": "original-traffic-summary", + "value": "{\n \"demo-fe\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": \"pass\",\n \"overall\": \"pass\"\n}\n" + } + ] +} diff --git a/artifacts/intercept-e2e/run-2-pipelinerun.yaml b/artifacts/intercept-e2e/run-2-pipelinerun.yaml new file mode 100644 index 0000000..58a5f6c --- /dev/null +++ b/artifacts/intercept-e2e/run-2-pipelinerun.yaml @@ -0,0 +1,830 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:30Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/pipeline: stack-pr-test + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw + namespace: tekton-pipelines + resourceVersion: "13751" + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b +spec: + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: git-revision + value: main + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: app-revisions + value: '{}' + - name: image-registry + value: localhost:5000 + - name: cache-repo + value: "" + - name: intercept-backend + value: mirrord + - name: dashboard-url + value: "" + - name: pr-repo-url + value: "" + - name: max-retries + value: "2" + pipelineRef: + name: stack-pr-test + taskRunTemplate: + serviceAccountName: tekton-pr-sa + timeouts: + pipeline: 2h0m0s + workspaces: + - name: shared-workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + status: {} + - name: ssh-key + secret: + secretName: ssh-key-secret + - name: build-cache + persistentVolumeClaim: + claimName: build-cache +status: + childReferences: + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-fetch-source + pipelineTaskName: fetch-source + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-resolve-stack + pipelineTaskName: resolve-stack + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-clone-app-repos + pipelineTaskName: clone-app-repos + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-pr-snapshot-tag + pipelineTaskName: pr-snapshot-tag + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-select-tool-apps + pipelineTaskName: build-select-tool-apps + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-compile-npm + pipelineTaskName: build-compile-npm + whenExpressions: + - input: "true" + operator: in + values: + - "true" + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-build-containerize + pipelineTaskName: build-containerize + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-deploy-intercepts-mirrord + pipelineTaskName: deploy-intercepts-mirrord + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-deploy-intercepts-result + pipelineTaskName: deploy-intercepts-result + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-validate-propagation + pipelineTaskName: validate-propagation + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-validate-original-traffic + pipelineTaskName: validate-original-traffic + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-query-test-plan + pipelineTaskName: query-test-plan + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-run-tests + pipelineTaskName: run-tests + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-cleanup + pipelineTaskName: cleanup + - apiVersion: tekton.dev/v1 + kind: TaskRun + name: stackrun-pr-27exw-post-pr-comment + pipelineTaskName: post-pr-comment + completionTime: "2026-09-28T03:18:21Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:21Z" + message: 'Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8' + reason: Completed + status: "True" + type: Succeeded + finallyStartTime: "2026-09-28T03:18:14Z" + pipelineSpec: + description: | + PR testing pipeline. Uses the currently running apps in the cluster and only builds/replaces the one app being tested (changed-app). Other apps are left as-is; mirrord intercepts route PR traffic only to the new build. Tests one app at a time (changed-app is required when invoking this pipeline). 1. Clones platform repo and resolves the stack graph 2. Clones and builds ONLY the changed app (snapshot tag) — no build of other apps 3. Deploys intercepts only for that app; rest of stack keeps running as-is 4. Validates header propagation, runs test suites 5. Posts a PR comment; does **not** bump `versions.yaml` (snapshot image tags only) 6. Cleans up PR pods (always) PR builds use snapshot tagging so they are never confused with real releases. + finally: + - name: hook-post-test + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: cleanup + params: + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: intercept-backend + value: mirrord + taskRef: + kind: Task + name: cleanup-stack-pods + - name: post-pr-comment + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: pr-repo-url + value: "" + - name: pr-number + value: "903" + - name: pipeline-run-name + value: stackrun-pr-27exw + - name: namespace + value: tekton-pipelines + - name: status + value: Completed + - name: test-summary + value: $(tasks.run-tests.results.test-summary) + - name: dashboard-url + value: "" + - name: github-secret-name + value: github-token + taskRef: + kind: Task + name: post-pr-comment + params: + - description: Platform repo URL (e.g. tekton-dag) — has stacks/, versions; app + repos are cloned separately from stack + name: git-url + type: string + - description: Branch, tag, or SHA for platform repo and (unless overridden) app + repos + name: git-revision + type: string + - default: stacks/stack-one.yaml + description: Path to the stack YAML relative to repo root + name: stack-file + type: string + - default: "" + description: App being tested (required). Only this app is built and given an + intercept; other apps use existing cluster deployments. + name: changed-app + type: string + - description: PR number + name: pr-number + type: string + - default: '{}' + description: Optional JSON map app → revision for cloning app repos (e.g. {"demo-fe":"pr-branch"}). + Used when the PR is in the app repo so the changed app is checked out at its + PR branch. + name: app-revisions + type: string + - description: Container registry base (e.g. 123456.dkr.ecr.us-east-1.amazonaws.com) + name: image-registry + type: string + - default: '{}' + description: JSON map of app → version overrides (empty = use versions.yaml) + name: version-overrides + type: string + - default: ubuntu:22.04 + description: Pre-built image for npm compile + name: compile-image-npm + type: string + - default: ubuntu:22.04 + description: Pre-built image for Maven compile + name: compile-image-maven + type: string + - default: ubuntu:22.04 + description: Pre-built image for Gradle compile + name: compile-image-gradle + type: string + - default: ubuntu:22.04 + description: Pre-built image for pip compile + name: compile-image-pip + type: string + - default: ubuntu:22.04 + description: Pre-built image for Composer/PHP compile + name: compile-image-php + type: string + - default: localhost:5000/tekton-dag-build-mirrord:latest + description: Pre-built image for mirrord proxy pods (M7) + name: compile-image-mirrord + type: string + - default: mirrord + description: Intercept backend. Only mirrord is implemented; the param is kept + for API compatibility. + name: intercept-backend + type: string + - default: "" + description: Base URL of Tekton Dashboard; PR comment will include link to this + run (optional) + name: dashboard-url + type: string + - default: github-token + description: 'Kubernetes secret name for GitHub token (key: token) when posting + PR comments' + name: github-secret-name + type: string + - default: "" + description: When PR is in the app repo, pass the app repo URL here so the PR + comment is posted to the correct repo; empty = use git-url (platform repo) + name: pr-repo-url + type: string + - default: "" + description: Kaniko cache repo. Empty disables cache. + name: cache-repo + type: string + - default: "0" + description: Max concurrent Kaniko pods for containerize. 0 = unlimited. + name: max-parallel-builds + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after clone, before compile (e.g. + code-gen, license-scan). + name: pre-build-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after containerize, before deploy + (e.g. image-scan, SBOM). + name: post-build-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run after deploy, before tests (e.g. + seed-data). + name: pre-test-task + type: string + - default: tekton-dag-hook-noop + description: Optional Tekton Task name to run in finally block after tests (e.g. + slack-notify). + name: post-test-task + type: string + - default: "2" + description: | + Preferred retry count for infrastructure-sensitive tasks (compile/containerize). Pipeline tasks use a fixed retries: 2 for those steps; test tasks stay at 0. Orchestrator sets this param from MAX_RETRIES / request body for auditability. + name: max-retries + type: string + results: + - description: "" + name: test-summary + value: $(tasks.run-tests.results.test-summary) + - description: "" + name: original-traffic-summary + value: $(tasks.validate-original-traffic.results.original-traffic-summary) + tasks: + - name: fetch-source + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + taskRef: + kind: Task + name: git-clone + workspaces: + - name: output + workspace: shared-workspace + - name: resolve-stack + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: version-overrides + value: '{}' + runAfter: + - fetch-source + taskRef: + kind: Task + name: resolve-stack + workspaces: + - name: source + workspace: shared-workspace + - name: clone-app-repos + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: git-revision + value: main + - name: app-revisions + value: '{}' + runAfter: + - resolve-stack + taskRef: + kind: Task + name: clone-app-repos + workspaces: + - name: source + workspace: shared-workspace + - name: ssh-key + workspace: ssh-key + - name: pr-snapshot-tag + params: + - name: snapshot-tag + value: stackrun-pr-27exw + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + runAfter: + - resolve-stack + taskRef: + kind: Task + name: pr-snapshot-tag + - name: build-select-tool-apps + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + runAfter: + - clone-app-repos + - pr-snapshot-tag + taskRef: + kind: Task + name: build-select-tool-apps + workspaces: + - name: source + workspace: shared-workspace + - name: hook-pre-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + runAfter: + - build-select-tool-apps + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: build-compile-npm + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-npm + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-npm + when: + - input: $(tasks.resolve-stack.results.run-compile-npm) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-maven + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-maven + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-maven + when: + - input: $(tasks.resolve-stack.results.run-compile-maven) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-gradle + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-gradle + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-gradle + when: + - input: $(tasks.resolve-stack.results.run-compile-gradle) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-pip + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-pip + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-pip + when: + - input: $(tasks.resolve-stack.results.run-compile-pip) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-compile-composer + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: compile-image-php + value: ubuntu:22.04 + retries: 2 + runAfter: + - build-select-tool-apps + taskRef: + kind: Task + name: build-compile-composer + when: + - input: $(tasks.resolve-stack.results.run-compile-composer) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: shared-workspace + - name: build-cache + workspace: build-cache + - name: build-containerize + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + - name: image-tag + value: $(tasks.pr-snapshot-tag.results.snapshot-versions) + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + retries: 2 + runAfter: + - build-compile-npm + - build-compile-maven + - build-compile-gradle + - build-compile-pip + - build-compile-composer + taskRef: + kind: Task + name: build-containerize + workspaces: + - name: source + workspace: shared-workspace + - name: hook-post-build + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: image-registry + value: localhost:5000 + runAfter: + - build-containerize + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: deploy-intercepts-mirrord + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: built-images + value: $(tasks.build-containerize.results.built-images) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: mirrord-image + value: localhost:5000/tekton-dag-build-mirrord:latest + runAfter: + - build-containerize + taskRef: + kind: Task + name: deploy-intercept-mirrord + workspaces: + - name: shared-workspace + workspace: shared-workspace + - name: deploy-intercepts-result + runAfter: + - deploy-intercepts-mirrord + taskRef: + kind: Task + name: deploy-intercepts-result + workspaces: + - name: shared-workspace + workspace: shared-workspace + - name: validate-propagation + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: deployed-pods + value: $(tasks.deploy-intercepts-result.results.deployed-pods) + runAfter: + - deploy-intercepts-result + taskRef: + kind: Task + name: validate-stack-propagation + - name: validate-original-traffic + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: entry-app + value: $(tasks.resolve-stack.results.entry-app) + runAfter: + - deploy-intercepts-result + taskRef: + kind: Task + name: validate-original-traffic + - name: hook-pre-test + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: image-registry + value: localhost:5000 + runAfter: + - validate-propagation + - validate-original-traffic + taskRef: + params: + - name: kind + value: task + - name: namespace + value: tekton-pipelines + - name: name + value: tekton-dag-hook-noop + resolver: cluster + when: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + workspaces: + - name: source + workspace: shared-workspace + - name: query-test-plan + params: + - name: changed-app + value: demo-fe + runAfter: + - hook-pre-test + taskRef: + kind: Task + name: query-test-plan + - name: run-tests + params: + - name: stack-json + value: $(tasks.resolve-stack.results.stack-json) + - name: app-list + value: $(tasks.resolve-stack.results.app-list) + - name: entry-app + value: $(tasks.resolve-stack.results.entry-app) + - name: propagation-chain + value: $(tasks.resolve-stack.results.propagation-chain) + - name: build-apps + value: $(tasks.resolve-stack.results.build-apps) + - name: intercept-header-value + value: $(tasks.resolve-stack.results.intercept-header-value) + - name: tests-to-run + value: $(tasks.query-test-plan.results.tests-to-run) + - name: unmapped-area + value: $(tasks.query-test-plan.results.unmapped-area) + - name: apps-to-test + value: $(tasks.query-test-plan.results.apps-to-test) + runAfter: + - query-test-plan + taskRef: + kind: Task + name: run-stack-tests + workspaces: + - name: test-source + workspace: shared-workspace + workspaces: + - description: Shared PVC for source code and test data + name: shared-workspace + - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; + required for SSH pull + name: ssh-key + - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse + across runs. + name: build-cache + optional: true + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: test-summary + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: original-traffic-summary + value: | + { + "demo-fe": { + "health-check": "pass", + "http-code": "200" + }, + "release-lifecycle-demo": { + "health-check": "pass", + "http-code": "200" + }, + "demo-api": { + "health-check": "pass", + "http-code": "200" + }, + "e2e-no-header-passthrough": { + "status": "pass", + "http-code": "200" + }, + "artillery-no-header-burst": "pass", + "overall": "pass" + } + skippedTasks: + - name: hook-pre-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: build-compile-maven + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-gradle + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-pip + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: build-compile-composer + reason: When Expressions evaluated to false + whenExpressions: + - input: "false" + operator: in + values: + - "true" + - name: hook-post-build + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: hook-pre-test + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + - name: hook-post-test + reason: When Expressions evaluated to false + whenExpressions: + - input: tekton-dag-hook-noop + operator: notin + values: + - tekton-dag-hook-noop + startTime: "2026-09-28T03:14:30Z" diff --git a/artifacts/intercept-e2e/run-2-pod-logs.txt b/artifacts/intercept-e2e/run-2-pod-logs.txt new file mode 100644 index 0000000..2b7b004 --- /dev/null +++ b/artifacts/intercept-e2e/run-2-pod-logs.txt @@ -0,0 +1,540 @@ +[pod/stackrun-pr-27exw-build-containerize-pod/place-scripts] 2026/09/28 03:15:32 Decoded script /tekton/scripts/script-0-njrdt +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/prepare] 2026/09/28 03:15:50 Entrypoint initialization +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Milestone 5: Original Traffic Validation +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] (intercepts are ACTIVE — these requests carry NO header) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Intercepted apps: demo-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Full chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry point: demo-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Expectation: every request WITHOUT the intercept header +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] reaches the ORIGINAL deployment, not the PR pod. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 1: Direct health check per service (no headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-fe: [INTERCEPTED — should still serve original on bare requests] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-fe.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] release-lifecycle-demo: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://release-lifecycle-demo.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-api: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-api.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 2: Full-chain passthrough (no intercept headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry URL: http://demo-fe.staging.svc.cluster.local:80/ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: (no x-dev-session, no baggage) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] This request should flow through ALL original deployments. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Even intercepted apps should respond from their original pods +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] because no header matches the Telepresence intercept rule. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Response: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] tekton-dag-vue-fe +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate]
+[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — full chain responding without headers +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 3: Artillery load burst (no intercept headers) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Short burst against entry point — no headers. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Confirms sustained original-traffic handling during intercept. +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Test run id: tmxfc_9p9rm93yn875ngqdk84ekm5mdxf9g_jrkn +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase started: Burst without intercept headers (index: 0, duration: 10s) 03:17:21(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase completed: Burst without intercept headers (index: 0, duration: 10s) 03:17:31(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:30(+0000) (width: 7.202s) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 15240 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 5/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 40 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 2.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:40(+0000) (width: 1.204s) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 3810 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 10 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 3.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3.1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 3.9 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] All VUs finished. Total time: 10 seconds +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Summary report @ 03:17:32(+0000) +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 19050 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 50 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.5 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Artillery burst: PASS +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Original Traffic Validation Summary +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] +[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASSED: Original traffic unaffected by active intercepts. +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] Wrote deployed-pods to result: { +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] "demo-fe": "pr-demo-fe-1790565353" +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] } +[pod/stackrun-pr-27exw-post-pr-comment-pod/step-post-comment] No GITHUB_TOKEN secret; skipping PR comment. +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (1/2) Installing oniguruma (6.9.9-r0) +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (2/2) Installing jq (1.7.1-r0) +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Executing busybox-1.36.1-r20.trigger +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] OK: 9 MiB in 17 packages +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] {"demo-fe":"stackrun-pr-27exw"} +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Snapshot tag map: {"demo-fe":"stackrun-pr-27exw"} +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup: removing PR pods +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Deleting pod/pr-demo-fe-1790565353 in staging +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "pr-demo-fe-1790565353" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning orphaned pr-test pods... +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-proxy-demo-fe-1790565353" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning mirrord agent and proxy pods... +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-agent-iqefckhppq-9cpf8" deleted from staging namespace +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] No resources found +[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup complete. +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/place-scripts] 2026/09/28 03:16:42 Decoded script /tekton/scripts/script-0-n9wmm +[pod/stackrun-pr-27exw-query-test-plan-pod/prepare] 2026/09/28 03:17:33 Entrypoint initialization +[pod/stackrun-pr-27exw-resolve-stack-pod/place-scripts] 2026/09/28 03:14:44 Decoded script /tekton/scripts/script-0-89bp6 +[pod/stackrun-pr-27exw-validate-original-traffic-pod/place-scripts] 2026/09/28 03:16:47 Decoded script /tekton/scripts/script-0-crgzs +[pod/stackrun-pr-27exw-validate-propagation-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization +[pod/stackrun-pr-27exw-build-compile-npm-pod/place-scripts] 2026/09/28 03:15:06 Decoded script /tekton/scripts/script-0-8kkrq +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord Intercept Deployment +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Build apps: demo-fe +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept header: x-dev-session:pr-903 +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Namespace: staging +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying intercept: demo-fe +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying PR pod: pr-demo-fe-1790565353 in staging +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Baggage: role=originator header=x-dev-session +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 condition met +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] PR pod ready: pr-demo-fe-1790565353 (IP: 10.244.0.128) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord header_filter: (?i)^x-dev-session: pr-903$ +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] configmap/mirrord-config-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying mirrord proxy: mirrord-proxy-demo-fe-1790565353 +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/mirrord-proxy-demo-fe-1790565353 created +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Proxy mirrord-proxy-demo-fe-1790565353 connected to agent mirrord-agent-iqefckhppq-9cpf8; both Running 40s, 0 restarts (routing is proven in validate-propagation) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept active for demo-fe (traffic with header -> PR pod pr-demo-fe-1790565353) +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] { +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] "demo-fe": "pr-demo-fe-1790565353" +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] } +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-lw67t +[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
+[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" +[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } +[pod/stackrun-pr-27exw-cleanup-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Done: demo-fe +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: +[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' true '=' true ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cleandir +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.6958718,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.7070696,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cd /workspace/output/ +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git rev-parse HEAD +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + EXIT_CODE=0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 1790468109 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 +[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git +[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/place-scripts] 2026/09/28 03:15:51 Decoded script /tekton/scripts/script-0-z777r +[pod/stackrun-pr-27exw-post-pr-comment-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization +[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization +[pod/stackrun-pr-27exw-query-test-plan-pod/place-scripts] 2026/09/28 03:17:34 Decoded script /tekton/scripts/script-0-c2df2 +[pod/stackrun-pr-27exw-resolve-stack-pod/prepare] 2026/09/28 03:14:43 Entrypoint initialization +[pod/stackrun-pr-27exw-build-compile-npm-pod/prepare] 2026/09/28 03:15:05 Entrypoint initialization +[pod/stackrun-pr-27exw-clone-app-repos-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-5g7lz +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Resolved versions: +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] { +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] } +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] x-dev-session:pr-903 +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe +[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] truefalsefalsefalsefalse +[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl +[pod/stackrun-pr-27exw-fetch-source-pod/place-scripts] 2026/09/28 03:14:39 Decoded script /tekton/scripts/script-0-v9bbr +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] Querying test plan: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=demo-fe&radius=1 +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] {"error":"orchestrator unreachable"} +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] +[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] WARN: test-plan query failed; will run all tests +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 776ms +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] run `npm fund` for details +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix --force +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > vite build +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] transforming... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] rendering chunks... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] computing gzip size... +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ built in 449ms +[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Compile (npm) done. +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:14:59 Decoded script /tekton/scripts/script-0-pfvfz +[pod/stackrun-pr-27exw-cleanup-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-c5pss +[pod/stackrun-pr-27exw-post-pr-comment-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-h6gz2 +[pod/stackrun-pr-27exw-validate-propagation-pod/place-scripts] 2026/09/28 03:16:46 Decoded script /tekton/scripts/script-0-vmphb +[pod/stackrun-pr-27exw-build-containerize-pod/prepare] 2026/09/28 03:15:31 Entrypoint initialization +[pod/stackrun-pr-27exw-build-select-tool-apps-pod/prepare] 2026/09/28 03:14:58 Entrypoint initialization +[pod/stackrun-pr-27exw-clone-app-repos-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization +[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/prepare] 2026/09/28 03:16:41 Entrypoint initialization +[pod/stackrun-pr-27exw-fetch-source-pod/prepare] 2026/09/28 03:14:38 Entrypoint initialization +[pod/stackrun-pr-27exw-validate-original-traffic-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Stack Propagation Validation +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Chain: demo-fe release-lifecycle-demo demo-api +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Header: x-dev-session = pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Baggage key: dev-session +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop count: 3 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Intercepted: demo-fe +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Deepest intercept: position 1 of 3 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation contract: +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 1. demo-fe (originator) ** PR BUILD ** → SETS header, sends to next hop +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 2. release-lifecycle-demo (forwarder) → NORMAL call (no intercept downstream, header not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 3. demo-api (terminal) → NORMAL call (no intercept downstream, header not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Sending test request to originator: http://demo-fe.staging.svc.cluster.local:80/propagation +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Headers: x-dev-session=pr-903, baggage=dev-session=pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Response: +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "app": "demo-fe", +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "session": "pr-903", +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "hops": [ +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "error": "HTTP Error 404: " +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop-by-hop verification (fail-closed): +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 1 demo-fe (originator) [INTERCEPTED]: PASS — REACHED session=pr-903 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 2 release-lifecycle-demo (forwarder): OK (beyond intercept — original override not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 3 demo-api (terminal): OK (beyond intercept — original override not required) +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: original override 'pr-903' transferred hop-to-hop +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Routing proof (fail-closed): PR pod must serve matched traffic only +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe -> pr-demo-fe-1790565353: matched request HTTP 200, unmatched request HTTP 200 +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe: PASS — PR pod pr-demo-fe-1790565353 served the matched request and not the unmatched one +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: intercept routing proven from PR pod access logs +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] +[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation validation complete. +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Apps: demo-fe +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] PVC: pvc-c91a6da3ac +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cache: disabled +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Max parallel: 0 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Containerize: demo-fe +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565334 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:stackrun-pr-27exw +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:stackrun-pr-27exw +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565334 created +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] --- Waiting for final batch --- +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565334 +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565334: Succeeded +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565334" deleted from tekton-pipelines namespace +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Built images: +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" +[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } diff --git a/artifacts/intercept-e2e/run-2-stackrun.yaml b/artifacts/intercept-e2e/run-2-stackrun.yaml new file mode 100644 index 0000000..3bfe20f --- /dev/null +++ b/artifacts/intercept-e2e/run-2-stackrun.yaml @@ -0,0 +1,37 @@ +apiVersion: tektondag.io/v1alpha1 +kind: StackRun +metadata: + creationTimestamp: "2026-09-28T03:14:30Z" + generation: 1 + labels: + app.kubernetes.io/part-of: tekton-job-standardization + tektondag.io/mode: pr + name: stackrun-pr-27exw + namespace: tekton-pipelines + resourceVersion: "13752" + uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 +spec: + appRevisions: '{}' + cacheRepo: "" + changedApp: demo-fe + gitRevision: main + gitUrl: https://github.com/jmjava/tekton-dag.git + imageRegistry: localhost:5000 + interceptBackend: mirrord + maxRetries: 2 + mode: pr + prNumber: 903 + stackFile: stacks/stack-one.yaml + stackRef: stack-one + timeout: 2h +status: + conditions: + - lastTransitionTime: "2026-09-28T03:14:30Z" + message: PipelineRun stackrun-pr-27exw phase=Completed + observedGeneration: 1 + reason: Completed + status: "False" + type: Ready + observedGeneration: 1 + phase: Completed + pipelineRunName: stackrun-pr-27exw diff --git a/artifacts/intercept-e2e/run-2-taskruns.yaml b/artifacts/intercept-e2e/run-2-taskruns.yaml new file mode 100644 index 0000000..f61902f --- /dev/null +++ b/artifacts/intercept-e2e/run-2-taskruns.yaml @@ -0,0 +1,3712 @@ +apiVersion: v1 +items: +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:04Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-compile-npm + tekton.dev/task: build-compile-npm + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-compile-npm + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12743" + uid: fdda3572-535a-4387-8b26-7248c7df0428 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: compile-image-npm + value: ubuntu:22.04 + retries: 2 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-compile-npm + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + - name: build-cache + persistentVolumeClaim: + claimName: build-cache + status: + artifacts: {} + completionTime: "2026-09-28T03:15:31Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:31Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-compile-npm-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:15:04Z" + steps: + - container: step-compile-npm + imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 + name: compile-npm + provenance: {} + terminated: + containerID: containerd://43ce915d1a0a09e87dcad9297d5ee92597300ec9fd1f6b19481e001c679eb5df + exitCode: 0 + finishedAt: "2026-09-28T03:15:30Z" + reason: Completed + startedAt: "2026-09-28T03:15:10Z" + terminationReason: Completed + taskSpec: + description: Runs npm compile for apps in .tool-apps.json (invoked only when + build-apps include npm). + params: + - name: stack-json + type: string + - default: ubuntu:22.04 + name: compile-image-npm + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: COMPILE_IMAGE + value: ubuntu:22.04 + image: ubuntu:22.04 + name: compile-npm + script: | + #!/usr/bin/env bash + set -e + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi + [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" + APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) + [ -z "$APPS" ] && echo "No npm apps" && exit 0 + if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 + fi + for APP in $APPS; do + echo "=== Compile (npm): $APP ===" + CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') + PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') + POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') + CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') + APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" + [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done + cd "$APP_DIR" + [ -n "$PRE_CMD" ] && eval "$PRE_CMD" + if [ -n "$CMD" ]; then + RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') + eval "$RUN_CMD" + else + [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present + fi + [ -n "$POST_CMD" ] && eval "$POST_CMD" + done + echo "Compile (npm) done." + workingDir: /workspace/source + workspaces: + - name: source + - name: build-cache + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:31Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-containerize + tekton.dev/task: build-containerize + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-containerize + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12863" + uid: 23bcfc3f-1b78-4504-bb52-697f12eee6cc + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: image-registry + value: localhost:5000 + - name: image-tag + value: '{"demo-fe":"stackrun-pr-27exw"}' + - name: tag-prefix + value: "" + - name: cache-repo + value: "" + - name: max-parallel-builds + value: "0" + retries: 2 + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-containerize + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:15:50Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:50Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-containerize-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: built-images + type: string + value: | + { + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + startTime: "2026-09-28T03:15:31Z" + steps: + - container: step-containerize + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: containerize + provenance: {} + terminated: + containerID: containerd://aade96dbc2d6995b603ef23548575566ef8e30f4bc14971b2e0a370689799f08 + exitCode: 0 + finishedAt: "2026-09-28T03:15:49Z" + message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:stackrun-pr-27exw\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:15:34Z" + terminationReason: Completed + taskSpec: + description: | + Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. + params: + - name: stack-json + type: string + - name: build-apps + type: string + - name: image-registry + type: string + - name: image-tag + type: string + - default: pr- + name: tag-prefix + type: string + - default: "" + description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables + cache. + name: cache-repo + type: string + - default: "0" + description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). + name: max-parallel-builds + type: string + results: + - description: JSON map of app-name → full image URI + name: built-images + type: string + steps: + - computeResources: {} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: bitnami/kubectl:latest + name: containerize + script: | + #!/bin/bash + set -e + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + REGISTRY="localhost:5000" + IMAGE_TAG='{"demo-fe":"stackrun-pr-27exw"}' + TAG_PREFIX="" + CACHE_REPO="" + MAX_PARALLEL="0" + SOURCE_PVC="pvc-c91a6da3ac" + SOURCE_PATH="/workspace/source" + NS="$POD_NAMESPACE" + + PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') + PUSH_CACHE="" + if [ -n "$CACHE_REPO" ]; then + PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') + fi + + if [ -z "$SOURCE_PVC" ]; then + echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 + exit 1 + fi + + IS_JSON=false + case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac + + TS=$(date +%s) + + echo "=============================================" + echo " Parallel Containerize (Kaniko pods)" + echo "=============================================" + echo " Apps: $BUILD_APPS" + echo " PVC: $SOURCE_PVC" + echo " Cache: ${CACHE_REPO:-disabled}" + echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" + echo "" + + > /tmp/pod-list.txt + > /tmp/app-images.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + + wait_for_batch() { + local BATCH_FAILED="" + while IFS= read -r P; do + [ -z "$P" ] && continue + echo " Waiting: $P" >&2 + while true; do + PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") + case "$PH" in + Succeeded) echo " $P: Succeeded" >&2; break ;; + Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; + *) sleep 5 ;; + esac + done + done < /tmp/batch-pods.txt + > /tmp/batch-pods.txt + BATCH_COUNT=0 + echo "$BATCH_FAILED" + } + + FAILED="" + + for APP in $BUILD_APPS; do + echo "=========================================" + echo " Containerize: $APP" + echo "=========================================" + + if $IS_JSON; then + APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) + [ -z "$APP_VER" ] && APP_VER="latest" + TAG="${TAG_PREFIX}${APP_VER}" + else + TAG="${TAG_PREFIX}${IMAGE_TAG}" + fi + + CONTEXT_PATH="${SOURCE_PATH}/${APP}" + FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" + PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" + PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" + + if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then + echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + continue + fi + + KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" + if [ -n "$PUSH_CACHE" ]; then + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" + else + KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" + fi + KANIKO_ARGS="${KANIKO_ARGS}]" + + POD_NAME="kaniko-${APP}-${TS}" + echo " Launching: $POD_NAME" + echo " Push to: $PUSH_IMAGE" + echo " Pull as: $PULL_IMAGE" + + cat <> /tmp/pod-list.txt + echo "$POD_NAME" >> /tmp/batch-pods.txt + echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt + BATCH_COUNT=$((BATCH_COUNT + 1)) + echo "" + + if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then + echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + done + + if [ -s /tmp/batch-pods.txt ]; then + echo " --- Waiting for final batch ---" + BATCH_RESULT=$(wait_for_batch) + [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" + fi + + echo "" + echo " Cleaning up Kaniko pods..." + while IFS= read -r POD_NAME; do + [ -z "$POD_NAME" ] && continue + kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & + done < /tmp/pod-list.txt + wait + + if [ -n "$FAILED" ]; then + echo "FAILED: Kaniko pods failed:$FAILED" >&2 + for P in $FAILED; do + echo "--- Logs for $P ---" + kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true + done + exit 1 + fi + + > /tmp/parts.txt + while IFS='=' read -r APP IMG; do + [ -z "$APP" ] && continue + echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt + done < /tmp/app-images.txt + + TOTAL=$(wc -l < /tmp/parts.txt) + COUNT=0 + echo '{' > /tmp/built.json + while IFS= read -r line; do + COUNT=$((COUNT + 1)) + if [ "$COUNT" -lt "$TOTAL" ]; then + echo "${line}," >> /tmp/built.json + else + echo "${line}" >> /tmp/built.json + fi + done < /tmp/parts.txt + echo '}' >> /tmp/built.json + + echo "" + echo " Built images:" + cat /tmp/built.json + cat /tmp/built.json | tee /tekton/results/built-images + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:57Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: build-select-tool-apps + tekton.dev/task: build-select-tool-apps + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-build-select-tool-apps + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12598" + uid: 7fd8c6db-96f9-422b-886c-0619452f5c67 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: build-select-tool-apps + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:15:03Z" + conditions: + - lastTransitionTime: "2026-09-28T03:15:03Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-build-select-tool-apps-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:14:57Z" + steps: + - container: step-select-tool-apps + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: select-tool-apps + provenance: {} + terminated: + containerID: containerd://e9ec0062367c667f256c7db155c97349e621a9c9909ce13cf4d98312986afd29 + exitCode: 0 + finishedAt: "2026-09-28T03:15:02Z" + reason: Completed + startedAt: "2026-09-28T03:15:02Z" + terminationReason: Completed + taskSpec: + description: Writes .tool-apps.json from stack-json and build-apps; used by + conditional compile tasks. + params: + - name: stack-json + type: string + - name: build-apps + type: string + steps: + - computeResources: {} + env: + - name: STACK_JSON + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: BUILD_APPS + value: demo-fe + image: alpine:3.19 + name: select-tool-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" + for app in $BUILD_APPS; do + tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) NPM_APPS="$NPM_APPS $app" ;; + maven) MAVEN_APPS="$MAVEN_APPS $app" ;; + gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; + pip) PIP_APPS="$PIP_APPS $app" ;; + composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; + esac + done + jq -n \ + --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ + '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json + echo "Tool app lists written to .tool-apps.json" + workingDir: /workspace/source + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:18:13Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: finally + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: cleanup + tekton.dev/task: cleanup-stack-pods + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-cleanup + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13749" + uid: 01a6f20e-b5cb-4b58-a591-e4b2cfc4c69f + spec: + params: + - name: deployed-pods + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: intercept-backend + value: mirrord + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: cleanup-stack-pods + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:18:21Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:21Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-cleanup-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:18:13Z" + steps: + - container: step-cleanup + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: cleanup + provenance: {} + terminated: + containerID: containerd://ff60c3d658ef971f654359bc451a08191c9eed7c2eea50b35543cf4d37006564 + exitCode: 0 + finishedAt: "2026-09-28T03:18:20Z" + reason: Completed + startedAt: "2026-09-28T03:18:17Z" + terminationReason: Completed + taskSpec: + description: | + Cleans up all PR pods deployed for a stack pipeline run. Runs as a finally task so cleanup happens even on failure. + params: + - default: '{}' + description: JSON map of app → pod name (from deploy-stack-intercepts) + name: deployed-pods + type: string + - default: staging + name: default-namespace + type: string + - default: '{}' + name: stack-json + type: string + - default: telepresence + description: When mirrord, also delete mirrord agent and proxy pods + name: intercept-backend + type: string + steps: + - computeResources: {} + image: bitnami/kubectl:latest + name: cleanup + script: | + #!/bin/bash + set -e + + PODS='{ + "demo-fe": "pr-demo-fe-1790565353" + } + ' + DEFAULT_NS="staging" + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + INTERCEPT_BACKEND="mirrord" + + echo "=========================================" + echo " Cleanup: removing PR pods" + echo "=========================================" + + if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then + echo " No pods to clean up." + exit 0 + fi + + for APP in $(echo "$PODS" | jq -r 'keys[]'); do + POD=$(echo "$PODS" | jq -r --arg a "$APP" '.[$a]') + + NS="$DEFAULT_NS" + if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") + fi + + echo " Deleting pod/$POD in $NS" + kubectl delete pod "$POD" -n "$NS" --ignore-not-found=true + done + + # Also clean up any leftover pods from this pipeline + echo " Cleaning orphaned pr-test pods..." + kubectl delete pods -l managed-by=tekton-job-standardization \ + -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + + # When mirrord was used: remove mirrord agent and proxy pods in same namespace(s) + if [ "$INTERCEPT_BACKEND" = "mirrord" ]; then + echo " Cleaning mirrord agent and proxy pods..." + for APP in $(echo "$PODS" | jq -r 'keys[]'); do + NS="$DEFAULT_NS" + if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") + fi + kubectl delete pods -l app=mirrord -n "$NS" --ignore-not-found=true 2>/dev/null || true + kubectl delete pods -l app=mirrord-proxy -n "$NS" --ignore-not-found=true 2>/dev/null || true + done + # Fallback: delete in default namespace if no apps in PODS + if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then + kubectl delete pods -l app=mirrord -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + kubectl delete pods -l app=mirrord-proxy -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true + fi + fi + + echo " Cleanup complete." +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: clone-app-repos + tekton.dev/task: clone-app-repos + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-clone-app-repos + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12529" + uid: 81533211-9697-469e-b476-bcea52ae3080 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: git-revision + value: main + - name: app-revisions + value: '{}' + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: clone-app-repos + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + - name: ssh-key + secret: + secretName: ssh-key-secret + status: + artifacts: {} + completionTime: "2026-09-28T03:14:56Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:56Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-clone-app-repos-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:14:50Z" + steps: + - container: step-clone-apps + imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f + name: clone-apps + provenance: {} + terminated: + containerID: containerd://5707f7167ce70a72e624d0bcdace677780459f7eb1c7acf0ab606075d565760b + exitCode: 0 + finishedAt: "2026-09-28T03:14:55Z" + reason: Completed + startedAt: "2026-09-28T03:14:54Z" + terminationReason: Completed + taskSpec: + description: | + Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. + params: + - description: Stack graph JSON (from resolve-stack) + name: stack-json + type: string + - description: Space-separated list of app names to clone + name: build-apps + type: string + - default: main + description: Branch or SHA to check out for app repos (default; overridden + by app-revisions per app) + name: git-revision + type: string + - default: '{}' + description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). + Used for PR builds where the changed app is checked out at its PR branch. + name: app-revisions + type: string + steps: + - computeResources: {} + image: alpine/git:latest + name: clone-apps + script: | + #!/bin/sh + set -e + apk add --no-cache jq >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + DEFAULT_REVISION="main" + APP_REVISIONS='{}' + WORKSPACE="/workspace/source" + + # Clear existing app dirs so we get a fresh clone (no stale/cached content) + echo " Clearing existing app dirs..." + for APP in $BUILD_APPS; do + rm -rf "$WORKSPACE/$APP" + done + + # Prefer authenticated SSH when a key is present. Public repositories + # can be cloned over HTTPS from an empty Secret workspace. + mkdir -p /root/.ssh + chmod 700 /root/.ssh + KEY_DIR="/workspace/ssh-key" + CLONE_TRANSPORT=https + if [ -f "$KEY_DIR/id_ed25519" ]; then + cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + CLONE_TRANSPORT=ssh + elif [ -f "$KEY_DIR/id_rsa" ]; then + cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa + chmod 600 /root/.ssh/id_rsa + CLONE_TRANSPORT=ssh + else + echo " No SSH key found; cloning public repositories over HTTPS" + fi + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true + fi + + # Clone all app repos in parallel (M7.1) + clone_app() { + local APP="$1" REPO="$2" REVISION="$3" URL="$4" + echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" + git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" + if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then + echo "ERROR: could not fetch $REVISION for $APP" >&2 + exit 1 + fi + git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD + echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" + echo " Done: $APP" + } + + PIDS="" + for APP in $BUILD_APPS; do + REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') + if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then + echo " WARN: No repo for app $APP in stack, skipping" + continue + fi + REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') + [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" + if [ "$CLONE_TRANSPORT" = "ssh" ]; then + URL="git@github.com:${REPO}.git" + else + URL="https://github.com/${REPO}.git" + fi + clone_app "$APP" "$REPO" "$REVISION" "$URL" & + PIDS="$PIDS $!" + done + + CLONE_FAILED=false + for PID in $PIDS; do + if ! wait "$PID"; then + CLONE_FAILED=true + fi + done + if [ "$CLONE_FAILED" = "true" ]; then + echo "ERROR: One or more clones failed" >&2 + exit 1 + fi + + echo "" + echo "App repos cloned (parallel). Listing:" + for APP in $BUILD_APPS; do + [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true + done + workingDir: /workspace/source + workspaces: + - description: Workspace with platform repo at root; app repos will be cloned + into source/ + name: source + - description: Volume that may contain id_ed25519 or id_rsa for private-repository + SSH clones + name: ssh-key +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:15:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: deploy-intercepts-mirrord + tekton.dev/task: deploy-intercept-mirrord + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-deploy-intercepts-mirrord + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13112" + uid: 9b6af9c4-b873-4957-92b4-e57095fbd860 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: build-apps + value: demo-fe + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: built-images + value: | + { + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: mirrord-image + value: localhost:5000/tekton-dag-build-mirrord:latest + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: deploy-intercept-mirrord + timeout: 1h0m0s + workspaces: + - name: shared-workspace + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:16:41Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:41Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-deploy-intercepts-mirrord-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: deployed-pods + type: string + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + startTime: "2026-09-28T03:15:50Z" + steps: + - container: step-deploy + imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 + name: deploy + provenance: {} + terminated: + containerID: containerd://88587dcb06e8b0adec20ea28a8fb6e6b5d1c0894f1a9830b852865fb2cfa658e + exitCode: 0 + finishedAt: "2026-09-28T03:16:40Z" + message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:15:53Z" + terminationReason: Completed + taskSpec: + description: | + Deploys PR pods with mirrord-based intercepts (M7). For each built app: 1) Deploys a PR pod running only the built image (no Telepresence sidecar). 2) Deploys a mirrord-proxy pod that runs mirrord exec wrapping a socat proxy; + traffic matching the intercept header is stolen from the original deployment + and forwarded to the PR pod. Same interface as deploy-stack-intercepts; + use when intercept-backend=mirrord. + params: + - description: Full stack graph JSON (used to resolve ports, namespaces, topology) + name: stack-json + type: string + - description: Space-separated list of apps that were built (ONLY these get + intercepts) + name: build-apps + type: string + - default: "" + description: Full ordered chain from entry to leaf (for logging context) + name: propagation-chain + type: string + - description: JSON map of app → image URI + name: built-images + type: string + - description: Header match for mirrord (e.g. x-dev-session:pr-42) + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: localhost:5000/tekton-dag-build-mirrord:latest + description: Image for mirrord proxy pods (mirrord CLI + socat) + name: mirrord-image + type: string + - default: mirrord-intercept + description: | + ServiceAccount the proxy pod runs as. mirrord exec must read the target + Deployment and create the mirrord-agent Job; the default SA cannot. + Create it with scripts/install-mirrord-intercept-rbac.sh. + name: proxy-service-account + type: string + results: + - description: JSON map of app → pod name (PR pods) + name: deployed-pods + type: string + steps: + - computeResources: {} + image: bitnami/kubectl:latest + name: deploy + script: | + #!/bin/bash + set -e + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + BUILD_APPS="demo-fe" + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILT='{ + "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" + } + ' + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + MIRRORD_IMAGE="localhost:5000/tekton-dag-build-mirrord:latest" + PROXY_SA="mirrord-intercept" + DEPLOYED_PODS_FILE="/workspace/shared-workspace/deployed-pods.json" + + echo "=============================================" + echo " mirrord Intercept Deployment" + echo "=============================================" + echo " Build apps: $BUILD_APPS" + echo " Intercept header: $INTERCEPT" + echo " Namespace: $DEFAULT_NS" + echo "" + + echo '{}' > /tmp/pods.json + + for APP in $BUILD_APPS; do + echo "=========================================" + echo " Deploying intercept: $APP" + echo "=========================================" + + IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') + + TS=$(date +%s) + POD_NAME="pr-${APP}-${TS}" + PROXY_NAME="mirrord-proxy-${APP}-${TS}" + CM_NAME="mirrord-config-${APP}-${TS}" + + BAGGAGE_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + (.apps[] | select(.name==$a)) as $app | + ($app.downstream // []) as $down | + $app."propagation-role" // ( + if ($down|length)==0 then "terminal" + elif (($app.role // "")|ascii_downcase)=="frontend" then "originator" + else "forwarder" end) + ') + BAGGAGE_HEADER=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') + DOWNSTREAM_URL=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' + (.apps[] | select(.name==$a) | .downstream // []) as $down | + if ($down|length)>0 then "http://" + ($down[0]|tostring) else empty end + ') + + echo " Deploying PR pod: $POD_NAME in $NS" + echo " Baggage: role=$BAGGAGE_ROLE header=$BAGGAGE_HEADER" + cat <: " (colon + space). The param is "name:value" + # with no space, so passing it verbatim never matched (2026-09-27, + # found on local kind). Build an anchored, case-insensitive filter. + if [ -n "$INTERCEPT" ]; then + HDR_NAME="${INTERCEPT%%:*}" + HDR_VAL="${INTERCEPT#*:}" + HDR_VAL="${HDR_VAL# }" + HEADER_FILTER="(?i)^${HDR_NAME}: ${HDR_VAL}\$" + else + HEADER_FILTER=".*" + fi + echo " mirrord header_filter: ${HEADER_FILTER}" + MIRRORD_CONFIG=$(jq -n \ + --arg path "deployment/${APP}" \ + --arg ns "$NS" \ + --arg header "$HEADER_FILTER" \ + '{ + target: { path: $path, namespace: $ns }, + agent: { namespace: $ns }, + feature: { + network: { + incoming: { mode: "steal", http_filter: { header_filter: $header } }, + outgoing: true + }, + fs: "local" + } + }') + + kubectl create configmap "$CM_NAME" --namespace "$NS" --from-literal=config.json="$MIRRORD_CONFIG" + + echo " Deploying mirrord proxy: $PROXY_NAME" + cat < ${PR_POD_IP}:${CPORT}" + exec /usr/local/bin/mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} + env: + - name: HOME + value: /tmp + - name: MIRRORD_TELEMETRY + value: "false" + - name: MIRRORD_PROGRESS_MODE + value: "off" + # INFO gives the gate below its positive marker: + # 'Created agent pod ... pod_name: "mirrord-agent-..."'. + # (mirrord still prints a non-fatal + # 'ERROR mirrord::connection: failed to obtain machine ID'.) + - name: RUST_LOG + value: "mirrord=info" + - name: PR_POD_IP + value: "${PR_POD_IP}" + - name: CPORT + value: "${CPORT}" + volumeMounts: + - name: config + mountPath: /config + readOnly: true + securityContext: + runAsUser: 0 + privileged: true + capabilities: + add: [SYS_ADMIN, SYS_PTRACE, NET_ADMIN] + volumes: + - name: config + configMap: + name: ${CM_NAME} + PROXYPOD + + # Fail closed, with a positive marker. A Ready flicker is not proof: + # with no readiness probe a container is Ready the instant it runs, + # and mirrord exec can fail seconds later. Observed on kind: the + # proxy logs 'Created agent pod' at ~1s; without pods/portforward + # RBAC the WebSocket upgrade 403s at ~+17s and the agent gives up at + # ~+30s. So require: proxy Running, zero restarts, no fatal log + # line, the agent pod named in the proxy log Running, and all of + # that still true 40s after the agent pod was first seen. The + # proxy's own IP:port is NOT probed - under the mirrord layer socat's + # listener is virtual; routing is proven in validate-propagation. + PROXY_OK=false + AGENT_POD="" + AGENT_SEEN=0 + DEADLINE=$(( $(date +%s) + 180 )) + while [ "$(date +%s)" -lt "$DEADLINE" ]; do + PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") + PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) + # Fatal log lines only. A generic "ERROR mirrord::..." is not + # fatal (the machine-ID telemetry lookup); a real crash ends the + # process and, with restartPolicy Never, moves the pod to Failed. + if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ + || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then + break + fi + if [ -z "$AGENT_POD" ]; then + AGENT_POD=$(printf '%s' "$PROXY_LOG" | sed -n 's/.*Created agent pod.*pod_name: "\([^"]*\)".*/\1/p' | head -n 1) + [ -z "$AGENT_POD" ] || AGENT_SEEN=$(date +%s) + fi + if [ "$PHASE" = "Running" ] && [ -n "$AGENT_POD" ]; then + AGENT_PHASE=$(kubectl get "pod/${AGENT_POD}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + if [ "$AGENT_PHASE" = "Failed" ] || [ "$AGENT_PHASE" = "Succeeded" ]; then + break + fi + if [ "$AGENT_PHASE" = "Running" ] && [ $(( $(date +%s) - AGENT_SEEN )) -ge 40 ]; then + PROXY_OK=true + break + fi + fi + sleep 3 + done + if ! $PROXY_OK; then + echo "ERROR: mirrord proxy ${PROXY_NAME} did not establish an agent connection (proxy phase=${PHASE:-?} restarts=${RESTARTS:-?} agent=${AGENT_POD:-none} agent phase=${AGENT_PHASE:-?})" >&2 + echo "--- proxy pod log ---" >&2 + kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true + echo "--- proxy pod describe ---" >&2 + kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true + echo "--- mirrord agent jobs/pods in $NS ---" >&2 + kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true + if [ -n "$AGENT_POD" ]; then + echo "--- mirrord agent log (${AGENT_POD}) ---" >&2 + kubectl logs "pod/${AGENT_POD}" -n "$NS" --tail=-1 2>&1 | tail -n 60 >&2 || true + fi + exit 1 + fi + echo " Proxy ${PROXY_NAME} connected to agent ${AGENT_POD}; both Running 40s, 0 restarts (routing is proven in validate-propagation)" + echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" + echo "" + + jq --arg a "$APP" --arg p "$POD_NAME" '. + {($a): $p}' /tmp/pods.json > /tmp/pods-tmp.json + mv /tmp/pods-tmp.json /tmp/pods.json + done + + mkdir -p "$(dirname "${DEPLOYED_PODS_FILE}")" + cat /tmp/pods.json > "$DEPLOYED_PODS_FILE" + cat /tmp/pods.json | tee /tekton/results/deployed-pods + workspaces: + - description: Workspace to write deployed-pods.json for pass-through result + name: shared-workspace +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:41Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: deploy-intercepts-result + tekton.dev/task: deploy-intercepts-result + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-deploy-intercepts-result + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13164" + uid: a8029dc7-4483-4afc-aaf7-baf9cd82fe8f + spec: + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: deploy-intercepts-result + timeout: 1h0m0s + workspaces: + - name: shared-workspace + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:16:45Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:45Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-deploy-intercepts-result-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: deployed-pods + type: string + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + startTime: "2026-09-28T03:16:41Z" + steps: + - container: step-pass-through + imageID: docker.io/library/busybox@sha256:fd7dc98638c8e305f4dc34e979f1c0fdfdcaeb0fbf8fcff77ae834b6da3d7e6e + name: pass-through + provenance: {} + terminated: + containerID: containerd://16624b1833c51db43313d16cfc5dcc811bc38eb73185092c1784d5ec1cf18715 + exitCode: 0 + finishedAt: "2026-09-28T03:16:44Z" + message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:16:44Z" + terminationReason: Completed + taskSpec: + description: | + Pass-through task (M7). Reads deployed-pods.json from the shared workspace (written by either deploy-intercepts-telepresence or deploy-intercepts-mirrord) and writes it to the deployed-pods result. Downstream and finally tasks reference this task's result so they work with either intercept backend. + results: + - description: JSON map of app → pod name + name: deployed-pods + type: string + steps: + - computeResources: {} + image: busybox + name: pass-through + script: | + #!/bin/sh + set -e + FILE="/workspace/shared-workspace/deployed-pods.json" + if [ ! -f "$FILE" ]; then + echo '{}' > "/tekton/results/deployed-pods" + echo "No deployed-pods.json found; wrote empty object." + exit 0 + fi + cp "$FILE" "/tekton/results/deployed-pods" + echo "Wrote deployed-pods to result: $(cat /tekton/results/deployed-pods)" + workspaces: + - description: Workspace containing deployed-pods.json from the deploy step + name: shared-workspace +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tekton.dev/categories: Git + tekton.dev/deprecated: "true" + tekton.dev/displayName: git clone + tekton.dev/pipelines.minVersion: 0.38.0 + tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 + tekton.dev/tags: git + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:33Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: fetch-source + tekton.dev/task: git-clone + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-fetch-source + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12350" + uid: 8def9798-f6a9-48d1-acca-b7a8a67a4502 + spec: + params: + - name: url + value: https://github.com/jmjava/tekton-dag.git + - name: revision + value: main + - name: deleteExisting + value: "true" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: git-clone + timeout: 1h0m0s + workspaces: + - name: output + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:14:42Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:42Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-fetch-source-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: commit + type: string + value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 + - name: committer-date + type: string + value: "1790468109" + - name: url + type: string + value: https://github.com/jmjava/tekton-dag.git + startTime: "2026-09-28T03:14:34Z" + steps: + - container: step-clone + imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df + name: clone + provenance: {} + terminated: + containerID: containerd://419cbb2591b360883fdf88f1585593564cbedb42861e6839d6a884ba928fbfd5 + exitCode: 0 + finishedAt: "2026-09-28T03:14:41Z" + message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:41Z" + terminationReason: Completed + taskSpec: + description: |- + These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. + The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. + params: + - description: Repository URL to clone from. + name: url + type: string + - default: "" + description: Revision to checkout. (branch, tag, sha, ref, etc...) + name: revision + type: string + - default: "" + description: Refspec to fetch before checking out revision. + name: refspec + type: string + - default: "true" + description: Initialize and fetch git submodules. + name: submodules + type: string + - default: "1" + description: Perform a shallow clone, fetching only the most recent N commits. + name: depth + type: string + - default: "true" + description: Set the `http.sslVerify` global git config. Setting this to `false` + is not advised unless you are sure that you trust your git remote. + name: sslVerify + type: string + - default: ca-bundle.crt + description: file name of mounted crt using ssl-ca-directory workspace. default + value is ca-bundle.crt. + name: crtFileName + type: string + - default: "" + description: Subdirectory inside the `output` Workspace to clone the repo + into. + name: subdirectory + type: string + - default: "" + description: Define the directory patterns to match or exclude when performing + a sparse checkout. + name: sparseCheckoutDirectories + type: string + - default: "true" + description: Clean out the contents of the destination directory if it already + exists before cloning. + name: deleteExisting + type: string + - default: "" + description: HTTP proxy server for non-SSL requests. + name: httpProxy + type: string + - default: "" + description: HTTPS proxy server for SSL requests. + name: httpsProxy + type: string + - default: "" + description: Opt out of proxying HTTP/HTTPS requests. + name: noProxy + type: string + - default: "true" + description: Log the commands that are executed during `git-clone`'s operation. + name: verbose + type: string + - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + description: The image providing the git-init binary that this Task runs. + name: gitInitImage + type: string + - default: /home/git + description: | + Absolute path to the user's home directory. + name: userHome + type: string + results: + - description: The precise commit SHA that was fetched by this Task. + name: commit + type: string + - description: The precise URL that was fetched by this Task. + name: url + type: string + - description: The epoch timestamp of the commit that was fetched by this Task. + name: committer-date + type: string + steps: + - computeResources: {} + env: + - name: HOME + value: /home/git + - name: PARAM_URL + value: https://github.com/jmjava/tekton-dag.git + - name: PARAM_REVISION + value: main + - name: PARAM_REFSPEC + - name: PARAM_SUBMODULES + value: "true" + - name: PARAM_DEPTH + value: "1" + - name: PARAM_SSL_VERIFY + value: "true" + - name: PARAM_CRT_FILENAME + value: ca-bundle.crt + - name: PARAM_SUBDIRECTORY + - name: PARAM_DELETE_EXISTING + value: "true" + - name: PARAM_HTTP_PROXY + - name: PARAM_HTTPS_PROXY + - name: PARAM_NO_PROXY + - name: PARAM_VERBOSE + value: "true" + - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES + - name: PARAM_USER_HOME + value: /home/git + - name: WORKSPACE_OUTPUT_PATH + value: /workspace/output + - name: WORKSPACE_SSH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSH_DIRECTORY_PATH + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH + - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND + value: "false" + - name: WORKSPACE_SSL_CA_DIRECTORY_PATH + image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 + name: clone + script: | + #!/usr/bin/env sh + set -eu + + if [ "${PARAM_VERBOSE}" = "true" ] ; then + set -x + fi + + if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" + cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" + chmod 400 "${PARAM_USER_HOME}/.git-credentials" + chmod 400 "${PARAM_USER_HOME}/.gitconfig" + fi + + if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then + cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh + chmod 700 "${PARAM_USER_HOME}"/.ssh + chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* + fi + + if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then + export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" + if [ "${PARAM_CRT_FILENAME}" != "" ] ; then + export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" + fi + fi + CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" + + cleandir() { + # Delete any existing contents of the repo directory if it exists. + # + # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" + # or the root of a mounted volume. + if [ -d "${CHECKOUT_DIR}" ] ; then + # Delete non-hidden files and directories + rm -rf "${CHECKOUT_DIR:?}"/* + # Delete files and directories starting with . but excluding .. + rm -rf "${CHECKOUT_DIR}"/.[!.]* + # Delete files and directories starting with .. plus any other character + rm -rf "${CHECKOUT_DIR}"/..?* + fi + } + + if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then + cleandir || true + fi + + test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" + test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" + test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" + + git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" + /ko-app/git-init \ + -url="${PARAM_URL}" \ + -revision="${PARAM_REVISION}" \ + -refspec="${PARAM_REFSPEC}" \ + -path="${CHECKOUT_DIR}" \ + -sslVerify="${PARAM_SSL_VERIFY}" \ + -submodules="${PARAM_SUBMODULES}" \ + -depth="${PARAM_DEPTH}" \ + -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" + cd "${CHECKOUT_DIR}" + RESULT_SHA="$(git rev-parse HEAD)" + EXIT_CODE="$?" + if [ "${EXIT_CODE}" != 0 ] ; then + exit "${EXIT_CODE}" + fi + RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" + printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" + printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" + printf "%s" "${PARAM_URL}" > "/tekton/results/url" + securityContext: + runAsNonRoot: true + runAsUser: 65532 + workspaces: + - description: The git repo will be cloned onto the volume backing this Workspace. + name: output + - description: | + A .ssh directory with private key, known_hosts, config, etc. Copied to + the user's home before git commands are executed. Used to authenticate + with the git remote when performing the clone. Binding a Secret to this + Workspace is strongly recommended over other volume types. + name: ssh-directory + optional: true + - description: | + A Workspace containing a .gitconfig and .git-credentials file. These + will be copied to the user's home before any git commands are run. Any + other files in this Workspace are ignored. It is strongly recommended + to use ssh-directory over basic-auth whenever possible and to bind a + Secret to this Workspace over other volume types. + name: basic-auth + optional: true + - description: | + A workspace containing CA certificates, this will be used by Git to + verify the peer with when fetching or pushing over HTTPS. + name: ssl-ca-directory + optional: true +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:18:13Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: finally + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: post-pr-comment + tekton.dev/task: post-pr-comment + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-post-pr-comment + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13724" + uid: 6f0a708a-b5d0-4854-8e36-8489cd782565 + spec: + params: + - name: git-url + value: https://github.com/jmjava/tekton-dag.git + - name: pr-repo-url + value: "" + - name: pr-number + value: "903" + - name: pipeline-run-name + value: stackrun-pr-27exw + - name: namespace + value: tekton-pipelines + - name: status + value: Completed + - name: test-summary + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: dashboard-url + value: "" + - name: github-secret-name + value: github-token + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: post-pr-comment + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:18:18Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:18Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-post-pr-comment-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:18:13Z" + steps: + - container: step-post-comment + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: post-comment + provenance: {} + terminated: + containerID: containerd://21a5e3c7b0296249f6ba5e7ddc75583d38b35208765e9f4f315c439ec97f4135 + exitCode: 0 + finishedAt: "2026-09-28T03:18:18Z" + reason: Completed + startedAt: "2026-09-28T03:18:17Z" + terminationReason: Completed + taskSpec: + description: Post a comment on the GitHub PR with run status and Tekton Dashboard + link. + params: + - description: Git repo URL (e.g. https://github.com/owner/repo.git); used when + pr-repo-url is empty + name: git-url + type: string + - default: "" + description: When set, PR comment is posted to this repo (app repo); when + empty, git-url is used + name: pr-repo-url + type: string + - description: PR number (issue number for the comment) + name: pr-number + type: string + - description: Name of this PipelineRun + name: pipeline-run-name + type: string + - description: Namespace of the PipelineRun + name: namespace + type: string + - description: Pipeline status (Succeeded or Failed) + name: status + type: string + - default: "" + description: Optional test summary JSON string + name: test-summary + type: string + - default: "" + description: Base URL of Tekton Dashboard (e.g. https://dashboard.example.com); + comment will include link to this run + name: dashboard-url + type: string + - default: github-token + description: Kubernetes secret name containing key 'token' (GitHub token with + repo scope) + name: github-secret-name + type: string + steps: + - computeResources: {} + env: + - name: GITHUB_TOKEN + valueFrom: + secretKeyRef: + key: token + name: github-token + optional: true + - name: GIT_URL + value: https://github.com/jmjava/tekton-dag.git + - name: PR_REPO_URL + - name: PR_NUMBER + value: "903" + - name: RUN_NAME + value: stackrun-pr-27exw + - name: NAMESPACE + value: tekton-pipelines + - name: STATUS + value: Completed + - name: TEST_SUMMARY + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + - name: DASHBOARD_URL + image: alpine:3.19 + name: post-comment + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq >/dev/null 2>&1 + if [ -z "$GITHUB_TOKEN" ]; then + echo "No GITHUB_TOKEN secret; skipping PR comment." + exit 0 + fi + # Use pr-repo-url when set (PR in app repo), else git-url (platform repo) + COMMENT_URL="${PR_REPO_URL:-$GIT_URL}" + # Derive owner/repo from URL (https://github.com/owner/repo or git@github.com:owner/repo.git) + REPO="${COMMENT_URL#*github.com/}" + REPO="${REPO#*:}" + REPO="${REPO%.git}" + REPO="${REPO#*/}" + OWNER="${COMMENT_URL#*github.com/}" + OWNER="${OWNER#*:}" + OWNER="${OWNER%.git}" + OWNER="${OWNER%%/*}" + if [ -z "$OWNER" ] || [ -z "$REPO" ]; then + echo "Could not parse owner/repo from COMMENT_URL=$COMMENT_URL" + exit 0 + fi + BODY="## Tekton Pipeline Run" + BODY="${BODY}\n\n**Status:** ${STATUS}" + if [ -n "$TEST_SUMMARY" ]; then + BODY="${BODY}\n\n**Test summary:**\n\`\`\`json\n${TEST_SUMMARY}\n\`\`\`" + fi + if [ -n "$DASHBOARD_URL" ]; then + DASH_URL="${DASHBOARD_URL%/}/#/namespaces/${NAMESPACE}/pipelineruns/${RUN_NAME}" + BODY="${BODY}\n\n[View in Tekton Dashboard](${DASH_URL})" + fi + BODY="${BODY}\n\n_PipelineRun: \`${RUN_NAME}\`_" + JSON_BODY=$(printf '%s' "$BODY" | jq -Rs '{ body: . }') + curl -sS -X POST \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/${OWNER}/${REPO}/issues/${PR_NUMBER}/comments" \ + -d "$JSON_BODY" || echo "Failed to post comment (non-fatal)" + echo "Posted comment to PR #${PR_NUMBER}" +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:50Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: pr-snapshot-tag + tekton.dev/task: pr-snapshot-tag + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-pr-snapshot-tag + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12519" + uid: f20ab2ae-22ca-4bbe-b0fb-b96944cbf80f + spec: + params: + - name: snapshot-tag + value: stackrun-pr-27exw + - name: build-apps + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: pr-snapshot-tag + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:14:55Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:55Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-pr-snapshot-tag-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: snapshot-versions + type: string + value: '{"demo-fe":"stackrun-pr-27exw"}' + startTime: "2026-09-28T03:14:50Z" + steps: + - container: step-build-map + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: build-map + provenance: {} + terminated: + containerID: containerd://c5716e5e72905a52dc998aa1872d5f2bf2eb2d5042db77b0fb3c12be588bd7b2 + exitCode: 0 + finishedAt: "2026-09-28T03:14:54Z" + message: '[{"key":"snapshot-versions","value":"{\"demo-fe\":\"stackrun-pr-27exw\"}","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:54Z" + terminationReason: Completed + taskSpec: + description: | + Builds a JSON map of app -> snapshot tag for PR pipeline image tagging. PR builds are not releases; they use a run-specific snapshot tag (e.g. the pipeline run name) so images are clearly non-release. + params: + - description: 'Tag to use for all apps (e.g. pipeline run name: stack-pr-2-6xnbj)' + name: snapshot-tag + type: string + - description: Space-separated list of app names to tag + name: build-apps + type: string + results: + - description: JSON map of app -> snapshot-tag for use as image-tag in build-apps + name: snapshot-versions + type: string + steps: + - computeResources: {} + image: alpine:3.19 + name: build-map + script: | + #!/bin/sh + set -e + apk add --no-cache jq + TAG="stackrun-pr-27exw" + APPS="demo-fe" + OUT="{}" + for APP in $APPS; do + [ -z "$APP" ] && continue + OUT=$(echo "$OUT" | jq -c --arg app "$APP" --arg tag "$TAG" '. + {($app): $tag}') + done + echo -n "$OUT" | tee /tekton/results/snapshot-versions + echo "" + echo "Snapshot tag map: $OUT" + securityContext: + runAsUser: 0 +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:17:33Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: query-test-plan + tekton.dev/task: query-test-plan + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-query-test-plan + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13467" + uid: c622eecb-453b-4bb2-bae0-a44faa8afbcc + spec: + params: + - name: changed-app + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: query-test-plan + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:17:38Z" + conditions: + - lastTransitionTime: "2026-09-28T03:17:38Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-query-test-plan-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: apps-to-test + type: string + value: "" + - name: test-plan-message + type: string + value: test-plan query failed; running all tests + - name: tests-to-run + type: string + value: "" + - name: unmapped-area + type: string + value: "" + startTime: "2026-09-28T03:17:33Z" + steps: + - container: step-query + imageID: docker.io/curlimages/curl@sha256:58adaa4e8dca9c988bae2aba4ab3434a0bb2da16bbe3f92dec39ec7785166777 + name: query + provenance: {} + terminated: + containerID: containerd://4b984b91895eabb1a52cc6ec9190ad1ca37ace0f34e3a9305c7a7a597bf3f03e + exitCode: 0 + finishedAt: "2026-09-28T03:17:37Z" + message: '[{"key":"apps-to-test","value":"","type":1},{"key":"test-plan-message","value":"test-plan + query failed; running all tests","type":1},{"key":"tests-to-run","value":"","type":1},{"key":"unmapped-area","value":"","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:17:37Z" + terminationReason: Completed + taskSpec: + description: | + Query the orchestrator's test-plan endpoint to get the minimal set of regression tests for the changed app. Outputs a comma-separated list of test IDs (or an unmapped-area flag). + params: + - description: The app that changed in this PR + name: changed-app + type: string + - default: "1" + description: Graph traversal depth (1=direct, 2+=neighbors) + name: blast-radius + type: string + - default: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080 + description: Orchestrator service URL + name: orchestrator-url + type: string + results: + - description: Comma-separated test IDs to run, or empty + name: tests-to-run + type: string + - description: Service name if no mapped tests, or empty + name: unmapped-area + type: string + - description: Comma-separated service/app names whose tests should run, or + empty + name: apps-to-test + type: string + - description: Human-readable summary of the test plan + name: test-plan-message + type: string + steps: + - computeResources: {} + image: curlimages/curl:latest + name: query + script: | + #!/bin/sh + set -e + + APP="demo-fe" + RADIUS="1" + URL="http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=${APP}&radius=${RADIUS}" + + echo "Querying test plan: $URL" + RESPONSE=$(curl -sf "$URL" 2>/dev/null || echo '{"error":"orchestrator unreachable"}') + echo "$RESPONSE" | head -c 2000 + echo "" + + if echo "$RESPONSE" | grep -q '"error"'; then + echo "WARN: test-plan query failed; will run all tests" + echo -n "" > /tekton/results/tests-to-run + echo -n "" > /tekton/results/unmapped-area + echo -n "" > /tekton/results/apps-to-test + echo -n "test-plan query failed; running all tests" > /tekton/results/test-plan-message + exit 0 + fi + + TESTS=$(echo "$RESPONSE" | sed 's/.*"tests":\[//' | sed 's/\].*//' | \ + sed 's/{"id":"//g' | sed 's/","type":"[^"]*"}//g' | tr ',' '\n' | \ + paste -sd ',' -) + UNMAPPED=$(echo "$RESPONSE" | sed -n 's/.*"unmapped_area":"\([^"]*\)".*/\1/p') + MESSAGE=$(echo "$RESPONSE" | sed -n 's/.*"message":"\([^"]*\)".*/\1/p') + SERVICES=$(echo "$RESPONSE" | sed -n 's/.*"services":\[\([^]]*\)\].*/\1/p' | \ + sed 's/"//g') + + echo "" + echo "Tests to run: ${TESTS:-}" + echo "Apps to test: ${SERVICES:-}" + echo "Unmapped area: ${UNMAPPED:-}" + echo "Message: $MESSAGE" + + echo -n "${TESTS}" > /tekton/results/tests-to-run + echo -n "${UNMAPPED}" > /tekton/results/unmapped-area + echo -n "${SERVICES}" > /tekton/results/apps-to-test + echo -n "${MESSAGE}" > /tekton/results/test-plan-message +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:14:42Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: resolve-stack + tekton.dev/task: resolve-stack + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-resolve-stack + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "12428" + uid: 376d8b76-abf1-4c49-b657-9448bc1cb54a + spec: + params: + - name: stack-file + value: stacks/stack-one.yaml + - name: changed-app + value: demo-fe + - name: pr-number + value: "903" + - name: version-overrides + value: '{}' + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: resolve-stack + timeout: 1h0m0s + workspaces: + - name: source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:14:49Z" + conditions: + - lastTransitionTime: "2026-09-28T03:14:49Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-resolve-stack-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: app-list + type: string + value: demo-fe release-lifecycle-demo demo-api + - name: build-apps + type: string + value: demo-fe + - name: entry-app + type: string + value: demo-fe + - name: intercept-header-value + type: string + value: x-dev-session:pr-903 + - name: propagation-chain + type: string + value: | + demo-fe release-lifecycle-demo demo-api + - name: resolved-versions + type: string + value: | + {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} + - name: run-compile-composer + type: string + value: "false" + - name: run-compile-gradle + type: string + value: "false" + - name: run-compile-maven + type: string + value: "false" + - name: run-compile-npm + type: string + value: "true" + - name: run-compile-pip + type: string + value: "false" + - name: stack-json + type: string + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + startTime: "2026-09-28T03:14:42Z" + steps: + - container: step-resolve + imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 + name: resolve + provenance: {} + terminated: + containerID: containerd://719cd458394417bd85ec21f0ce71520758fc66a2796903f1ed3ab3b97bad691c + exitCode: 0 + finishedAt: "2026-09-28T03:14:48Z" + message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"x-dev-session:pr-903","type":1},{"key":"propagation-chain","value":"demo-fe + release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"false","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo + 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence + (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm + install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn + -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:14:48Z" + terminationReason: Completed + taskSpec: + description: | + Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. + params: + - description: Path to the stack YAML relative to workspace root + name: stack-file + type: string + - default: stacks/versions.yaml + description: Path to versions.yaml relative to workspace root + name: versions-file + type: string + - default: '{}' + description: | + JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. + name: version-overrides + type: string + - default: "" + description: App whose PR triggered this run (empty = build all) + name: changed-app + type: string + - default: "" + description: PR number for intercept-header generation + name: pr-number + type: string + results: + - description: Full stack graph as JSON (includes build config per app) + name: stack-json + type: string + - description: Space-separated list of apps in topological order + name: app-list + type: string + - description: Entry-point app (typically the frontend) + name: entry-app + type: string + - description: Ordered chain of apps for header propagation validation + name: propagation-chain + type: string + - description: Header value to use for Telepresence intercepts + name: intercept-header-value + type: string + - description: Space-separated list of apps to build (changed-app or all) + name: build-apps + type: string + - description: true if any build-app uses npm (so only that compile step runs) + name: run-compile-npm + type: string + - description: true if any build-app uses maven + name: run-compile-maven + type: string + - description: true if any build-app uses gradle + name: run-compile-gradle + type: string + - description: true if any build-app uses pip + name: run-compile-pip + type: string + - description: true if any build-app uses composer + name: run-compile-composer + type: string + - description: JSON map of app → version (registry defaults merged with overrides) + name: resolved-versions + type: string + steps: + - computeResources: {} + env: + - name: YQ_VERSION + value: v4.45.4 + - name: JQ_VERSION + value: jq-1.7.1 + image: alpine:3.21 + name: resolve + script: | + #!/bin/sh + set -eu + + arch=$(uname -m) + case "$arch" in + x86_64) arch=amd64 ;; + aarch64|arm64) arch=arm64 ;; + *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; + esac + install_static() { + dest="$1" + url="$2" + wget -q -O "$dest" "$url" + chmod +x "$dest" + } + # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). + if ! apk add --no-cache jq yq-go; then + echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 + install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" + install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" + fi + command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } + command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } + + STACK="stacks/stack-one.yaml" + VFILE="stacks/versions.yaml" + OVERRIDES='{}' + CHANGED="demo-fe" + PR="903" + + if [ ! -f "$STACK" ]; then + echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 + ls -la >&2 + ls -la stacks >&2 || true + exit 1 + fi + + STACK_JSON=$(yq -o=json "$STACK") + + # ---------------------------------------------------------- + # Build the full graph JSON (preserves build config per app) + # ---------------------------------------------------------- + echo "$STACK_JSON" | jq -c '{ + name: .name, + description: .description, + propagation: .propagation, + defaults: .defaults, + apps: [.apps[] | { + name: .name, + repo: .repo, + role: .role, + "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), + namespace: (.namespace // null), + "container-port": (."container-port" // null), + "service-port": (."service-port" // null), + "context-dir": (."context-dir" // "."), + dockerfile: (.dockerfile // "Dockerfile"), + build: (.build // {tool:"none", runtime:"custom"}), + downstream: (.downstream // []), + tests: (.tests // {}) + }] + }' > /tmp/stack.json + + cat /tmp/stack.json | tee /tekton/results/stack-json + + # ---------------------------------------------------------- + # Resolve versions: registry defaults + overrides + # ---------------------------------------------------------- + VERSIONS_JSON="{}" + if [ -f "$VFILE" ]; then + VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' + [to_entries[] | {key: .key, value: .value.version}] | from_entries + ') + fi + + # Only keep versions for apps actually in this stack + APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') + STACK_VERSIONS="{}" + for APP in $APP_NAMES; do + VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') + done + + # Merge overrides on top + if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then + echo "Applying version overrides: $OVERRIDES" + STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') + fi + + echo "Resolved versions:" + echo "$STACK_VERSIONS" | jq '.' + echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions + echo "" + + # ---------------------------------------------------------- + # Topological order + # ---------------------------------------------------------- + TOPO=$(cat /tmp/stack.json | jq -r ' + def vis($n;$adj): + if (.t|index($n)) then .err=true + elif (.v|index($n)) then . + else .t+=[$n] | + reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | + .t-=[$n] | .v+=[$n] | .o+=[$n] + end; + def topo: + . as $g | + ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | + ($g.apps | map(.name)) as $all | + {v:[],t:[],o:[],err:false} | + reduce $all[] as $n (.; + if (.v|index($n)) then . else .|vis($n;$adj) end + ) | + if .err then error("cycle") else .o|reverse end; + topo | join(" ") + ') + echo -n "$TOPO" | tee /tekton/results/app-list + echo "" + + # ---------------------------------------------------------- + # Entry point (app that no other app lists as downstream) + # ---------------------------------------------------------- + ENTRY=$(cat /tmp/stack.json | jq -r ' + (.apps|map(.downstream)|flatten) as $deps | + .apps[] | select(.name as $n | ($deps|index($n))|not) | .name + ' | head -1) + echo -n "$ENTRY" | tee /tekton/results/entry-app + echo "" + + # ---------------------------------------------------------- + # Propagation chain from entry + # ---------------------------------------------------------- + cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' + def walk($name): + . as $g | + ($g.apps[]|select(.name==$name)) as $app | + if $app then [$name] + reduce ($app.downstream//[])[] as $d + ([]; . + ($g|walk($d))) + else [] end; + walk($s) | join(" ") + ' | tee /tekton/results/propagation-chain + + # ---------------------------------------------------------- + # Intercept header + # ---------------------------------------------------------- + if [ -n "$PR" ]; then + HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value + else + echo -n "" | tee /tekton/results/intercept-header-value + fi + echo "" + + # ---------------------------------------------------------- + # Build list + # ---------------------------------------------------------- + if [ -n "$CHANGED" ]; then + echo -n "$CHANGED" | tee /tekton/results/build-apps + else + echo -n "$TOPO" | tee /tekton/results/build-apps + fi + echo "" + + # ---------------------------------------------------------- + # Which compile steps to run (only tools used by build-apps) + # ---------------------------------------------------------- + BUILD_APPS=$(cat /tekton/results/build-apps) + RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" + for app in $BUILD_APPS; do + tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') + case "$tool" in + npm) RUN_NPM="true" ;; + maven) RUN_MAVEN="true" ;; + gradle) RUN_GRADLE="true" ;; + pip) RUN_PIP="true" ;; + composer) RUN_COMPOSER="true" ;; + esac + done + echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm + echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven + echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle + echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip + echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer + echo "" + securityContext: + runAsUser: 0 + workingDir: /workspace/source + workspaces: + - name: source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:17:38Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: run-tests + tekton.dev/task: run-stack-tests + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-run-tests + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13622" + uid: 9237177e-0f17-43e6-b91f-ed70a25b84d6 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: app-list + value: demo-fe release-lifecycle-demo demo-api + - name: entry-app + value: demo-fe + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: tests-to-run + value: "" + - name: unmapped-area + value: "" + - name: apps-to-test + value: "" + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: run-stack-tests + timeout: 1h0m0s + workspaces: + - name: test-source + persistentVolumeClaim: + claimName: pvc-c91a6da3ac + status: + artifacts: {} + completionTime: "2026-09-28T03:18:13Z" + conditions: + - lastTransitionTime: "2026-09-28T03:18:13Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-run-tests-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: test-summary + type: string + value: | + { + "e2e-entry-point": "pass", + "release-lifecycle-demo": "pass", + "demo-api": "pass" + } + startTime: "2026-09-28T03:17:38Z" + steps: + - container: step-run-tests + imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 + name: run-tests + provenance: {} + terminated: + containerID: containerd://eeb81d93deb7f10a0abb876f47148c2dbe9d9641ac87b1435b85e1a517052e56 + exitCode: 0 + finishedAt: "2026-09-28T03:18:12Z" + message: '[{"key":"test-summary","value":"{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": + \"pass\",\n \"demo-api\": \"pass\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:17:43Z" + terminationReason: Completed + taskSpec: + description: | + Two-phase test execution: + Phase 1 — E2E through entry point: + Always sends requests through the stack's entry app (frontend) + with the intercept header. This exercises the full chain and + proves the intercepted PR app works in context. + For A→B→C→D where C is intercepted, the request enters A, + flows through B, hits the PR build of C via Telepresence, + then continues to D. The header propagates end-to-end. + + Phase 2 — Per-app tests: + Runs each app's configured test suites (Postman, Playwright, + Artillery) with the intercept header attached. For intercepted + apps this validates the PR build directly. For non-intercepted + apps this validates they still work with the header present. + + Runner logic lives in scripts/run-stack-tests-runners.sh and is mounted from ConfigMap run-stack-tests-runners so the Task does not depend on the cloned platform git-revision. + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated list of apps in topological order + name: app-list + type: string + - description: Entry-point app (frontend / root of the graph) + name: entry-app + type: string + - description: Full ordered chain from entry to leaves + name: propagation-chain + type: string + - description: Space-separated list of intercepted apps (changed in this PR) + name: build-apps + type: string + - default: "" + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: "" + description: Comma-separated test IDs from query-test-plan. Empty = run all + tests. + name: tests-to-run + type: string + - default: "" + description: Service name with no mapped regression tests. Non-empty = report + unmapped. + name: unmapped-area + type: string + - default: "" + description: Comma-separated service/app names whose tests should run. Empty + = run all. + name: apps-to-test + type: string + results: + - description: JSON summary of test results per app + e2e + name: test-summary + type: string + steps: + - computeResources: {} + image: node:22-alpine + name: run-tests + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq bash >/dev/null 2>&1 + + npm install -g newman artillery >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + APP_LIST="demo-fe release-lifecycle-demo demo-api" + ENTRY_APP="demo-fe" + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + TESTS_TO_RUN="" + UNMAPPED_AREA="" + APPS_TO_TEST="" + TEST_SOURCE="/workspace/test-source" + TEST_SUMMARY_PATH="/tekton/results/test-summary" + export STACK_JSON APP_LIST ENTRY_APP CHAIN BUILD_APPS INTERCEPT \ + DEFAULT_NS TESTS_TO_RUN UNMAPPED_AREA APPS_TO_TEST \ + TEST_SOURCE TEST_SUMMARY_PATH + + RUNNERS="/opt/tekton-dag/run-stack-tests-runners.sh" + if [ ! -f "$RUNNERS" ]; then + echo "ERROR: run-stack-tests runners ConfigMap missing: $RUNNERS" >&2 + exit 1 + fi + # shellcheck disable=SC1090 + . "$RUNNERS" + volumeMounts: + - mountPath: /opt/tekton-dag + name: runners-script + workingDir: /workspace/test-source + volumes: + - configMap: + name: run-stack-tests-runners + name: runners-script + workspaces: + - name: test-source +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:45Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: validate-original-traffic + tekton.dev/task: validate-original-traffic + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-validate-original-traffic + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13402" + uid: 44cb7b2e-2172-49ff-8295-3b83a2260049 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: entry-app + value: demo-fe + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: validate-original-traffic + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:17:33Z" + conditions: + - lastTransitionTime: "2026-09-28T03:17:33Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-validate-original-traffic-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + results: + - name: original-traffic-summary + type: string + value: | + { + "demo-fe": { + "health-check": "pass", + "http-code": "200" + }, + "release-lifecycle-demo": { + "health-check": "pass", + "http-code": "200" + }, + "demo-api": { + "health-check": "pass", + "http-code": "200" + }, + "e2e-no-header-passthrough": { + "status": "pass", + "http-code": "200" + }, + "artillery-no-header-burst": "pass", + "overall": "pass" + } + startTime: "2026-09-28T03:16:45Z" + steps: + - container: step-validate + imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 + name: validate + provenance: {} + terminated: + containerID: containerd://d9397c9746f9b3fb25cb7a2012a638548ac84da8e0bde7d616fff9c30de12520 + exitCode: 0 + finishedAt: "2026-09-28T03:17:32Z" + message: '[{"key":"original-traffic-summary","value":"{\n \"demo-fe\": {\n \"health-check\": + \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": + {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": + {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": + {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": + \"pass\",\n \"overall\": \"pass\"\n}\n","type":1}]' + reason: Completed + startedAt: "2026-09-28T03:16:50Z" + terminationReason: Completed + taskSpec: + description: | + Milestone 5 — Validates that original (non-intercepted) traffic continues to work while Telepresence intercepts are active. + Sends requests to every app in the stack WITHOUT the intercept header. These requests must reach the original deployments, not the PR pods. This proves the intercept is additive (header-based split) and does not disrupt normal service operation. + For a stack A→B→C→D where C is intercepted: + - Request WITHOUT header enters A → B → C (original) → D + - All four services respond normally from their original deployments + - The PR pod for C is never hit because no header is present + + Two checks per app: + 1. Direct health check — curl the service without headers + 2. Entry-point passthrough — request enters through the entry app + without headers, exercises the full chain via original deployments + + If Artillery is available, also runs a short load burst without headers to confirm sustained traffic handling during the intercept window. + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated ordered list of apps in the chain + name: propagation-chain + type: string + - default: "" + description: Space-separated list of intercepted apps (for reporting only) + name: build-apps + type: string + - description: Entry-point app (frontend / root of the graph) + name: entry-app + type: string + - default: staging + name: default-namespace + type: string + results: + - description: 'JSON summary: per-app health + e2e passthrough without headers' + name: original-traffic-summary + type: string + steps: + - computeResources: {} + image: node:22-alpine + name: validate + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq bash >/dev/null 2>&1 + npm install -g artillery >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + ENTRY_APP="demo-fe" + DEFAULT_NS="staging" + + echo '{}' > /tmp/orig-summary.json + OVERALL_PASS=true + + echo "============================================================" + echo " Milestone 5: Original Traffic Validation" + echo " (intercepts are ACTIVE — these requests carry NO header)" + echo "============================================================" + echo "" + echo " Intercepted apps: ${BUILD_APPS:-}" + echo " Full chain: $CHAIN" + echo " Entry point: $ENTRY_APP" + echo "" + echo " Expectation: every request WITHOUT the intercept header" + echo " reaches the ORIGINAL deployment, not the PR pod." + echo "" + + # =========================================================== + # Phase 1: Direct health check per service (no headers) + # =========================================================== + echo "############################################################" + echo " PHASE 1: Direct health check per service (no headers)" + echo "############################################################" + echo "" + + for APP in $CHAIN; do + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + MARKER="" + $IS_INTERCEPTED && MARKER=" [INTERCEPTED — should still serve original on bare requests]" + + echo " $APP:${MARKER}" + echo " URL: $URL" + echo " Headers: " + + HTTP_CODE=$(curl -s -o /tmp/orig-response-${APP}.txt -w "%{http_code}" \ + --connect-timeout 10 --max-time 30 \ + "$URL" 2>/dev/null || echo "000") + + if [ "$HTTP_CODE" = "000" ]; then + echo " WARN: Service not reachable (may be expected in dry-run)" + STATUS="unreachable" + elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then + echo " PASS: HTTP $HTTP_CODE — original deployment responding" + STATUS="pass" + else + echo " FAIL: HTTP $HTTP_CODE — unexpected response" + STATUS="fail" + OVERALL_PASS=false + fi + + jq --arg a "$APP" --arg s "$STATUS" --arg c "$HTTP_CODE" \ + '. + {($a): {"health-check": $s, "http-code": $c}}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + echo "" + done + + # =========================================================== + # Phase 2: Full-chain passthrough via entry point (no headers) + # =========================================================== + echo "############################################################" + echo " PHASE 2: Full-chain passthrough (no intercept headers)" + echo "############################################################" + echo "" + + ENTRY_NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + ENTRY_SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + ENTRY_URL="http://${ENTRY_APP}.${ENTRY_NS}.svc.cluster.local:${ENTRY_SPORT}/" + + echo " Entry URL: $ENTRY_URL" + echo " Headers: (no x-dev-session, no baggage)" + echo "" + echo " This request should flow through ALL original deployments." + echo " Even intercepted apps should respond from their original pods" + echo " because no header matches the Telepresence intercept rule." + echo "" + + PASSTHROUGH_RESULT=$(curl -s \ + --connect-timeout 15 --max-time 60 \ + "$ENTRY_URL" 2>/dev/null || echo '{"error":"unreachable"}') + + echo " Response:" + echo "$PASSTHROUGH_RESULT" | jq '.' 2>/dev/null || echo " $PASSTHROUGH_RESULT" + echo "" + + PASSTHROUGH_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + --connect-timeout 15 --max-time 60 \ + "$ENTRY_URL" 2>/dev/null || echo "000") + + if [ "$PASSTHROUGH_CODE" = "000" ]; then + echo " WARN: Entry point not reachable" + PASSTHROUGH_STATUS="unreachable" + elif [ "$PASSTHROUGH_CODE" -ge 200 ] && [ "$PASSTHROUGH_CODE" -lt 400 ]; then + echo " PASS: HTTP $PASSTHROUGH_CODE — full chain responding without headers" + PASSTHROUGH_STATUS="pass" + else + echo " FAIL: HTTP $PASSTHROUGH_CODE" + PASSTHROUGH_STATUS="fail" + OVERALL_PASS=false + fi + + jq --arg s "$PASSTHROUGH_STATUS" --arg c "$PASSTHROUGH_CODE" \ + '. + {"e2e-no-header-passthrough": {"status": $s, "http-code": $c}}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + # =========================================================== + # Phase 3: Artillery burst without headers + # =========================================================== + echo "" + echo "############################################################" + echo " PHASE 3: Artillery load burst (no intercept headers)" + echo "############################################################" + echo "" + echo " Short burst against entry point — no headers." + echo " Confirms sustained original-traffic handling during intercept." + echo "" + + cat > /tmp/original-traffic-artillery.yml </dev/null; then + echo " Artillery burst: PASS" + else + ARTY_EXIT=$? + if [ $ARTY_EXIT -eq 127 ]; then + echo " Artillery not available — skipping load burst (non-fatal)" + ARTILLERY_STATUS="skipped" + else + echo " Artillery burst: FAIL (exit $ARTY_EXIT)" + ARTILLERY_STATUS="fail" + OVERALL_PASS=false + fi + fi + + jq --arg s "$ARTILLERY_STATUS" \ + '. + {"artillery-no-header-burst": $s}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + # =========================================================== + # Summary + # =========================================================== + echo "" + echo "============================================================" + echo " Original Traffic Validation Summary" + echo "============================================================" + + jq --arg o "$([ "$OVERALL_PASS" = "true" ] && echo pass || echo fail)" \ + '. + {"overall": $o}' \ + /tmp/orig-summary.json > /tmp/orig-summary-tmp.json + mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json + + cat /tmp/orig-summary.json | jq '.' + cat /tmp/orig-summary.json | tee /tekton/results/original-traffic-summary + + if [ "$OVERALL_PASS" = "false" ]; then + echo "" + echo "FAILED: Original traffic was disrupted while intercepts were active." + exit 1 + fi + + echo "" + echo "PASSED: Original traffic unaffected by active intercepts." +- apiVersion: tekton.dev/v1 + kind: TaskRun + metadata: + annotations: + pipeline.tekton.dev/release: fcba522 + tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 + creationTimestamp: "2026-09-28T03:16:45Z" + generation: 1 + labels: + app.kubernetes.io/managed-by: tekton-pipelines + app.kubernetes.io/part-of: tekton-job-standardization + app.kubernetes.io/version: 1.0.0 + tekton.dev/memberOf: tasks + tekton.dev/pipeline: stack-pr-test + tekton.dev/pipelineRun: stackrun-pr-27exw + tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b + tekton.dev/pipelineTask: validate-propagation + tekton.dev/task: validate-stack-propagation + tektondag.io/stackrun: stackrun-pr-27exw + name: stackrun-pr-27exw-validate-propagation + namespace: tekton-pipelines + ownerReferences: + - apiVersion: tekton.dev/v1 + blockOwnerDeletion: true + controller: true + kind: PipelineRun + name: stackrun-pr-27exw + uid: d2f2e66b-d560-4909-b6ad-f89191524e1b + resourceVersion: "13256" + uid: 3537be13-4e47-4a45-91a9-e1685d434007 + spec: + params: + - name: stack-json + value: | + {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + - name: propagation-chain + value: | + demo-fe release-lifecycle-demo demo-api + - name: build-apps + value: demo-fe + - name: intercept-header-value + value: x-dev-session:pr-903 + - name: deployed-pods + value: | + { + "demo-fe": "pr-demo-fe-1790565353" + } + serviceAccountName: tekton-pr-sa + taskRef: + kind: Task + name: validate-stack-propagation + timeout: 1h0m0s + status: + artifacts: {} + completionTime: "2026-09-28T03:16:51Z" + conditions: + - lastTransitionTime: "2026-09-28T03:16:51Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: stackrun-pr-27exw-validate-propagation-pod + provenance: + featureFlags: + awaitSidecarReadiness: true + coschedule: disabled + enableAPIFields: beta + enableProvenanceInStatus: true + enforceNonfalsifiability: none + maxResultSize: 4096 + resultExtractionMethod: termination-message + runningInEnvWithInjectedSidecars: true + verificationNoMatchPolicy: ignore + startTime: "2026-09-28T03:16:45Z" + steps: + - container: step-validate + imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 + name: validate + provenance: {} + terminated: + containerID: containerd://602973402dcb5a72a08d1cf9c3ce9a00c7d7c424f80ff394201939858f43fede + exitCode: 0 + finishedAt: "2026-09-28T03:16:50Z" + reason: Completed + startedAt: "2026-09-28T03:16:49Z" + terminationReason: Completed + taskSpec: + description: | + Fail-closed check that the original override header is transferred hop-to-hop up to the intercepted app(s). A rewritten or dropped value (e.g. pr-42 → local-debug) fails the task: intercepts only match the original session. + The header only needs to propagate from the entry point UP TO the intercepted app. Beyond the intercept, downstream calls are normal — there's no Telepresence intercept on those services to match on, so the header doesn't need to be there. + Example: A(originator) → B(forwarder) → C(terminal), D(terminal) + If B is intercepted: + - Header must reach B (A originates → B receives via Telepresence) + - B's calls to C and D are normal calls to normal deployments + - C and D do NOT need the header — no intercept to match + If C is intercepted: + - Header must reach C (A originates → B forwards → C receives) + - D is untouched + If B AND C are intercepted: + - Header must reach B AND continue to C + - B must forward because there's another intercept downstream + params: + - description: Full stack graph JSON + name: stack-json + type: string + - description: Space-separated ordered list of apps in the chain + name: propagation-chain + type: string + - default: "" + description: Space-separated list of intercepted apps + name: build-apps + type: string + - description: Header value used for intercepts (e.g. x-dev-session:pr-42) + name: intercept-header-value + type: string + - default: staging + name: default-namespace + type: string + - default: "" + description: | + JSON map app -> PR pod name from deploy-intercepts. When non-empty the + task also proves routing: a header-matched request must be served by + that PR pod and an unmatched request must not be (read from the pod's + access log through the Kubernetes API). + name: deployed-pods + type: string + steps: + - computeResources: {} + image: alpine:3.19 + name: validate + script: | + #!/bin/sh + set -e + apk add --no-cache curl jq >/dev/null 2>&1 + + STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} + ' + CHAIN="demo-fe release-lifecycle-demo demo-api + " + BUILD_APPS="demo-fe" + INTERCEPT="x-dev-session:pr-903" + DEFAULT_NS="staging" + + HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') + BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') + + HEADER_VAL="" + if [ -n "$INTERCEPT" ]; then + HEADER_VAL=$(echo "$INTERCEPT" | cut -d: -f2-) + fi + + COUNT=0 + for APP in $CHAIN; do COUNT=$((COUNT + 1)); done + + # Find the deepest intercepted app in the chain + # Header only needs to propagate up to this point + DEEPEST_INTERCEPT_POS=0 + POS=0 + for APP in $CHAIN; do + POS=$((POS + 1)) + for BA in $BUILD_APPS; do + if [ "$BA" = "$APP" ]; then + DEEPEST_INTERCEPT_POS=$POS + fi + done + done + + echo "=============================================" + echo " Stack Propagation Validation" + echo "=============================================" + echo " Chain: $CHAIN" + echo " Header: $HEADER_NAME = $HEADER_VAL" + echo " Baggage key: $BAGGAGE_KEY" + echo " Hop count: $COUNT" + echo " Intercepted: ${BUILD_APPS:-}" + echo " Deepest intercept: position $DEEPEST_INTERCEPT_POS of $COUNT" + echo "" + + # Show the propagation contract for each hop + echo " Propagation contract:" + HOP=0 + PAST_DEEPEST=false + for APP in $CHAIN; do + HOP=$((HOP + 1)) + PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then + PAST_DEEPEST=true + fi + + TAG="" + $IS_INTERCEPTED && TAG=" ** PR BUILD **" + + if $PAST_DEEPEST; then + echo " $HOP. $APP ($PROP_ROLE) → NORMAL call (no intercept downstream, header not required)" + else + case "$PROP_ROLE" in + originator) echo " $HOP. $APP ($PROP_ROLE)${TAG} → SETS header, sends to next hop" ;; + forwarder) + # Only needs to forward if there's another intercepted app downstream + HAS_DOWNSTREAM_INTERCEPT=false + CHECK_POS=0 + for C in $CHAIN; do + CHECK_POS=$((CHECK_POS + 1)) + if [ $CHECK_POS -gt $HOP ]; then + for BA in $BUILD_APPS; do + [ "$BA" = "$C" ] && HAS_DOWNSTREAM_INTERCEPT=true + done + fi + done + + if $IS_INTERCEPTED && ! $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, downstream calls are NORMAL (no forwarding needed)" + elif $IS_INTERCEPTED && $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, MUST FORWARD (intercepted app downstream)" + elif $HAS_DOWNSTREAM_INTERCEPT; then + echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, MUST FORWARD (intercepted app downstream)" + else + echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, downstream calls NORMAL" + fi + ;; + terminal) echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header, END of chain" ;; + *) echo " $HOP. $APP ($PROP_ROLE)${TAG}" ;; + esac + fi + done + echo "" + + if [ "$COUNT" -le 1 ]; then + echo "Single-app stack — health check only." + ENTRY=$(echo $CHAIN | awk '{print $1}') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + URL="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}/propagation" + + echo " Health check: $URL" + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + --connect-timeout 10 --max-time 30 \ + "$URL" 2>/dev/null || echo "000") + + if [ "$HTTP_CODE" = "000" ]; then + echo " WARN: Service not reachable (may be expected in dry-run)" + elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then + echo " PASS: HTTP $HTTP_CODE" + else + echo " WARN: HTTP $HTTP_CODE (non-fatal for PR validation)" + fi + exit 0 + fi + + # Multi-hop validation — enter through the originator + ENTRY=$(echo $CHAIN | awk '{print $1}') + NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + BASE="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}" + TRACEPARENT="00-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 32)-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 16)-01" + + fetch_originator() { + body_file=$(mktemp) + http_code=$(curl -s -o "$body_file" -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + -H "traceparent: ${TRACEPARENT}" \ + --connect-timeout 10 --max-time 60 \ + "$1" 2>/dev/null || true) + [ -n "$http_code" ] || http_code="000" + printf '%s' "$http_code" > /tmp/originator-http-code + cat "$body_file" + rm -f "$body_file" + } + + URL="${BASE}/propagation" + echo "Sending test request to originator: $URL" + echo " Headers: ${HEADER_NAME}=${HEADER_VAL}, baggage=${BAGGAGE_KEY}=${HEADER_VAL}" + echo "" + + RESULT=$(fetch_originator "$URL") + HTTP_CODE=$(cat /tmp/originator-http-code 2>/dev/null || echo "000") + if [ "$HTTP_CODE" = "404" ] || [ "$HTTP_CODE" = "000" ] \ + || echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then + URL="${BASE}/" + echo " /propagation unavailable (HTTP $HTTP_CODE) — retrying $URL" + RESULT=$(fetch_originator "$URL") + fi + + echo "Response:" + echo "$RESULT" | jq '.' 2>/dev/null || echo "$RESULT" + echo "" + + FAILED=0 + + if echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then + echo "FAIL: originator unreachable — cannot prove hop-to-hop copy" + FAILED=1 + fi + + HEADER_FOUND=false + if [ -n "$HEADER_VAL" ] && printf '%s' "$RESULT" | grep -Fq "$HEADER_VAL"; then + HEADER_FOUND=true + fi + + REWRITTEN=false + REWRITE_VALS=$(printf '%s' "$RESULT" | jq -r ' + .. | objects + | (.session // .devSession // .headerValue // empty) + | select(type=="string" and . != "") + ' 2>/dev/null || true) + if [ -n "$HEADER_VAL" ] && [ -n "$REWRITE_VALS" ]; then + for SV in $REWRITE_VALS; do + if [ "$SV" != "$HEADER_VAL" ]; then + REWRITTEN=true + echo "FAIL: original override '$HEADER_VAL' was rewritten to '$SV'" + FAILED=1 + fi + done + fi + + if [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND; then + echo "FAIL: original override '$HEADER_VAL' missing from response" + FAILED=1 + fi + + echo "Hop-by-hop verification (fail-closed):" + HOP=0 + for APP in $CHAIN; do + HOP=$((HOP + 1)) + PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') + + IS_INTERCEPTED=false + for BA in $BUILD_APPS; do + [ "$BA" = "$APP" ] && IS_INTERCEPTED=true + done + + MARKER="" + $IS_INTERCEPTED && MARKER=" [INTERCEPTED]" + + REPO_BASE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '.apps[]|select(.name==$a)|.repo // ""' | awk -F/ '{print $NF}') + REACHED=false + echo "$RESULT" | grep -qi "$APP" && REACHED=true + if [ -n "$REPO_BASE" ]; then + echo "$RESULT" | grep -qi "$REPO_BASE" && REACHED=true + fi + + HOP_SESSION=$(printf '%s' "$RESULT" | jq -r --arg a "$APP" ' + [.. | objects | select((.app // .name // .service // "") | ascii_downcase | contains($a | ascii_downcase))] + | map(.session // .devSession // .headerValue // empty) + | map(select(. != "")) + | first // empty + ' 2>/dev/null || true) + + HEADER_REQUIRED=true + if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then + HEADER_REQUIRED=false + fi + + if ! $HEADER_REQUIRED; then + echo " HOP $HOP $APP ($PROP_ROLE): OK (beyond intercept — original override not required)" + elif ! $REACHED; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — NOT REACHED (header required at this hop)" + FAILED=1 + elif [ -n "$HOP_SESSION" ] && [ -n "$HEADER_VAL" ] && [ "$HOP_SESSION" != "$HEADER_VAL" ]; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — rewritten session='$HOP_SESSION' (expected '$HEADER_VAL')" + FAILED=1 + elif [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND && [ -z "$HOP_SESSION" ]; then + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — original override not confirmed" + FAILED=1 + else + echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: PASS — REACHED session=${HOP_SESSION:-$HEADER_VAL}" + fi + done + + echo "" + if [ "$FAILED" -ne 0 ]; then + echo "FAIL: original override was not transferred hop-to-hop" + exit 1 + fi + if $HEADER_FOUND; then + echo "PASS: original override '$HEADER_VAL' transferred hop-to-hop" + else + echo "PASS: hop-to-hop verification complete" + fi + echo "" + + # ------------------------------------------------------------------ + # Routing proof (fail-closed). The /propagation echo above is served + # identically by the baseline and the PR pod, so it cannot tell which + # pod answered. Prove it from the PR pod's own access log: a request + # tagged with a unique query string and carrying the header must show + # up there; an untagged-header request with a different tag must not. + # ------------------------------------------------------------------ + DEPLOYED_PODS='{ + "demo-fe": "pr-demo-fe-1790565353" + } + ' + if [ -n "$HEADER_VAL" ] && [ -n "$BUILD_APPS" ] \ + && [ -n "$DEPLOYED_PODS" ] && [ "$DEPLOYED_PODS" != "{}" ]; then + echo "Routing proof (fail-closed): PR pod must serve matched traffic only" + SA_DIR=/var/run/secrets/kubernetes.io/serviceaccount + API="https://kubernetes.default.svc" + pod_log() { + # $1 namespace, $2 pod. Prefer the app container; fall back to the + # pod default if that container name does not exist. + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?container=pr-component&sinceSeconds=600" || true) + if printf '%s' "$out" | grep -q '"kind":"Status"'; then + out=$(curl -s --cacert "$SA_DIR/ca.crt" \ + -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ + "$API/api/v1/namespaces/$1/pods/$2/log?sinceSeconds=600" || true) + fi + printf '%s' "$out" + } + for APP in $BUILD_APPS; do + POD=$(echo "$DEPLOYED_PODS" | jq -r --arg a "$APP" '.[$a] // empty') + if [ -z "$POD" ]; then + echo " $APP: FAIL — no PR pod recorded in deployed-pods" + FAILED=1 + continue + fi + NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ + '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') + SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ + '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') + SVC="http://${APP}.${NS}.svc.cluster.local:${SPORT}" + TAG=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12) + HIT="probehit${TAG}" + MISS="probemiss${TAG}" + + HIT_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + -H "${HEADER_NAME}: ${HEADER_VAL}" \ + -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${HIT}" 2>/dev/null || echo "000") + MISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ + --connect-timeout 10 --max-time 30 \ + "${SVC}/propagation?${MISS}" 2>/dev/null || echo "000") + echo " $APP -> $POD: matched request HTTP $HIT_CODE, unmatched request HTTP $MISS_CODE" + + LOG="" + ATTEMPT=0 + while [ $ATTEMPT -lt 10 ]; do + ATTEMPT=$((ATTEMPT + 1)) + LOG=$(pod_log "$NS" "$POD") + if printf '%s' "$LOG" | grep -q "$HIT"; then break; fi + sleep 2 + done + + if ! printf '%s' "$LOG" | grep -q "$HIT"; then + echo " $APP: FAIL — header-matched request never reached PR pod $POD (intercept is not routing)" + echo " --- last 20 log lines of $POD ---" + printf '%s\n' "$LOG" | tail -n 20 | sed 's/^/ /' + FAILED=1 + elif printf '%s' "$LOG" | grep -q "$MISS"; then + echo " $APP: FAIL — unmatched request also reached PR pod $POD (intercept steals all traffic)" + FAILED=1 + else + echo " $APP: PASS — PR pod $POD served the matched request and not the unmatched one" + fi + done + echo "" + if [ "$FAILED" -ne 0 ]; then + echo "FAIL: intercept routing not proven" + exit 1 + fi + echo "PASS: intercept routing proven from PR pod access logs" + echo "" + elif [ -n "$BUILD_APPS" ]; then + echo "Routing proof skipped: deployed-pods not provided" + echo "" + fi + + echo "Propagation validation complete." +kind: List +metadata: + resourceVersion: "" diff --git a/artifacts/intercept-e2e/trigger-bootstrap.json b/artifacts/intercept-e2e/trigger-bootstrap.json new file mode 100644 index 0000000..3e6f83d --- /dev/null +++ b/artifacts/intercept-e2e/trigger-bootstrap.json @@ -0,0 +1 @@ +{"mode":"bootstrap","pipelinerun":"stackrun-bootstrap-bhmj5","stackrun":"stackrun-bootstrap-bhmj5","status":"created"} diff --git a/artifacts/intercept-e2e/trigger-pr.json b/artifacts/intercept-e2e/trigger-pr.json new file mode 100644 index 0000000..0ccef5f --- /dev/null +++ b/artifacts/intercept-e2e/trigger-pr.json @@ -0,0 +1 @@ +{"mode":"pr","pipelinerun":"stackrun-pr-27exw","stackrun":"stackrun-pr-27exw","status":"created"} diff --git a/docs/intercept-backends.md b/docs/intercept-backends.md index 6fffceb..84d9a3d 100644 --- a/docs/intercept-backends.md +++ b/docs/intercept-backends.md @@ -93,11 +93,22 @@ plain RBAC gap and it needs no privileged client, no restart of the live Deployment, and no version coupling. Fixes in this PR: - The proxy pod runs as `mirrord-intercept` (ServiceAccount + namespace Role: - read pods/deployments/replicasets, create the agent Job), created by + read pods/deployments/replicasets, create the agent Job, **`get`/`create` + on `pods/portforward`**), created by `scripts/install-mirrord-intercept-rbac.sh`, which the runners call. -- The deploy step fails closed on the first mirrord error line, any restart, - or a proxy that is not serving (`restartPolicy: Never`; direct probe through - socat to the PR pod, or 30 s Running and error-free). + mirrord OSS reaches its agent through the Kubernetes port-forward API as a + WebSocket upgrade; without that verb the agent starts and the proxy dies + ~17 s later with `failed to switch protocol: 403 Forbidden`. Found on the + local kind cluster in two minutes, after a CI round-trip had missed it. +- The deploy step fails closed with a positive marker: `RUST_LOG=mirrord=info` + makes the proxy log `Created agent pod ... pod_name: "mirrord-agent-…"`; the + step requires that agent pod and the proxy to be Running, with zero + restarts and no fatal log line (`Failed to create/connect to the created + mirrord-agent`, `Forbidden`, `Error:`), still true 40 s after the agent + appeared. `restartPolicy: Never`. The proxy's own IP:port is not probed — + under the mirrord layer socat's listener is virtual. mirrord's + `ERROR mirrord::connection: failed to obtain machine ID` is non-fatal + telemetry noise and is ignored on purpose. - `validate-stack-propagation` adds a **routing proof**, fail-closed, per intercepted app: diff --git a/libs/tekton-dag-common/tests/test_m13_manifests.py b/libs/tekton-dag-common/tests/test_m13_manifests.py index c9edd06..6b7b46b 100644 --- a/libs/tekton-dag-common/tests/test_m13_manifests.py +++ b/libs/tekton-dag-common/tests/test_m13_manifests.py @@ -109,8 +109,16 @@ def test_mirrord_proxy_runs_as_own_service_account_and_fails_closed(): script = task["spec"]["steps"][0]["script"] assert "serviceAccountName: ${PROXY_SA}" in script assert "restartPolicy: Never" in script - assert "Failed to create mirrord-agent|Forbidden" in script + assert "Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden" in script assert "kubectl wait --for=condition=Ready \"pod/${PROXY_NAME}\"" not in script + # Positive marker: the agent pod named in the proxy log must be Running + # 40 s later. A generic 'ERROR mirrord' must NOT be treated as fatal + # (mirrord prints a non-fatal machine-ID telemetry ERROR). + assert "Created agent pod" in script + assert "-ge 40" in script + assert "grep -Eq 'ERROR mirrord" not in script + rbac = (ROOT / "scripts/install-mirrord-intercept-rbac.sh").read_text() + assert '"pods/portforward"' in rbac, "mirrord OSS connects to its agent via port-forward" def test_validate_propagation_proves_routing_from_pr_pod_log(): diff --git a/scripts/install-mirrord-intercept-rbac.sh b/scripts/install-mirrord-intercept-rbac.sh index ae4cf23..9c3915b 100755 --- a/scripts/install-mirrord-intercept-rbac.sh +++ b/scripts/install-mirrord-intercept-rbac.sh @@ -44,6 +44,13 @@ rules: - apiGroups: [""] resources: ["pods", "pods/log", "services", "endpoints"] verbs: ["get", "list", "watch"] + # mirrord OSS reaches its agent through the Kubernetes port-forward API + # (WebSocket upgrade on pods/portforward; the apiserver authorizes a + # WebSocket GET as verb "get", SPDY POST as "create"). Without this the + # agent starts and the proxy dies with "failed to switch protocol: 403". + - apiGroups: [""] + resources: ["pods/portforward"] + verbs: ["get", "create"] - apiGroups: ["apps"] resources: ["deployments", "replicasets", "statefulsets"] verbs: ["get", "list", "watch"] diff --git a/tasks/deploy-intercept-mirrord.yaml b/tasks/deploy-intercept-mirrord.yaml index 246d511..a9eb581 100644 --- a/tasks/deploy-intercept-mirrord.yaml +++ b/tasks/deploy-intercept-mirrord.yaml @@ -147,9 +147,20 @@ spec: PR_POD_IP=$(kubectl get pod "$POD_NAME" -n "$NS" -o jsonpath='{.status.podIP}') echo " PR pod ready: $POD_NAME (IP: $PR_POD_IP)" - # mirrord config: steal traffic matching header, target the deployment (original app) - HEADER_FILTER="${INTERCEPT}" - [ -z "$HEADER_FILTER" ] && HEADER_FILTER=".*" + # mirrord config: steal traffic matching header, target the deployment (original app). + # mirrord evaluates http_filter.header_filter as a regex against the + # string ": " (colon + space). The param is "name:value" + # with no space, so passing it verbatim never matched (2026-09-27, + # found on local kind). Build an anchored, case-insensitive filter. + if [ -n "$INTERCEPT" ]; then + HDR_NAME="${INTERCEPT%%:*}" + HDR_VAL="${INTERCEPT#*:}" + HDR_VAL="${HDR_VAL# }" + HEADER_FILTER="(?i)^${HDR_NAME}: ${HDR_VAL}\$" + else + HEADER_FILTER=".*" + fi + echo " mirrord header_filter: ${HEADER_FILTER}" MIRRORD_CONFIG=$(jq -n \ --arg path "deployment/${APP}" \ --arg ns "$NS" \ @@ -197,13 +208,16 @@ spec: env: - name: HOME value: /tmp - # No analytics: without this mirrord logs a benign - # "ERROR mirrord::connection: failed to obtain machine ID" that - # looks like a failure in the gate below. - name: MIRRORD_TELEMETRY value: "false" - name: MIRRORD_PROGRESS_MODE value: "off" + # INFO gives the gate below its positive marker: + # 'Created agent pod ... pod_name: "mirrord-agent-..."'. + # (mirrord still prints a non-fatal + # 'ERROR mirrord::connection: failed to obtain machine ID'.) + - name: RUST_LOG + value: "mirrord=info" - name: PR_POD_IP value: "${PR_POD_IP}" - name: CPORT @@ -223,62 +237,62 @@ spec: name: ${CM_NAME} PROXYPOD - # Fail closed. A Ready flicker is not proof: with no readiness probe a - # container is Ready the instant it runs, and mirrord exec can fail a - # second later. Require the proxy to (1) still be Running with zero - # restarts, (2) have no mirrord error in its log, and (3) actually - # serve: a request to the proxy's own IP:CPORT goes socat -> PR pod. + # Fail closed, with a positive marker. A Ready flicker is not proof: + # with no readiness probe a container is Ready the instant it runs, + # and mirrord exec can fail seconds later. Observed on kind: the + # proxy logs 'Created agent pod' at ~1s; without pods/portforward + # RBAC the WebSocket upgrade 403s at ~+17s and the agent gives up at + # ~+30s. So require: proxy Running, zero restarts, no fatal log + # line, the agent pod named in the proxy log Running, and all of + # that still true 40s after the agent pod was first seen. The + # proxy's own IP:port is NOT probed - under the mirrord layer socat's + # listener is virtual; routing is proven in validate-propagation. PROXY_OK=false - CODE="000" - RUNNING_SINCE=0 + AGENT_POD="" + AGENT_SEEN=0 DEADLINE=$(( $(date +%s) + 180 )) while [ "$(date +%s)" -lt "$DEADLINE" ]; do PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") - PROXY_IP=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.podIP}' 2>/dev/null || echo "") PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) # Fatal log lines only. A generic "ERROR mirrord::..." is not - # fatal (e.g. the machine-ID telemetry lookup); a real crash ends - # the process and, with restartPolicy Never, moves the pod to Failed. + # fatal (the machine-ID telemetry lookup); a real crash ends the + # process and, with restartPolicy Never, moves the pod to Failed. if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ - || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then + || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then break fi - if [ "$PHASE" = "Running" ] && [ -n "$PROXY_IP" ]; then - [ "$RUNNING_SINCE" -gt 0 ] || RUNNING_SINCE=$(date +%s) - CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 3 --max-time 10 \ - "http://${PROXY_IP}:${CPORT}/" 2>/dev/null || echo "000") - if [ "$CODE" = "200" ]; then - PROXY_OK=true + if [ -z "$AGENT_POD" ]; then + AGENT_POD=$(printf '%s' "$PROXY_LOG" | sed -n 's/.*Created agent pod.*pod_name: "\([^"]*\)".*/\1/p' | head -n 1) + [ -z "$AGENT_POD" ] || AGENT_SEEN=$(date +%s) + fi + if [ "$PHASE" = "Running" ] && [ -n "$AGENT_POD" ]; then + AGENT_PHASE=$(kubectl get "pod/${AGENT_POD}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") + if [ "$AGENT_PHASE" = "Failed" ] || [ "$AGENT_PHASE" = "Succeeded" ]; then break fi - # The mirrord layer may own socat's listener; accept a proxy that - # has stayed Running and error-free for 30s. validate-propagation - # still proves routing from the PR pod's own access log. - if [ $(( $(date +%s) - RUNNING_SINCE )) -ge 30 ]; then + if [ "$AGENT_PHASE" = "Running" ] && [ $(( $(date +%s) - AGENT_SEEN )) -ge 40 ]; then PROXY_OK=true break fi - else - RUNNING_SINCE=0 fi sleep 3 done if ! $PROXY_OK; then - echo "ERROR: mirrord proxy ${PROXY_NAME} is not serving (phase=${PHASE:-?} restarts=${RESTARTS:-?})" >&2 + echo "ERROR: mirrord proxy ${PROXY_NAME} did not establish an agent connection (proxy phase=${PHASE:-?} restarts=${RESTARTS:-?} agent=${AGENT_POD:-none} agent phase=${AGENT_PHASE:-?})" >&2 echo "--- proxy pod log ---" >&2 kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true echo "--- proxy pod describe ---" >&2 kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true echo "--- mirrord agent jobs/pods in $NS ---" >&2 kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true + if [ -n "$AGENT_POD" ]; then + echo "--- mirrord agent log (${AGENT_POD}) ---" >&2 + kubectl logs "pod/${AGENT_POD}" -n "$NS" --tail=-1 2>&1 | tail -n 60 >&2 || true + fi exit 1 fi - if [ "$CODE" = "200" ]; then - echo " Proxy ${PROXY_NAME} serving via socat -> PR pod (HTTP 200, 0 restarts)" - else - echo " Proxy ${PROXY_NAME} Running clean for 30s, 0 restarts (direct probe HTTP ${CODE}; routing is proven in validate-propagation)" - fi + echo " Proxy ${PROXY_NAME} connected to agent ${AGENT_POD}; both Running 40s, 0 restarts (routing is proven in validate-propagation)" echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" echo "" diff --git a/tasks/validate-original-traffic.yaml b/tasks/validate-original-traffic.yaml index 4217b26..bd6d72e 100644 --- a/tasks/validate-original-traffic.yaml +++ b/tasks/validate-original-traffic.yaml @@ -148,7 +148,7 @@ spec: echo "" echo " This request should flow through ALL original deployments." echo " Even intercepted apps should respond from their original pods" - echo " because no header matches the Telepresence intercept rule." + echo " because no header matches the mirrord intercept filter." echo "" PASSTHROUGH_RESULT=$(curl -s \ From 4864daf5192d0878f8925838718de219ca05aae8 Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 23:20:39 -0400 Subject: [PATCH 29/30] gitignore artifacts/: local E2E output is scratch, not source Co-authored-by: Cursor --- .gitignore | 1 + artifacts/intercept-e2e/final-resources.txt | 32 - .../intercept-e2e/final-staging-resources.txt | 14 - artifacts/intercept-e2e/port-forward.log | 5 - .../intercept-e2e/pr-pipeline-results.json | 20 - artifacts/intercept-e2e/pr-pipelinerun.yaml | 830 ---- artifacts/intercept-e2e/pr-pod-logs.txt | 540 --- artifacts/intercept-e2e/pr-stackrun.yaml | 37 - artifacts/intercept-e2e/pr-taskruns.yaml | 3712 ----------------- .../intercept-e2e/pr-traffic-evidence.log | 66 - artifacts/intercept-e2e/readyz.json | 1 - .../intercept-e2e/run-1-pipeline-results.json | 11 - .../intercept-e2e/run-1-pipelinerun.yaml | 482 --- artifacts/intercept-e2e/run-1-pod-logs.txt | 305 -- artifacts/intercept-e2e/run-1-stackrun.yaml | 33 - artifacts/intercept-e2e/run-1-taskruns.yaml | 1946 --------- .../intercept-e2e/run-2-pipeline-results.json | 20 - .../intercept-e2e/run-2-pipelinerun.yaml | 830 ---- artifacts/intercept-e2e/run-2-pod-logs.txt | 540 --- artifacts/intercept-e2e/run-2-stackrun.yaml | 37 - artifacts/intercept-e2e/run-2-taskruns.yaml | 3712 ----------------- .../intercept-e2e/trigger-bootstrap.json | 1 - artifacts/intercept-e2e/trigger-pr.json | 1 - 23 files changed, 1 insertion(+), 13175 deletions(-) delete mode 100644 artifacts/intercept-e2e/final-resources.txt delete mode 100644 artifacts/intercept-e2e/final-staging-resources.txt delete mode 100644 artifacts/intercept-e2e/port-forward.log delete mode 100644 artifacts/intercept-e2e/pr-pipeline-results.json delete mode 100644 artifacts/intercept-e2e/pr-pipelinerun.yaml delete mode 100644 artifacts/intercept-e2e/pr-pod-logs.txt delete mode 100644 artifacts/intercept-e2e/pr-stackrun.yaml delete mode 100644 artifacts/intercept-e2e/pr-taskruns.yaml delete mode 100644 artifacts/intercept-e2e/pr-traffic-evidence.log delete mode 100644 artifacts/intercept-e2e/readyz.json delete mode 100644 artifacts/intercept-e2e/run-1-pipeline-results.json delete mode 100644 artifacts/intercept-e2e/run-1-pipelinerun.yaml delete mode 100644 artifacts/intercept-e2e/run-1-pod-logs.txt delete mode 100644 artifacts/intercept-e2e/run-1-stackrun.yaml delete mode 100644 artifacts/intercept-e2e/run-1-taskruns.yaml delete mode 100644 artifacts/intercept-e2e/run-2-pipeline-results.json delete mode 100644 artifacts/intercept-e2e/run-2-pipelinerun.yaml delete mode 100644 artifacts/intercept-e2e/run-2-pod-logs.txt delete mode 100644 artifacts/intercept-e2e/run-2-stackrun.yaml delete mode 100644 artifacts/intercept-e2e/run-2-taskruns.yaml delete mode 100644 artifacts/intercept-e2e/trigger-bootstrap.json delete mode 100644 artifacts/intercept-e2e/trigger-pr.json diff --git a/.gitignore b/.gitignore index 924c0ea..2451b88 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ sample-repos/*/venv/ sample-repos/*/output/ sample-repos/*/.mvn/wrapper/maven-wrapper.jar docs/demos/media/ +artifacts/ diff --git a/artifacts/intercept-e2e/final-resources.txt b/artifacts/intercept-e2e/final-resources.txt deleted file mode 100644 index b90d536..0000000 --- a/artifacts/intercept-e2e/final-resources.txt +++ /dev/null @@ -1,32 +0,0 @@ -NAME MODE PIPELINERUN PHASE AGE -stackrun.tektondag.io/stackrun-bootstrap-bhmj5 bootstrap stackrun-bootstrap-bhmj5 Completed 5m36s -stackrun.tektondag.io/stackrun-pr-27exw pr stackrun-pr-27exw Completed 4m14s - -NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME -pipelinerun.tekton.dev/stackrun-bootstrap-bhmj5 True Completed 5m36s 4m14s -pipelinerun.tekton.dev/stackrun-pr-27exw True Completed 4m14s 23s - -NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-compile-maven True Succeeded 5m7s 4m39s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-compile-npm True Succeeded 5m7s 4m40s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-containerize True Succeeded 4m39s 4m20s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-build-select-tool-apps True Succeeded 5m14s 5m7s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-clone-app-repos True Succeeded 5m20s 5m14s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-deploy-full-stack True Succeeded 4m19s 4m15s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-fetch-source True Succeeded 5m34s 5m26s -taskrun.tekton.dev/stackrun-bootstrap-bhmj5-resolve-stack True Succeeded 5m26s 5m20s -taskrun.tekton.dev/stackrun-pr-27exw-build-compile-npm True Succeeded 3m40s 3m13s -taskrun.tekton.dev/stackrun-pr-27exw-build-containerize True Succeeded 3m13s 2m54s -taskrun.tekton.dev/stackrun-pr-27exw-build-select-tool-apps True Succeeded 3m47s 3m41s -taskrun.tekton.dev/stackrun-pr-27exw-cleanup True Succeeded 31s 23s -taskrun.tekton.dev/stackrun-pr-27exw-clone-app-repos True Succeeded 3m54s 3m48s -taskrun.tekton.dev/stackrun-pr-27exw-deploy-intercepts-mirrord True Succeeded 2m54s 2m3s -taskrun.tekton.dev/stackrun-pr-27exw-deploy-intercepts-result True Succeeded 2m3s 119s -taskrun.tekton.dev/stackrun-pr-27exw-fetch-source True Succeeded 4m10s 4m2s -taskrun.tekton.dev/stackrun-pr-27exw-post-pr-comment True Succeeded 31s 26s -taskrun.tekton.dev/stackrun-pr-27exw-pr-snapshot-tag True Succeeded 3m54s 3m49s -taskrun.tekton.dev/stackrun-pr-27exw-query-test-plan True Succeeded 71s 66s -taskrun.tekton.dev/stackrun-pr-27exw-resolve-stack True Succeeded 4m2s 3m55s -taskrun.tekton.dev/stackrun-pr-27exw-run-tests True Succeeded 66s 31s -taskrun.tekton.dev/stackrun-pr-27exw-validate-original-traffic True Succeeded 119s 71s -taskrun.tekton.dev/stackrun-pr-27exw-validate-propagation True Succeeded 119s 113s diff --git a/artifacts/intercept-e2e/final-staging-resources.txt b/artifacts/intercept-e2e/final-staging-resources.txt deleted file mode 100644 index 55331fe..0000000 --- a/artifacts/intercept-e2e/final-staging-resources.txt +++ /dev/null @@ -1,14 +0,0 @@ -NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES -pod/demo-api-7496dcb97b-jqllf 1/1 Running 0 31m 10.244.0.39 tekton-stack-control-plane -pod/demo-fe-6fb75c9d77-tmljz 1/1 Running 0 31m 10.244.0.37 tekton-stack-control-plane -pod/release-lifecycle-demo-5f59d66856-hds6g 1/1 Running 0 31m 10.244.0.38 tekton-stack-control-plane - -NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR -deployment.apps/demo-api 1/1 1 1 31m app localhost:5000/demo-api:base-1 app=demo-api -deployment.apps/demo-fe 1/1 1 1 31m app localhost:5000/demo-fe:base-1 app=demo-fe -deployment.apps/release-lifecycle-demo 1/1 1 1 31m app localhost:5000/release-lifecycle-demo:base-1 app=release-lifecycle-demo - -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR -service/demo-api ClusterIP 10.96.247.51 80/TCP 31m app=demo-api -service/demo-fe ClusterIP 10.96.126.232 80/TCP 31m app=demo-fe -service/release-lifecycle-demo ClusterIP 10.96.203.80 80/TCP 31m app=release-lifecycle-demo diff --git a/artifacts/intercept-e2e/port-forward.log b/artifacts/intercept-e2e/port-forward.log deleted file mode 100644 index 77364ef..0000000 --- a/artifacts/intercept-e2e/port-forward.log +++ /dev/null @@ -1,5 +0,0 @@ -Forwarding from 127.0.0.1:19091 -> 8080 -Forwarding from [::1]:19091 -> 8080 -Handling connection for 19091 -Handling connection for 19091 -Handling connection for 19091 diff --git a/artifacts/intercept-e2e/pr-pipeline-results.json b/artifacts/intercept-e2e/pr-pipeline-results.json deleted file mode 100644 index a07e2ee..0000000 --- a/artifacts/intercept-e2e/pr-pipeline-results.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "stackrun-pr-27exw", - "condition": { - "lastTransitionTime": "2026-09-28T03:18:21Z", - "message": "Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8", - "reason": "Completed", - "status": "True", - "type": "Succeeded" - }, - "results": [ - { - "name": "test-summary", - "value": "{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": \"pass\",\n \"demo-api\": \"pass\"\n}\n" - }, - { - "name": "original-traffic-summary", - "value": "{\n \"demo-fe\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": \"pass\",\n \"overall\": \"pass\"\n}\n" - } - ] -} diff --git a/artifacts/intercept-e2e/pr-pipelinerun.yaml b/artifacts/intercept-e2e/pr-pipelinerun.yaml deleted file mode 100644 index 58a5f6c..0000000 --- a/artifacts/intercept-e2e/pr-pipelinerun.yaml +++ /dev/null @@ -1,830 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: PipelineRun -metadata: - annotations: - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:30Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/pipeline: stack-pr-test - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw - namespace: tekton-pipelines - resourceVersion: "13751" - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b -spec: - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: git-revision - value: main - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: app-revisions - value: '{}' - - name: image-registry - value: localhost:5000 - - name: cache-repo - value: "" - - name: intercept-backend - value: mirrord - - name: dashboard-url - value: "" - - name: pr-repo-url - value: "" - - name: max-retries - value: "2" - pipelineRef: - name: stack-pr-test - taskRunTemplate: - serviceAccountName: tekton-pr-sa - timeouts: - pipeline: 2h0m0s - workspaces: - - name: shared-workspace - volumeClaimTemplate: - metadata: - creationTimestamp: null - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2Gi - status: {} - - name: ssh-key - secret: - secretName: ssh-key-secret - - name: build-cache - persistentVolumeClaim: - claimName: build-cache -status: - childReferences: - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-fetch-source - pipelineTaskName: fetch-source - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-resolve-stack - pipelineTaskName: resolve-stack - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-clone-app-repos - pipelineTaskName: clone-app-repos - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-pr-snapshot-tag - pipelineTaskName: pr-snapshot-tag - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-select-tool-apps - pipelineTaskName: build-select-tool-apps - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-compile-npm - pipelineTaskName: build-compile-npm - whenExpressions: - - input: "true" - operator: in - values: - - "true" - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-containerize - pipelineTaskName: build-containerize - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-deploy-intercepts-mirrord - pipelineTaskName: deploy-intercepts-mirrord - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-deploy-intercepts-result - pipelineTaskName: deploy-intercepts-result - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-validate-propagation - pipelineTaskName: validate-propagation - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-validate-original-traffic - pipelineTaskName: validate-original-traffic - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-query-test-plan - pipelineTaskName: query-test-plan - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-run-tests - pipelineTaskName: run-tests - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-cleanup - pipelineTaskName: cleanup - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-post-pr-comment - pipelineTaskName: post-pr-comment - completionTime: "2026-09-28T03:18:21Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:21Z" - message: 'Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8' - reason: Completed - status: "True" - type: Succeeded - finallyStartTime: "2026-09-28T03:18:14Z" - pipelineSpec: - description: | - PR testing pipeline. Uses the currently running apps in the cluster and only builds/replaces the one app being tested (changed-app). Other apps are left as-is; mirrord intercepts route PR traffic only to the new build. Tests one app at a time (changed-app is required when invoking this pipeline). 1. Clones platform repo and resolves the stack graph 2. Clones and builds ONLY the changed app (snapshot tag) — no build of other apps 3. Deploys intercepts only for that app; rest of stack keeps running as-is 4. Validates header propagation, runs test suites 5. Posts a PR comment; does **not** bump `versions.yaml` (snapshot image tags only) 6. Cleans up PR pods (always) PR builds use snapshot tagging so they are never confused with real releases. - finally: - - name: hook-post-test - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: cleanup - params: - - name: deployed-pods - value: $(tasks.deploy-intercepts-result.results.deployed-pods) - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: intercept-backend - value: mirrord - taskRef: - kind: Task - name: cleanup-stack-pods - - name: post-pr-comment - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: pr-repo-url - value: "" - - name: pr-number - value: "903" - - name: pipeline-run-name - value: stackrun-pr-27exw - - name: namespace - value: tekton-pipelines - - name: status - value: Completed - - name: test-summary - value: $(tasks.run-tests.results.test-summary) - - name: dashboard-url - value: "" - - name: github-secret-name - value: github-token - taskRef: - kind: Task - name: post-pr-comment - params: - - description: Platform repo URL (e.g. tekton-dag) — has stacks/, versions; app - repos are cloned separately from stack - name: git-url - type: string - - description: Branch, tag, or SHA for platform repo and (unless overridden) app - repos - name: git-revision - type: string - - default: stacks/stack-one.yaml - description: Path to the stack YAML relative to repo root - name: stack-file - type: string - - default: "" - description: App being tested (required). Only this app is built and given an - intercept; other apps use existing cluster deployments. - name: changed-app - type: string - - description: PR number - name: pr-number - type: string - - default: '{}' - description: Optional JSON map app → revision for cloning app repos (e.g. {"demo-fe":"pr-branch"}). - Used when the PR is in the app repo so the changed app is checked out at its - PR branch. - name: app-revisions - type: string - - description: Container registry base (e.g. 123456.dkr.ecr.us-east-1.amazonaws.com) - name: image-registry - type: string - - default: '{}' - description: JSON map of app → version overrides (empty = use versions.yaml) - name: version-overrides - type: string - - default: ubuntu:22.04 - description: Pre-built image for npm compile - name: compile-image-npm - type: string - - default: ubuntu:22.04 - description: Pre-built image for Maven compile - name: compile-image-maven - type: string - - default: ubuntu:22.04 - description: Pre-built image for Gradle compile - name: compile-image-gradle - type: string - - default: ubuntu:22.04 - description: Pre-built image for pip compile - name: compile-image-pip - type: string - - default: ubuntu:22.04 - description: Pre-built image for Composer/PHP compile - name: compile-image-php - type: string - - default: localhost:5000/tekton-dag-build-mirrord:latest - description: Pre-built image for mirrord proxy pods (M7) - name: compile-image-mirrord - type: string - - default: mirrord - description: Intercept backend. Only mirrord is implemented; the param is kept - for API compatibility. - name: intercept-backend - type: string - - default: "" - description: Base URL of Tekton Dashboard; PR comment will include link to this - run (optional) - name: dashboard-url - type: string - - default: github-token - description: 'Kubernetes secret name for GitHub token (key: token) when posting - PR comments' - name: github-secret-name - type: string - - default: "" - description: When PR is in the app repo, pass the app repo URL here so the PR - comment is posted to the correct repo; empty = use git-url (platform repo) - name: pr-repo-url - type: string - - default: "" - description: Kaniko cache repo. Empty disables cache. - name: cache-repo - type: string - - default: "0" - description: Max concurrent Kaniko pods for containerize. 0 = unlimited. - name: max-parallel-builds - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after clone, before compile (e.g. - code-gen, license-scan). - name: pre-build-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after containerize, before deploy - (e.g. image-scan, SBOM). - name: post-build-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after deploy, before tests (e.g. - seed-data). - name: pre-test-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run in finally block after tests (e.g. - slack-notify). - name: post-test-task - type: string - - default: "2" - description: | - Preferred retry count for infrastructure-sensitive tasks (compile/containerize). Pipeline tasks use a fixed retries: 2 for those steps; test tasks stay at 0. Orchestrator sets this param from MAX_RETRIES / request body for auditability. - name: max-retries - type: string - results: - - description: "" - name: test-summary - value: $(tasks.run-tests.results.test-summary) - - description: "" - name: original-traffic-summary - value: $(tasks.validate-original-traffic.results.original-traffic-summary) - tasks: - - name: fetch-source - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - taskRef: - kind: Task - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - - name: resolve-stack - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: version-overrides - value: '{}' - runAfter: - - fetch-source - taskRef: - kind: Task - name: resolve-stack - workspaces: - - name: source - workspace: shared-workspace - - name: clone-app-repos - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: git-revision - value: main - - name: app-revisions - value: '{}' - runAfter: - - resolve-stack - taskRef: - kind: Task - name: clone-app-repos - workspaces: - - name: source - workspace: shared-workspace - - name: ssh-key - workspace: ssh-key - - name: pr-snapshot-tag - params: - - name: snapshot-tag - value: stackrun-pr-27exw - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - runAfter: - - resolve-stack - taskRef: - kind: Task - name: pr-snapshot-tag - - name: build-select-tool-apps - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - runAfter: - - clone-app-repos - - pr-snapshot-tag - taskRef: - kind: Task - name: build-select-tool-apps - workspaces: - - name: source - workspace: shared-workspace - - name: hook-pre-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - runAfter: - - build-select-tool-apps - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: build-compile-npm - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-npm - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-npm - when: - - input: $(tasks.resolve-stack.results.run-compile-npm) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-maven - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-maven - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-maven - when: - - input: $(tasks.resolve-stack.results.run-compile-maven) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-gradle - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-gradle - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-gradle - when: - - input: $(tasks.resolve-stack.results.run-compile-gradle) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-pip - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-pip - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-pip - when: - - input: $(tasks.resolve-stack.results.run-compile-pip) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-composer - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-php - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-composer - when: - - input: $(tasks.resolve-stack.results.run-compile-composer) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-containerize - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - - name: image-tag - value: $(tasks.pr-snapshot-tag.results.snapshot-versions) - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - retries: 2 - runAfter: - - build-compile-npm - - build-compile-maven - - build-compile-gradle - - build-compile-pip - - build-compile-composer - taskRef: - kind: Task - name: build-containerize - workspaces: - - name: source - workspace: shared-workspace - - name: hook-post-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: image-registry - value: localhost:5000 - runAfter: - - build-containerize - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: deploy-intercepts-mirrord - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: mirrord-image - value: localhost:5000/tekton-dag-build-mirrord:latest - runAfter: - - build-containerize - taskRef: - kind: Task - name: deploy-intercept-mirrord - workspaces: - - name: shared-workspace - workspace: shared-workspace - - name: deploy-intercepts-result - runAfter: - - deploy-intercepts-mirrord - taskRef: - kind: Task - name: deploy-intercepts-result - workspaces: - - name: shared-workspace - workspace: shared-workspace - - name: validate-propagation - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: deployed-pods - value: $(tasks.deploy-intercepts-result.results.deployed-pods) - runAfter: - - deploy-intercepts-result - taskRef: - kind: Task - name: validate-stack-propagation - - name: validate-original-traffic - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: entry-app - value: $(tasks.resolve-stack.results.entry-app) - runAfter: - - deploy-intercepts-result - taskRef: - kind: Task - name: validate-original-traffic - - name: hook-pre-test - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - runAfter: - - validate-propagation - - validate-original-traffic - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: query-test-plan - params: - - name: changed-app - value: demo-fe - runAfter: - - hook-pre-test - taskRef: - kind: Task - name: query-test-plan - - name: run-tests - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: app-list - value: $(tasks.resolve-stack.results.app-list) - - name: entry-app - value: $(tasks.resolve-stack.results.entry-app) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: tests-to-run - value: $(tasks.query-test-plan.results.tests-to-run) - - name: unmapped-area - value: $(tasks.query-test-plan.results.unmapped-area) - - name: apps-to-test - value: $(tasks.query-test-plan.results.apps-to-test) - runAfter: - - query-test-plan - taskRef: - kind: Task - name: run-stack-tests - workspaces: - - name: test-source - workspace: shared-workspace - workspaces: - - description: Shared PVC for source code and test data - name: shared-workspace - - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; - required for SSH pull - name: ssh-key - - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse - across runs. - name: build-cache - optional: true - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: test-summary - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: original-traffic-summary - value: | - { - "demo-fe": { - "health-check": "pass", - "http-code": "200" - }, - "release-lifecycle-demo": { - "health-check": "pass", - "http-code": "200" - }, - "demo-api": { - "health-check": "pass", - "http-code": "200" - }, - "e2e-no-header-passthrough": { - "status": "pass", - "http-code": "200" - }, - "artillery-no-header-burst": "pass", - "overall": "pass" - } - skippedTasks: - - name: hook-pre-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: build-compile-maven - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-gradle - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-pip - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-composer - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: hook-post-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: hook-pre-test - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: hook-post-test - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - startTime: "2026-09-28T03:14:30Z" diff --git a/artifacts/intercept-e2e/pr-pod-logs.txt b/artifacts/intercept-e2e/pr-pod-logs.txt deleted file mode 100644 index 39b2ad3..0000000 --- a/artifacts/intercept-e2e/pr-pod-logs.txt +++ /dev/null @@ -1,540 +0,0 @@ -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/prepare] 2026/09/28 03:14:58 Entrypoint initialization -[pod/stackrun-pr-27exw-query-test-plan-pod/place-scripts] 2026/09/28 03:17:34 Decoded script /tekton/scripts/script-0-c2df2 -[pod/stackrun-pr-27exw-resolve-stack-pod/prepare] 2026/09/28 03:14:43 Entrypoint initialization -[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization -[pod/stackrun-pr-27exw-build-compile-npm-pod/place-scripts] 2026/09/28 03:15:06 Decoded script /tekton/scripts/script-0-8kkrq -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Apps: demo-fe -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] PVC: pvc-c91a6da3ac -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cache: disabled -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Max parallel: 0 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Containerize: demo-fe -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565334 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:stackrun-pr-27exw -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:stackrun-pr-27exw -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565334 created -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] --- Waiting for final batch --- -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565334 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565334: Succeeded -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565334" deleted from tekton-pipelines namespace -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Built images: -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord Intercept Deployment -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Build apps: demo-fe -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept header: x-dev-session:pr-903 -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Namespace: staging -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying intercept: demo-fe -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying PR pod: pr-demo-fe-1790565353 in staging -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Baggage: role=originator header=x-dev-session -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 condition met -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] PR pod ready: pr-demo-fe-1790565353 (IP: 10.244.0.128) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord header_filter: (?i)^x-dev-session: pr-903$ -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] configmap/mirrord-config-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying mirrord proxy: mirrord-proxy-demo-fe-1790565353 -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/mirrord-proxy-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Proxy mirrord-proxy-demo-fe-1790565353 connected to agent mirrord-agent-iqefckhppq-9cpf8; both Running 40s, 0 restarts (routing is proven in validate-propagation) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept active for demo-fe (traffic with header -> PR pod pr-demo-fe-1790565353) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] { -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] "demo-fe": "pr-demo-fe-1790565353" -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] } -[pod/stackrun-pr-27exw-cleanup-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/prepare] 2026/09/28 03:15:50 Entrypoint initialization -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/place-scripts] 2026/09/28 03:16:42 Decoded script /tekton/scripts/script-0-n9wmm -[pod/stackrun-pr-27exw-fetch-source-pod/prepare] 2026/09/28 03:14:38 Entrypoint initialization -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' true '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cleandir -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.6958718,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.7070696,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cd /workspace/output/ -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git rev-parse HEAD -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + EXIT_CODE=0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 1790468109 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (1/2) Installing oniguruma (6.9.9-r0) -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (2/2) Installing jq (1.7.1-r0) -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Executing busybox-1.36.1-r20.trigger -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] OK: 9 MiB in 17 packages -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] {"demo-fe":"stackrun-pr-27exw"} -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Snapshot tag map: {"demo-fe":"stackrun-pr-27exw"} -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization -[pod/stackrun-pr-27exw-build-containerize-pod/prepare] 2026/09/28 03:15:31 Entrypoint initialization -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Done: demo-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/place-scripts] 2026/09/28 03:16:47 Decoded script /tekton/scripts/script-0-crgzs -[pod/stackrun-pr-27exw-clone-app-repos-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-5g7lz -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] Querying test plan: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=demo-fe&radius=1 -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] {"error":"orchestrator unreachable"} -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] WARN: test-plan query failed; will run all tests -[pod/stackrun-pr-27exw-build-compile-npm-pod/prepare] 2026/09/28 03:15:05 Entrypoint initialization -[pod/stackrun-pr-27exw-cleanup-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-c5pss -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Resolved versions: -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] { -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] } -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] x-dev-session:pr-903 -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] truefalsefalsefalsefalse -[pod/stackrun-pr-27exw-validate-original-traffic-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization -[pod/stackrun-pr-27exw-validate-propagation-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] Wrote deployed-pods to result: { -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] "demo-fe": "pr-demo-fe-1790565353" -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] } -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-lw67t -[pod/stackrun-pr-27exw-clone-app-repos-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/place-scripts] 2026/09/28 03:15:51 Decoded script /tekton/scripts/script-0-z777r -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/prepare] 2026/09/28 03:16:41 Entrypoint initialization -[pod/stackrun-pr-27exw-post-pr-comment-pod/step-post-comment] No GITHUB_TOKEN secret; skipping PR comment. -[pod/stackrun-pr-27exw-query-test-plan-pod/prepare] 2026/09/28 03:17:33 Entrypoint initialization -[pod/stackrun-pr-27exw-resolve-stack-pod/place-scripts] 2026/09/28 03:14:44 Decoded script /tekton/scripts/script-0-89bp6 -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 776ms -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] run `npm fund` for details -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix --force -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > vite build -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] transforming... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] rendering chunks... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] computing gzip size... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ built in 449ms -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Compile (npm) done. -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json -[pod/stackrun-pr-27exw-post-pr-comment-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization -[pod/stackrun-pr-27exw-post-pr-comment-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-h6gz2 -[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
-[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Stack Propagation Validation -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Header: x-dev-session = pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Baggage key: dev-session -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop count: 3 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Intercepted: demo-fe -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Deepest intercept: position 1 of 3 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation contract: -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 1. demo-fe (originator) ** PR BUILD ** → SETS header, sends to next hop -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 2. release-lifecycle-demo (forwarder) → NORMAL call (no intercept downstream, header not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 3. demo-api (terminal) → NORMAL call (no intercept downstream, header not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Sending test request to originator: http://demo-fe.staging.svc.cluster.local:80/propagation -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Headers: x-dev-session=pr-903, baggage=dev-session=pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Response: -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "app": "demo-fe", -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "session": "pr-903", -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "hops": [ -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "error": "HTTP Error 404: " -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop-by-hop verification (fail-closed): -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 1 demo-fe (originator) [INTERCEPTED]: PASS — REACHED session=pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 2 release-lifecycle-demo (forwarder): OK (beyond intercept — original override not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 3 demo-api (terminal): OK (beyond intercept — original override not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: original override 'pr-903' transferred hop-to-hop -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Routing proof (fail-closed): PR pod must serve matched traffic only -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe -> pr-demo-fe-1790565353: matched request HTTP 200, unmatched request HTTP 200 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe: PASS — PR pod pr-demo-fe-1790565353 served the matched request and not the unmatched one -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: intercept routing proven from PR pod access logs -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation validation complete. -[pod/stackrun-pr-27exw-build-containerize-pod/place-scripts] 2026/09/28 03:15:32 Decoded script /tekton/scripts/script-0-njrdt -[pod/stackrun-pr-27exw-fetch-source-pod/place-scripts] 2026/09/28 03:14:39 Decoded script /tekton/scripts/script-0-v9bbr -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Milestone 5: Original Traffic Validation -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] (intercepts are ACTIVE — these requests carry NO header) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Intercepted apps: demo-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Full chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry point: demo-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Expectation: every request WITHOUT the intercept header -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] reaches the ORIGINAL deployment, not the PR pod. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 1: Direct health check per service (no headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-fe: [INTERCEPTED — should still serve original on bare requests] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-fe.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] release-lifecycle-demo: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://release-lifecycle-demo.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-api: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-api.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 2: Full-chain passthrough (no intercept headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry URL: http://demo-fe.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: (no x-dev-session, no baggage) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] This request should flow through ALL original deployments. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Even intercepted apps should respond from their original pods -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] because no header matches the Telepresence intercept rule. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Response: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] tekton-dag-vue-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate]
-[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — full chain responding without headers -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 3: Artillery load burst (no intercept headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Short burst against entry point — no headers. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Confirms sustained original-traffic handling during intercept. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Test run id: tmxfc_9p9rm93yn875ngqdk84ekm5mdxf9g_jrkn -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase started: Burst without intercept headers (index: 0, duration: 10s) 03:17:21(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase completed: Burst without intercept headers (index: 0, duration: 10s) 03:17:31(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:30(+0000) (width: 7.202s) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 15240 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 5/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 2.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:40(+0000) (width: 1.204s) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 3810 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 3.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] All VUs finished. Total time: 10 seconds -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Summary report @ 03:17:32(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 19050 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Artillery burst: PASS -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Original Traffic Validation Summary -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASSED: Original traffic unaffected by active intercepts. -[pod/stackrun-pr-27exw-validate-propagation-pod/place-scripts] 2026/09/28 03:16:46 Decoded script /tekton/scripts/script-0-vmphb -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:14:59 Decoded script /tekton/scripts/script-0-pfvfz -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup: removing PR pods -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Deleting pod/pr-demo-fe-1790565353 in staging -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "pr-demo-fe-1790565353" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning orphaned pr-test pods... -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-proxy-demo-fe-1790565353" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning mirrord agent and proxy pods... -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-agent-iqefckhppq-9cpf8" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] No resources found -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup complete. diff --git a/artifacts/intercept-e2e/pr-stackrun.yaml b/artifacts/intercept-e2e/pr-stackrun.yaml deleted file mode 100644 index 3bfe20f..0000000 --- a/artifacts/intercept-e2e/pr-stackrun.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: tektondag.io/v1alpha1 -kind: StackRun -metadata: - creationTimestamp: "2026-09-28T03:14:30Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - tektondag.io/mode: pr - name: stackrun-pr-27exw - namespace: tekton-pipelines - resourceVersion: "13752" - uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 -spec: - appRevisions: '{}' - cacheRepo: "" - changedApp: demo-fe - gitRevision: main - gitUrl: https://github.com/jmjava/tekton-dag.git - imageRegistry: localhost:5000 - interceptBackend: mirrord - maxRetries: 2 - mode: pr - prNumber: 903 - stackFile: stacks/stack-one.yaml - stackRef: stack-one - timeout: 2h -status: - conditions: - - lastTransitionTime: "2026-09-28T03:14:30Z" - message: PipelineRun stackrun-pr-27exw phase=Completed - observedGeneration: 1 - reason: Completed - status: "False" - type: Ready - observedGeneration: 1 - phase: Completed - pipelineRunName: stackrun-pr-27exw diff --git a/artifacts/intercept-e2e/pr-taskruns.yaml b/artifacts/intercept-e2e/pr-taskruns.yaml deleted file mode 100644 index f61902f..0000000 --- a/artifacts/intercept-e2e/pr-taskruns.yaml +++ /dev/null @@ -1,3712 +0,0 @@ -apiVersion: v1 -items: -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:04Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-compile-npm - tekton.dev/task: build-compile-npm - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-compile-npm - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12743" - uid: fdda3572-535a-4387-8b26-7248c7df0428 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: compile-image-npm - value: ubuntu:22.04 - retries: 2 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-compile-npm - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - - name: build-cache - persistentVolumeClaim: - claimName: build-cache - status: - artifacts: {} - completionTime: "2026-09-28T03:15:31Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:31Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-compile-npm-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:15:04Z" - steps: - - container: step-compile-npm - imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 - name: compile-npm - provenance: {} - terminated: - containerID: containerd://43ce915d1a0a09e87dcad9297d5ee92597300ec9fd1f6b19481e001c679eb5df - exitCode: 0 - finishedAt: "2026-09-28T03:15:30Z" - reason: Completed - startedAt: "2026-09-28T03:15:10Z" - terminationReason: Completed - taskSpec: - description: Runs npm compile for apps in .tool-apps.json (invoked only when - build-apps include npm). - params: - - name: stack-json - type: string - - default: ubuntu:22.04 - name: compile-image-npm - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: COMPILE_IMAGE - value: ubuntu:22.04 - image: ubuntu:22.04 - name: compile-npm - script: | - #!/usr/bin/env bash - set -e - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi - [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" - APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) - [ -z "$APPS" ] && echo "No npm apps" && exit 0 - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 - fi - for APP in $APPS; do - echo "=== Compile (npm): $APP ===" - CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') - PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') - POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') - CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') - APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" - [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - cd "$APP_DIR" - [ -n "$PRE_CMD" ] && eval "$PRE_CMD" - if [ -n "$CMD" ]; then - RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') - eval "$RUN_CMD" - else - [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present - fi - [ -n "$POST_CMD" ] && eval "$POST_CMD" - done - echo "Compile (npm) done." - workingDir: /workspace/source - workspaces: - - name: source - - name: build-cache - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:31Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-containerize - tekton.dev/task: build-containerize - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-containerize - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12863" - uid: 23bcfc3f-1b78-4504-bb52-697f12eee6cc - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: image-registry - value: localhost:5000 - - name: image-tag - value: '{"demo-fe":"stackrun-pr-27exw"}' - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - retries: 2 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-containerize - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:15:50Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:50Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-containerize-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: built-images - type: string - value: | - { - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - startTime: "2026-09-28T03:15:31Z" - steps: - - container: step-containerize - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: containerize - provenance: {} - terminated: - containerID: containerd://aade96dbc2d6995b603ef23548575566ef8e30f4bc14971b2e0a370689799f08 - exitCode: 0 - finishedAt: "2026-09-28T03:15:49Z" - message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:stackrun-pr-27exw\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:15:34Z" - terminationReason: Completed - taskSpec: - description: | - Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. - params: - - name: stack-json - type: string - - name: build-apps - type: string - - name: image-registry - type: string - - name: image-tag - type: string - - default: pr- - name: tag-prefix - type: string - - default: "" - description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables - cache. - name: cache-repo - type: string - - default: "0" - description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). - name: max-parallel-builds - type: string - results: - - description: JSON map of app-name → full image URI - name: built-images - type: string - steps: - - computeResources: {} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: bitnami/kubectl:latest - name: containerize - script: | - #!/bin/bash - set -e - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - REGISTRY="localhost:5000" - IMAGE_TAG='{"demo-fe":"stackrun-pr-27exw"}' - TAG_PREFIX="" - CACHE_REPO="" - MAX_PARALLEL="0" - SOURCE_PVC="pvc-c91a6da3ac" - SOURCE_PATH="/workspace/source" - NS="$POD_NAMESPACE" - - PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') - PUSH_CACHE="" - if [ -n "$CACHE_REPO" ]; then - PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') - fi - - if [ -z "$SOURCE_PVC" ]; then - echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 - exit 1 - fi - - IS_JSON=false - case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac - - TS=$(date +%s) - - echo "=============================================" - echo " Parallel Containerize (Kaniko pods)" - echo "=============================================" - echo " Apps: $BUILD_APPS" - echo " PVC: $SOURCE_PVC" - echo " Cache: ${CACHE_REPO:-disabled}" - echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" - echo "" - - > /tmp/pod-list.txt - > /tmp/app-images.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - - wait_for_batch() { - local BATCH_FAILED="" - while IFS= read -r P; do - [ -z "$P" ] && continue - echo " Waiting: $P" >&2 - while true; do - PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") - case "$PH" in - Succeeded) echo " $P: Succeeded" >&2; break ;; - Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; - *) sleep 5 ;; - esac - done - done < /tmp/batch-pods.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - echo "$BATCH_FAILED" - } - - FAILED="" - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Containerize: $APP" - echo "=========================================" - - if $IS_JSON; then - APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) - [ -z "$APP_VER" ] && APP_VER="latest" - TAG="${TAG_PREFIX}${APP_VER}" - else - TAG="${TAG_PREFIX}${IMAGE_TAG}" - fi - - CONTEXT_PATH="${SOURCE_PATH}/${APP}" - FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" - PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" - PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" - - if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then - echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - continue - fi - - KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" - if [ -n "$PUSH_CACHE" ]; then - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" - else - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" - fi - KANIKO_ARGS="${KANIKO_ARGS}]" - - POD_NAME="kaniko-${APP}-${TS}" - echo " Launching: $POD_NAME" - echo " Push to: $PUSH_IMAGE" - echo " Pull as: $PULL_IMAGE" - - cat <> /tmp/pod-list.txt - echo "$POD_NAME" >> /tmp/batch-pods.txt - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - BATCH_COUNT=$((BATCH_COUNT + 1)) - echo "" - - if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then - echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - done - - if [ -s /tmp/batch-pods.txt ]; then - echo " --- Waiting for final batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - - echo "" - echo " Cleaning up Kaniko pods..." - while IFS= read -r POD_NAME; do - [ -z "$POD_NAME" ] && continue - kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & - done < /tmp/pod-list.txt - wait - - if [ -n "$FAILED" ]; then - echo "FAILED: Kaniko pods failed:$FAILED" >&2 - for P in $FAILED; do - echo "--- Logs for $P ---" - kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true - done - exit 1 - fi - - > /tmp/parts.txt - while IFS='=' read -r APP IMG; do - [ -z "$APP" ] && continue - echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt - done < /tmp/app-images.txt - - TOTAL=$(wc -l < /tmp/parts.txt) - COUNT=0 - echo '{' > /tmp/built.json - while IFS= read -r line; do - COUNT=$((COUNT + 1)) - if [ "$COUNT" -lt "$TOTAL" ]; then - echo "${line}," >> /tmp/built.json - else - echo "${line}" >> /tmp/built.json - fi - done < /tmp/parts.txt - echo '}' >> /tmp/built.json - - echo "" - echo " Built images:" - cat /tmp/built.json - cat /tmp/built.json | tee /tekton/results/built-images - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:57Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-select-tool-apps - tekton.dev/task: build-select-tool-apps - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-select-tool-apps - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12598" - uid: 7fd8c6db-96f9-422b-886c-0619452f5c67 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-select-tool-apps - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:15:03Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:03Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-select-tool-apps-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:14:57Z" - steps: - - container: step-select-tool-apps - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: select-tool-apps - provenance: {} - terminated: - containerID: containerd://e9ec0062367c667f256c7db155c97349e621a9c9909ce13cf4d98312986afd29 - exitCode: 0 - finishedAt: "2026-09-28T03:15:02Z" - reason: Completed - startedAt: "2026-09-28T03:15:02Z" - terminationReason: Completed - taskSpec: - description: Writes .tool-apps.json from stack-json and build-apps; used by - conditional compile tasks. - params: - - name: stack-json - type: string - - name: build-apps - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: BUILD_APPS - value: demo-fe - image: alpine:3.19 - name: select-tool-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" - for app in $BUILD_APPS; do - tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) NPM_APPS="$NPM_APPS $app" ;; - maven) MAVEN_APPS="$MAVEN_APPS $app" ;; - gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; - pip) PIP_APPS="$PIP_APPS $app" ;; - composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; - esac - done - jq -n \ - --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ - '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json - echo "Tool app lists written to .tool-apps.json" - workingDir: /workspace/source - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:18:13Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: finally - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: cleanup - tekton.dev/task: cleanup-stack-pods - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-cleanup - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13749" - uid: 01a6f20e-b5cb-4b58-a591-e4b2cfc4c69f - spec: - params: - - name: deployed-pods - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: intercept-backend - value: mirrord - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: cleanup-stack-pods - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:18:21Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:21Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-cleanup-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:18:13Z" - steps: - - container: step-cleanup - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: cleanup - provenance: {} - terminated: - containerID: containerd://ff60c3d658ef971f654359bc451a08191c9eed7c2eea50b35543cf4d37006564 - exitCode: 0 - finishedAt: "2026-09-28T03:18:20Z" - reason: Completed - startedAt: "2026-09-28T03:18:17Z" - terminationReason: Completed - taskSpec: - description: | - Cleans up all PR pods deployed for a stack pipeline run. Runs as a finally task so cleanup happens even on failure. - params: - - default: '{}' - description: JSON map of app → pod name (from deploy-stack-intercepts) - name: deployed-pods - type: string - - default: staging - name: default-namespace - type: string - - default: '{}' - name: stack-json - type: string - - default: telepresence - description: When mirrord, also delete mirrord agent and proxy pods - name: intercept-backend - type: string - steps: - - computeResources: {} - image: bitnami/kubectl:latest - name: cleanup - script: | - #!/bin/bash - set -e - - PODS='{ - "demo-fe": "pr-demo-fe-1790565353" - } - ' - DEFAULT_NS="staging" - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - INTERCEPT_BACKEND="mirrord" - - echo "=========================================" - echo " Cleanup: removing PR pods" - echo "=========================================" - - if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then - echo " No pods to clean up." - exit 0 - fi - - for APP in $(echo "$PODS" | jq -r 'keys[]'); do - POD=$(echo "$PODS" | jq -r --arg a "$APP" '.[$a]') - - NS="$DEFAULT_NS" - if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") - fi - - echo " Deleting pod/$POD in $NS" - kubectl delete pod "$POD" -n "$NS" --ignore-not-found=true - done - - # Also clean up any leftover pods from this pipeline - echo " Cleaning orphaned pr-test pods..." - kubectl delete pods -l managed-by=tekton-job-standardization \ - -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - - # When mirrord was used: remove mirrord agent and proxy pods in same namespace(s) - if [ "$INTERCEPT_BACKEND" = "mirrord" ]; then - echo " Cleaning mirrord agent and proxy pods..." - for APP in $(echo "$PODS" | jq -r 'keys[]'); do - NS="$DEFAULT_NS" - if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") - fi - kubectl delete pods -l app=mirrord -n "$NS" --ignore-not-found=true 2>/dev/null || true - kubectl delete pods -l app=mirrord-proxy -n "$NS" --ignore-not-found=true 2>/dev/null || true - done - # Fallback: delete in default namespace if no apps in PODS - if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then - kubectl delete pods -l app=mirrord -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - kubectl delete pods -l app=mirrord-proxy -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - fi - fi - - echo " Cleanup complete." -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: clone-app-repos - tekton.dev/task: clone-app-repos - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-clone-app-repos - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12529" - uid: 81533211-9697-469e-b476-bcea52ae3080 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: git-revision - value: main - - name: app-revisions - value: '{}' - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: clone-app-repos - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - - name: ssh-key - secret: - secretName: ssh-key-secret - status: - artifacts: {} - completionTime: "2026-09-28T03:14:56Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:56Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-clone-app-repos-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:14:50Z" - steps: - - container: step-clone-apps - imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f - name: clone-apps - provenance: {} - terminated: - containerID: containerd://5707f7167ce70a72e624d0bcdace677780459f7eb1c7acf0ab606075d565760b - exitCode: 0 - finishedAt: "2026-09-28T03:14:55Z" - reason: Completed - startedAt: "2026-09-28T03:14:54Z" - terminationReason: Completed - taskSpec: - description: | - Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. - params: - - description: Stack graph JSON (from resolve-stack) - name: stack-json - type: string - - description: Space-separated list of app names to clone - name: build-apps - type: string - - default: main - description: Branch or SHA to check out for app repos (default; overridden - by app-revisions per app) - name: git-revision - type: string - - default: '{}' - description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). - Used for PR builds where the changed app is checked out at its PR branch. - name: app-revisions - type: string - steps: - - computeResources: {} - image: alpine/git:latest - name: clone-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - DEFAULT_REVISION="main" - APP_REVISIONS='{}' - WORKSPACE="/workspace/source" - - # Clear existing app dirs so we get a fresh clone (no stale/cached content) - echo " Clearing existing app dirs..." - for APP in $BUILD_APPS; do - rm -rf "$WORKSPACE/$APP" - done - - # Prefer authenticated SSH when a key is present. Public repositories - # can be cloned over HTTPS from an empty Secret workspace. - mkdir -p /root/.ssh - chmod 700 /root/.ssh - KEY_DIR="/workspace/ssh-key" - CLONE_TRANSPORT=https - if [ -f "$KEY_DIR/id_ed25519" ]; then - cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 - chmod 600 /root/.ssh/id_ed25519 - CLONE_TRANSPORT=ssh - elif [ -f "$KEY_DIR/id_rsa" ]; then - cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa - chmod 600 /root/.ssh/id_rsa - CLONE_TRANSPORT=ssh - else - echo " No SSH key found; cloning public repositories over HTTPS" - fi - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true - fi - - # Clone all app repos in parallel (M7.1) - clone_app() { - local APP="$1" REPO="$2" REVISION="$3" URL="$4" - echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" - git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" - if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then - echo "ERROR: could not fetch $REVISION for $APP" >&2 - exit 1 - fi - git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD - echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" - echo " Done: $APP" - } - - PIDS="" - for APP in $BUILD_APPS; do - REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') - if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then - echo " WARN: No repo for app $APP in stack, skipping" - continue - fi - REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') - [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - URL="git@github.com:${REPO}.git" - else - URL="https://github.com/${REPO}.git" - fi - clone_app "$APP" "$REPO" "$REVISION" "$URL" & - PIDS="$PIDS $!" - done - - CLONE_FAILED=false - for PID in $PIDS; do - if ! wait "$PID"; then - CLONE_FAILED=true - fi - done - if [ "$CLONE_FAILED" = "true" ]; then - echo "ERROR: One or more clones failed" >&2 - exit 1 - fi - - echo "" - echo "App repos cloned (parallel). Listing:" - for APP in $BUILD_APPS; do - [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true - done - workingDir: /workspace/source - workspaces: - - description: Workspace with platform repo at root; app repos will be cloned - into source/ - name: source - - description: Volume that may contain id_ed25519 or id_rsa for private-repository - SSH clones - name: ssh-key -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: deploy-intercepts-mirrord - tekton.dev/task: deploy-intercept-mirrord - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-deploy-intercepts-mirrord - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13112" - uid: 9b6af9c4-b873-4957-92b4-e57095fbd860 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: built-images - value: | - { - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: mirrord-image - value: localhost:5000/tekton-dag-build-mirrord:latest - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: deploy-intercept-mirrord - timeout: 1h0m0s - workspaces: - - name: shared-workspace - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:16:41Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:41Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-deploy-intercepts-mirrord-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: deployed-pods - type: string - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - startTime: "2026-09-28T03:15:50Z" - steps: - - container: step-deploy - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: deploy - provenance: {} - terminated: - containerID: containerd://88587dcb06e8b0adec20ea28a8fb6e6b5d1c0894f1a9830b852865fb2cfa658e - exitCode: 0 - finishedAt: "2026-09-28T03:16:40Z" - message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:15:53Z" - terminationReason: Completed - taskSpec: - description: | - Deploys PR pods with mirrord-based intercepts (M7). For each built app: 1) Deploys a PR pod running only the built image (no Telepresence sidecar). 2) Deploys a mirrord-proxy pod that runs mirrord exec wrapping a socat proxy; - traffic matching the intercept header is stolen from the original deployment - and forwarded to the PR pod. Same interface as deploy-stack-intercepts; - use when intercept-backend=mirrord. - params: - - description: Full stack graph JSON (used to resolve ports, namespaces, topology) - name: stack-json - type: string - - description: Space-separated list of apps that were built (ONLY these get - intercepts) - name: build-apps - type: string - - default: "" - description: Full ordered chain from entry to leaf (for logging context) - name: propagation-chain - type: string - - description: JSON map of app → image URI - name: built-images - type: string - - description: Header match for mirrord (e.g. x-dev-session:pr-42) - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: localhost:5000/tekton-dag-build-mirrord:latest - description: Image for mirrord proxy pods (mirrord CLI + socat) - name: mirrord-image - type: string - - default: mirrord-intercept - description: | - ServiceAccount the proxy pod runs as. mirrord exec must read the target - Deployment and create the mirrord-agent Job; the default SA cannot. - Create it with scripts/install-mirrord-intercept-rbac.sh. - name: proxy-service-account - type: string - results: - - description: JSON map of app → pod name (PR pods) - name: deployed-pods - type: string - steps: - - computeResources: {} - image: bitnami/kubectl:latest - name: deploy - script: | - #!/bin/bash - set -e - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILT='{ - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - ' - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - MIRRORD_IMAGE="localhost:5000/tekton-dag-build-mirrord:latest" - PROXY_SA="mirrord-intercept" - DEPLOYED_PODS_FILE="/workspace/shared-workspace/deployed-pods.json" - - echo "=============================================" - echo " mirrord Intercept Deployment" - echo "=============================================" - echo " Build apps: $BUILD_APPS" - echo " Intercept header: $INTERCEPT" - echo " Namespace: $DEFAULT_NS" - echo "" - - echo '{}' > /tmp/pods.json - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Deploying intercept: $APP" - echo "=========================================" - - IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') - - TS=$(date +%s) - POD_NAME="pr-${APP}-${TS}" - PROXY_NAME="mirrord-proxy-${APP}-${TS}" - CM_NAME="mirrord-config-${APP}-${TS}" - - BAGGAGE_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a)) as $app | - ($app.downstream // []) as $down | - $app."propagation-role" // ( - if ($down|length)==0 then "terminal" - elif (($app.role // "")|ascii_downcase)=="frontend" then "originator" - else "forwarder" end) - ') - BAGGAGE_HEADER=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') - DOWNSTREAM_URL=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a) | .downstream // []) as $down | - if ($down|length)>0 then "http://" + ($down[0]|tostring) else empty end - ') - - echo " Deploying PR pod: $POD_NAME in $NS" - echo " Baggage: role=$BAGGAGE_ROLE header=$BAGGAGE_HEADER" - cat <: " (colon + space). The param is "name:value" - # with no space, so passing it verbatim never matched (2026-09-27, - # found on local kind). Build an anchored, case-insensitive filter. - if [ -n "$INTERCEPT" ]; then - HDR_NAME="${INTERCEPT%%:*}" - HDR_VAL="${INTERCEPT#*:}" - HDR_VAL="${HDR_VAL# }" - HEADER_FILTER="(?i)^${HDR_NAME}: ${HDR_VAL}\$" - else - HEADER_FILTER=".*" - fi - echo " mirrord header_filter: ${HEADER_FILTER}" - MIRRORD_CONFIG=$(jq -n \ - --arg path "deployment/${APP}" \ - --arg ns "$NS" \ - --arg header "$HEADER_FILTER" \ - '{ - target: { path: $path, namespace: $ns }, - agent: { namespace: $ns }, - feature: { - network: { - incoming: { mode: "steal", http_filter: { header_filter: $header } }, - outgoing: true - }, - fs: "local" - } - }') - - kubectl create configmap "$CM_NAME" --namespace "$NS" --from-literal=config.json="$MIRRORD_CONFIG" - - echo " Deploying mirrord proxy: $PROXY_NAME" - cat < ${PR_POD_IP}:${CPORT}" - exec /usr/local/bin/mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} - env: - - name: HOME - value: /tmp - - name: MIRRORD_TELEMETRY - value: "false" - - name: MIRRORD_PROGRESS_MODE - value: "off" - # INFO gives the gate below its positive marker: - # 'Created agent pod ... pod_name: "mirrord-agent-..."'. - # (mirrord still prints a non-fatal - # 'ERROR mirrord::connection: failed to obtain machine ID'.) - - name: RUST_LOG - value: "mirrord=info" - - name: PR_POD_IP - value: "${PR_POD_IP}" - - name: CPORT - value: "${CPORT}" - volumeMounts: - - name: config - mountPath: /config - readOnly: true - securityContext: - runAsUser: 0 - privileged: true - capabilities: - add: [SYS_ADMIN, SYS_PTRACE, NET_ADMIN] - volumes: - - name: config - configMap: - name: ${CM_NAME} - PROXYPOD - - # Fail closed, with a positive marker. A Ready flicker is not proof: - # with no readiness probe a container is Ready the instant it runs, - # and mirrord exec can fail seconds later. Observed on kind: the - # proxy logs 'Created agent pod' at ~1s; without pods/portforward - # RBAC the WebSocket upgrade 403s at ~+17s and the agent gives up at - # ~+30s. So require: proxy Running, zero restarts, no fatal log - # line, the agent pod named in the proxy log Running, and all of - # that still true 40s after the agent pod was first seen. The - # proxy's own IP:port is NOT probed - under the mirrord layer socat's - # listener is virtual; routing is proven in validate-propagation. - PROXY_OK=false - AGENT_POD="" - AGENT_SEEN=0 - DEADLINE=$(( $(date +%s) + 180 )) - while [ "$(date +%s)" -lt "$DEADLINE" ]; do - PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") - RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") - PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) - # Fatal log lines only. A generic "ERROR mirrord::..." is not - # fatal (the machine-ID telemetry lookup); a real crash ends the - # process and, with restartPolicy Never, moves the pod to Failed. - if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ - || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then - break - fi - if [ -z "$AGENT_POD" ]; then - AGENT_POD=$(printf '%s' "$PROXY_LOG" | sed -n 's/.*Created agent pod.*pod_name: "\([^"]*\)".*/\1/p' | head -n 1) - [ -z "$AGENT_POD" ] || AGENT_SEEN=$(date +%s) - fi - if [ "$PHASE" = "Running" ] && [ -n "$AGENT_POD" ]; then - AGENT_PHASE=$(kubectl get "pod/${AGENT_POD}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") - if [ "$AGENT_PHASE" = "Failed" ] || [ "$AGENT_PHASE" = "Succeeded" ]; then - break - fi - if [ "$AGENT_PHASE" = "Running" ] && [ $(( $(date +%s) - AGENT_SEEN )) -ge 40 ]; then - PROXY_OK=true - break - fi - fi - sleep 3 - done - if ! $PROXY_OK; then - echo "ERROR: mirrord proxy ${PROXY_NAME} did not establish an agent connection (proxy phase=${PHASE:-?} restarts=${RESTARTS:-?} agent=${AGENT_POD:-none} agent phase=${AGENT_PHASE:-?})" >&2 - echo "--- proxy pod log ---" >&2 - kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true - echo "--- proxy pod describe ---" >&2 - kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true - echo "--- mirrord agent jobs/pods in $NS ---" >&2 - kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true - if [ -n "$AGENT_POD" ]; then - echo "--- mirrord agent log (${AGENT_POD}) ---" >&2 - kubectl logs "pod/${AGENT_POD}" -n "$NS" --tail=-1 2>&1 | tail -n 60 >&2 || true - fi - exit 1 - fi - echo " Proxy ${PROXY_NAME} connected to agent ${AGENT_POD}; both Running 40s, 0 restarts (routing is proven in validate-propagation)" - echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" - echo "" - - jq --arg a "$APP" --arg p "$POD_NAME" '. + {($a): $p}' /tmp/pods.json > /tmp/pods-tmp.json - mv /tmp/pods-tmp.json /tmp/pods.json - done - - mkdir -p "$(dirname "${DEPLOYED_PODS_FILE}")" - cat /tmp/pods.json > "$DEPLOYED_PODS_FILE" - cat /tmp/pods.json | tee /tekton/results/deployed-pods - workspaces: - - description: Workspace to write deployed-pods.json for pass-through result - name: shared-workspace -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:41Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: deploy-intercepts-result - tekton.dev/task: deploy-intercepts-result - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-deploy-intercepts-result - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13164" - uid: a8029dc7-4483-4afc-aaf7-baf9cd82fe8f - spec: - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: deploy-intercepts-result - timeout: 1h0m0s - workspaces: - - name: shared-workspace - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:16:45Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:45Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-deploy-intercepts-result-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: deployed-pods - type: string - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - startTime: "2026-09-28T03:16:41Z" - steps: - - container: step-pass-through - imageID: docker.io/library/busybox@sha256:fd7dc98638c8e305f4dc34e979f1c0fdfdcaeb0fbf8fcff77ae834b6da3d7e6e - name: pass-through - provenance: {} - terminated: - containerID: containerd://16624b1833c51db43313d16cfc5dcc811bc38eb73185092c1784d5ec1cf18715 - exitCode: 0 - finishedAt: "2026-09-28T03:16:44Z" - message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:16:44Z" - terminationReason: Completed - taskSpec: - description: | - Pass-through task (M7). Reads deployed-pods.json from the shared workspace (written by either deploy-intercepts-telepresence or deploy-intercepts-mirrord) and writes it to the deployed-pods result. Downstream and finally tasks reference this task's result so they work with either intercept backend. - results: - - description: JSON map of app → pod name - name: deployed-pods - type: string - steps: - - computeResources: {} - image: busybox - name: pass-through - script: | - #!/bin/sh - set -e - FILE="/workspace/shared-workspace/deployed-pods.json" - if [ ! -f "$FILE" ]; then - echo '{}' > "/tekton/results/deployed-pods" - echo "No deployed-pods.json found; wrote empty object." - exit 0 - fi - cp "$FILE" "/tekton/results/deployed-pods" - echo "Wrote deployed-pods to result: $(cat /tekton/results/deployed-pods)" - workspaces: - - description: Workspace containing deployed-pods.json from the deploy step - name: shared-workspace -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tekton.dev/categories: Git - tekton.dev/deprecated: "true" - tekton.dev/displayName: git clone - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 - tekton.dev/tags: git - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:33Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: fetch-source - tekton.dev/task: git-clone - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-fetch-source - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12350" - uid: 8def9798-f6a9-48d1-acca-b7a8a67a4502 - spec: - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: git-clone - timeout: 1h0m0s - workspaces: - - name: output - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:14:42Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:42Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-fetch-source-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: commit - type: string - value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 - - name: committer-date - type: string - value: "1790468109" - - name: url - type: string - value: https://github.com/jmjava/tekton-dag.git - startTime: "2026-09-28T03:14:34Z" - steps: - - container: step-clone - imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df - name: clone - provenance: {} - terminated: - containerID: containerd://419cbb2591b360883fdf88f1585593564cbedb42861e6839d6a884ba928fbfd5 - exitCode: 0 - finishedAt: "2026-09-28T03:14:41Z" - message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:41Z" - terminationReason: Completed - taskSpec: - description: |- - These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. - The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. - params: - - description: Repository URL to clone from. - name: url - type: string - - default: "" - description: Revision to checkout. (branch, tag, sha, ref, etc...) - name: revision - type: string - - default: "" - description: Refspec to fetch before checking out revision. - name: refspec - type: string - - default: "true" - description: Initialize and fetch git submodules. - name: submodules - type: string - - default: "1" - description: Perform a shallow clone, fetching only the most recent N commits. - name: depth - type: string - - default: "true" - description: Set the `http.sslVerify` global git config. Setting this to `false` - is not advised unless you are sure that you trust your git remote. - name: sslVerify - type: string - - default: ca-bundle.crt - description: file name of mounted crt using ssl-ca-directory workspace. default - value is ca-bundle.crt. - name: crtFileName - type: string - - default: "" - description: Subdirectory inside the `output` Workspace to clone the repo - into. - name: subdirectory - type: string - - default: "" - description: Define the directory patterns to match or exclude when performing - a sparse checkout. - name: sparseCheckoutDirectories - type: string - - default: "true" - description: Clean out the contents of the destination directory if it already - exists before cloning. - name: deleteExisting - type: string - - default: "" - description: HTTP proxy server for non-SSL requests. - name: httpProxy - type: string - - default: "" - description: HTTPS proxy server for SSL requests. - name: httpsProxy - type: string - - default: "" - description: Opt out of proxying HTTP/HTTPS requests. - name: noProxy - type: string - - default: "true" - description: Log the commands that are executed during `git-clone`'s operation. - name: verbose - type: string - - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - description: The image providing the git-init binary that this Task runs. - name: gitInitImage - type: string - - default: /home/git - description: | - Absolute path to the user's home directory. - name: userHome - type: string - results: - - description: The precise commit SHA that was fetched by this Task. - name: commit - type: string - - description: The precise URL that was fetched by this Task. - name: url - type: string - - description: The epoch timestamp of the commit that was fetched by this Task. - name: committer-date - type: string - steps: - - computeResources: {} - env: - - name: HOME - value: /home/git - - name: PARAM_URL - value: https://github.com/jmjava/tekton-dag.git - - name: PARAM_REVISION - value: main - - name: PARAM_REFSPEC - - name: PARAM_SUBMODULES - value: "true" - - name: PARAM_DEPTH - value: "1" - - name: PARAM_SSL_VERIFY - value: "true" - - name: PARAM_CRT_FILENAME - value: ca-bundle.crt - - name: PARAM_SUBDIRECTORY - - name: PARAM_DELETE_EXISTING - value: "true" - - name: PARAM_HTTP_PROXY - - name: PARAM_HTTPS_PROXY - - name: PARAM_NO_PROXY - - name: PARAM_VERBOSE - value: "true" - - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES - - name: PARAM_USER_HOME - value: /home/git - - name: WORKSPACE_OUTPUT_PATH - value: /workspace/output - - name: WORKSPACE_SSH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSH_DIRECTORY_PATH - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH - - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSL_CA_DIRECTORY_PATH - image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - name: clone - script: | - #!/usr/bin/env sh - set -eu - - if [ "${PARAM_VERBOSE}" = "true" ] ; then - set -x - fi - - if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" - chmod 400 "${PARAM_USER_HOME}/.git-credentials" - chmod 400 "${PARAM_USER_HOME}/.gitconfig" - fi - - if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then - cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh - chmod 700 "${PARAM_USER_HOME}"/.ssh - chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* - fi - - if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then - export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" - if [ "${PARAM_CRT_FILENAME}" != "" ] ; then - export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" - fi - fi - CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" - - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" - # or the root of a mounted volume. - if [ -d "${CHECKOUT_DIR}" ] ; then - # Delete non-hidden files and directories - rm -rf "${CHECKOUT_DIR:?}"/* - # Delete files and directories starting with . but excluding .. - rm -rf "${CHECKOUT_DIR}"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "${CHECKOUT_DIR}"/..?* - fi - } - - if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then - cleandir || true - fi - - test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" - test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" - test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" - - git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" - /ko-app/git-init \ - -url="${PARAM_URL}" \ - -revision="${PARAM_REVISION}" \ - -refspec="${PARAM_REFSPEC}" \ - -path="${CHECKOUT_DIR}" \ - -sslVerify="${PARAM_SSL_VERIFY}" \ - -submodules="${PARAM_SUBMODULES}" \ - -depth="${PARAM_DEPTH}" \ - -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" - cd "${CHECKOUT_DIR}" - RESULT_SHA="$(git rev-parse HEAD)" - EXIT_CODE="$?" - if [ "${EXIT_CODE}" != 0 ] ; then - exit "${EXIT_CODE}" - fi - RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" - printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" - printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" - printf "%s" "${PARAM_URL}" > "/tekton/results/url" - securityContext: - runAsNonRoot: true - runAsUser: 65532 - workspaces: - - description: The git repo will be cloned onto the volume backing this Workspace. - name: output - - description: | - A .ssh directory with private key, known_hosts, config, etc. Copied to - the user's home before git commands are executed. Used to authenticate - with the git remote when performing the clone. Binding a Secret to this - Workspace is strongly recommended over other volume types. - name: ssh-directory - optional: true - - description: | - A Workspace containing a .gitconfig and .git-credentials file. These - will be copied to the user's home before any git commands are run. Any - other files in this Workspace are ignored. It is strongly recommended - to use ssh-directory over basic-auth whenever possible and to bind a - Secret to this Workspace over other volume types. - name: basic-auth - optional: true - - description: | - A workspace containing CA certificates, this will be used by Git to - verify the peer with when fetching or pushing over HTTPS. - name: ssl-ca-directory - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:18:13Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: finally - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: post-pr-comment - tekton.dev/task: post-pr-comment - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-post-pr-comment - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13724" - uid: 6f0a708a-b5d0-4854-8e36-8489cd782565 - spec: - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: pr-repo-url - value: "" - - name: pr-number - value: "903" - - name: pipeline-run-name - value: stackrun-pr-27exw - - name: namespace - value: tekton-pipelines - - name: status - value: Completed - - name: test-summary - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: dashboard-url - value: "" - - name: github-secret-name - value: github-token - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: post-pr-comment - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:18:18Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:18Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-post-pr-comment-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:18:13Z" - steps: - - container: step-post-comment - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: post-comment - provenance: {} - terminated: - containerID: containerd://21a5e3c7b0296249f6ba5e7ddc75583d38b35208765e9f4f315c439ec97f4135 - exitCode: 0 - finishedAt: "2026-09-28T03:18:18Z" - reason: Completed - startedAt: "2026-09-28T03:18:17Z" - terminationReason: Completed - taskSpec: - description: Post a comment on the GitHub PR with run status and Tekton Dashboard - link. - params: - - description: Git repo URL (e.g. https://github.com/owner/repo.git); used when - pr-repo-url is empty - name: git-url - type: string - - default: "" - description: When set, PR comment is posted to this repo (app repo); when - empty, git-url is used - name: pr-repo-url - type: string - - description: PR number (issue number for the comment) - name: pr-number - type: string - - description: Name of this PipelineRun - name: pipeline-run-name - type: string - - description: Namespace of the PipelineRun - name: namespace - type: string - - description: Pipeline status (Succeeded or Failed) - name: status - type: string - - default: "" - description: Optional test summary JSON string - name: test-summary - type: string - - default: "" - description: Base URL of Tekton Dashboard (e.g. https://dashboard.example.com); - comment will include link to this run - name: dashboard-url - type: string - - default: github-token - description: Kubernetes secret name containing key 'token' (GitHub token with - repo scope) - name: github-secret-name - type: string - steps: - - computeResources: {} - env: - - name: GITHUB_TOKEN - valueFrom: - secretKeyRef: - key: token - name: github-token - optional: true - - name: GIT_URL - value: https://github.com/jmjava/tekton-dag.git - - name: PR_REPO_URL - - name: PR_NUMBER - value: "903" - - name: RUN_NAME - value: stackrun-pr-27exw - - name: NAMESPACE - value: tekton-pipelines - - name: STATUS - value: Completed - - name: TEST_SUMMARY - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: DASHBOARD_URL - image: alpine:3.19 - name: post-comment - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq >/dev/null 2>&1 - if [ -z "$GITHUB_TOKEN" ]; then - echo "No GITHUB_TOKEN secret; skipping PR comment." - exit 0 - fi - # Use pr-repo-url when set (PR in app repo), else git-url (platform repo) - COMMENT_URL="${PR_REPO_URL:-$GIT_URL}" - # Derive owner/repo from URL (https://github.com/owner/repo or git@github.com:owner/repo.git) - REPO="${COMMENT_URL#*github.com/}" - REPO="${REPO#*:}" - REPO="${REPO%.git}" - REPO="${REPO#*/}" - OWNER="${COMMENT_URL#*github.com/}" - OWNER="${OWNER#*:}" - OWNER="${OWNER%.git}" - OWNER="${OWNER%%/*}" - if [ -z "$OWNER" ] || [ -z "$REPO" ]; then - echo "Could not parse owner/repo from COMMENT_URL=$COMMENT_URL" - exit 0 - fi - BODY="## Tekton Pipeline Run" - BODY="${BODY}\n\n**Status:** ${STATUS}" - if [ -n "$TEST_SUMMARY" ]; then - BODY="${BODY}\n\n**Test summary:**\n\`\`\`json\n${TEST_SUMMARY}\n\`\`\`" - fi - if [ -n "$DASHBOARD_URL" ]; then - DASH_URL="${DASHBOARD_URL%/}/#/namespaces/${NAMESPACE}/pipelineruns/${RUN_NAME}" - BODY="${BODY}\n\n[View in Tekton Dashboard](${DASH_URL})" - fi - BODY="${BODY}\n\n_PipelineRun: \`${RUN_NAME}\`_" - JSON_BODY=$(printf '%s' "$BODY" | jq -Rs '{ body: . }') - curl -sS -X POST \ - -H "Authorization: Bearer $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/repos/${OWNER}/${REPO}/issues/${PR_NUMBER}/comments" \ - -d "$JSON_BODY" || echo "Failed to post comment (non-fatal)" - echo "Posted comment to PR #${PR_NUMBER}" -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: pr-snapshot-tag - tekton.dev/task: pr-snapshot-tag - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-pr-snapshot-tag - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12519" - uid: f20ab2ae-22ca-4bbe-b0fb-b96944cbf80f - spec: - params: - - name: snapshot-tag - value: stackrun-pr-27exw - - name: build-apps - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: pr-snapshot-tag - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:14:55Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:55Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-pr-snapshot-tag-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: snapshot-versions - type: string - value: '{"demo-fe":"stackrun-pr-27exw"}' - startTime: "2026-09-28T03:14:50Z" - steps: - - container: step-build-map - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: build-map - provenance: {} - terminated: - containerID: containerd://c5716e5e72905a52dc998aa1872d5f2bf2eb2d5042db77b0fb3c12be588bd7b2 - exitCode: 0 - finishedAt: "2026-09-28T03:14:54Z" - message: '[{"key":"snapshot-versions","value":"{\"demo-fe\":\"stackrun-pr-27exw\"}","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:54Z" - terminationReason: Completed - taskSpec: - description: | - Builds a JSON map of app -> snapshot tag for PR pipeline image tagging. PR builds are not releases; they use a run-specific snapshot tag (e.g. the pipeline run name) so images are clearly non-release. - params: - - description: 'Tag to use for all apps (e.g. pipeline run name: stack-pr-2-6xnbj)' - name: snapshot-tag - type: string - - description: Space-separated list of app names to tag - name: build-apps - type: string - results: - - description: JSON map of app -> snapshot-tag for use as image-tag in build-apps - name: snapshot-versions - type: string - steps: - - computeResources: {} - image: alpine:3.19 - name: build-map - script: | - #!/bin/sh - set -e - apk add --no-cache jq - TAG="stackrun-pr-27exw" - APPS="demo-fe" - OUT="{}" - for APP in $APPS; do - [ -z "$APP" ] && continue - OUT=$(echo "$OUT" | jq -c --arg app "$APP" --arg tag "$TAG" '. + {($app): $tag}') - done - echo -n "$OUT" | tee /tekton/results/snapshot-versions - echo "" - echo "Snapshot tag map: $OUT" - securityContext: - runAsUser: 0 -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:17:33Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: query-test-plan - tekton.dev/task: query-test-plan - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-query-test-plan - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13467" - uid: c622eecb-453b-4bb2-bae0-a44faa8afbcc - spec: - params: - - name: changed-app - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: query-test-plan - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:17:38Z" - conditions: - - lastTransitionTime: "2026-09-28T03:17:38Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-query-test-plan-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: apps-to-test - type: string - value: "" - - name: test-plan-message - type: string - value: test-plan query failed; running all tests - - name: tests-to-run - type: string - value: "" - - name: unmapped-area - type: string - value: "" - startTime: "2026-09-28T03:17:33Z" - steps: - - container: step-query - imageID: docker.io/curlimages/curl@sha256:58adaa4e8dca9c988bae2aba4ab3434a0bb2da16bbe3f92dec39ec7785166777 - name: query - provenance: {} - terminated: - containerID: containerd://4b984b91895eabb1a52cc6ec9190ad1ca37ace0f34e3a9305c7a7a597bf3f03e - exitCode: 0 - finishedAt: "2026-09-28T03:17:37Z" - message: '[{"key":"apps-to-test","value":"","type":1},{"key":"test-plan-message","value":"test-plan - query failed; running all tests","type":1},{"key":"tests-to-run","value":"","type":1},{"key":"unmapped-area","value":"","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:17:37Z" - terminationReason: Completed - taskSpec: - description: | - Query the orchestrator's test-plan endpoint to get the minimal set of regression tests for the changed app. Outputs a comma-separated list of test IDs (or an unmapped-area flag). - params: - - description: The app that changed in this PR - name: changed-app - type: string - - default: "1" - description: Graph traversal depth (1=direct, 2+=neighbors) - name: blast-radius - type: string - - default: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080 - description: Orchestrator service URL - name: orchestrator-url - type: string - results: - - description: Comma-separated test IDs to run, or empty - name: tests-to-run - type: string - - description: Service name if no mapped tests, or empty - name: unmapped-area - type: string - - description: Comma-separated service/app names whose tests should run, or - empty - name: apps-to-test - type: string - - description: Human-readable summary of the test plan - name: test-plan-message - type: string - steps: - - computeResources: {} - image: curlimages/curl:latest - name: query - script: | - #!/bin/sh - set -e - - APP="demo-fe" - RADIUS="1" - URL="http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=${APP}&radius=${RADIUS}" - - echo "Querying test plan: $URL" - RESPONSE=$(curl -sf "$URL" 2>/dev/null || echo '{"error":"orchestrator unreachable"}') - echo "$RESPONSE" | head -c 2000 - echo "" - - if echo "$RESPONSE" | grep -q '"error"'; then - echo "WARN: test-plan query failed; will run all tests" - echo -n "" > /tekton/results/tests-to-run - echo -n "" > /tekton/results/unmapped-area - echo -n "" > /tekton/results/apps-to-test - echo -n "test-plan query failed; running all tests" > /tekton/results/test-plan-message - exit 0 - fi - - TESTS=$(echo "$RESPONSE" | sed 's/.*"tests":\[//' | sed 's/\].*//' | \ - sed 's/{"id":"//g' | sed 's/","type":"[^"]*"}//g' | tr ',' '\n' | \ - paste -sd ',' -) - UNMAPPED=$(echo "$RESPONSE" | sed -n 's/.*"unmapped_area":"\([^"]*\)".*/\1/p') - MESSAGE=$(echo "$RESPONSE" | sed -n 's/.*"message":"\([^"]*\)".*/\1/p') - SERVICES=$(echo "$RESPONSE" | sed -n 's/.*"services":\[\([^]]*\)\].*/\1/p' | \ - sed 's/"//g') - - echo "" - echo "Tests to run: ${TESTS:-}" - echo "Apps to test: ${SERVICES:-}" - echo "Unmapped area: ${UNMAPPED:-}" - echo "Message: $MESSAGE" - - echo -n "${TESTS}" > /tekton/results/tests-to-run - echo -n "${UNMAPPED}" > /tekton/results/unmapped-area - echo -n "${SERVICES}" > /tekton/results/apps-to-test - echo -n "${MESSAGE}" > /tekton/results/test-plan-message -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:42Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: resolve-stack - tekton.dev/task: resolve-stack - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-resolve-stack - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12428" - uid: 376d8b76-abf1-4c49-b657-9448bc1cb54a - spec: - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: version-overrides - value: '{}' - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: resolve-stack - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:14:49Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:49Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-resolve-stack-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: app-list - type: string - value: demo-fe release-lifecycle-demo demo-api - - name: build-apps - type: string - value: demo-fe - - name: entry-app - type: string - value: demo-fe - - name: intercept-header-value - type: string - value: x-dev-session:pr-903 - - name: propagation-chain - type: string - value: | - demo-fe release-lifecycle-demo demo-api - - name: resolved-versions - type: string - value: | - {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} - - name: run-compile-composer - type: string - value: "false" - - name: run-compile-gradle - type: string - value: "false" - - name: run-compile-maven - type: string - value: "false" - - name: run-compile-npm - type: string - value: "true" - - name: run-compile-pip - type: string - value: "false" - - name: stack-json - type: string - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - startTime: "2026-09-28T03:14:42Z" - steps: - - container: step-resolve - imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 - name: resolve - provenance: {} - terminated: - containerID: containerd://719cd458394417bd85ec21f0ce71520758fc66a2796903f1ed3ab3b97bad691c - exitCode: 0 - finishedAt: "2026-09-28T03:14:48Z" - message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"x-dev-session:pr-903","type":1},{"key":"propagation-chain","value":"demo-fe - release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"false","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo - 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence - (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm - install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:48Z" - terminationReason: Completed - taskSpec: - description: | - Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. - params: - - description: Path to the stack YAML relative to workspace root - name: stack-file - type: string - - default: stacks/versions.yaml - description: Path to versions.yaml relative to workspace root - name: versions-file - type: string - - default: '{}' - description: | - JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. - name: version-overrides - type: string - - default: "" - description: App whose PR triggered this run (empty = build all) - name: changed-app - type: string - - default: "" - description: PR number for intercept-header generation - name: pr-number - type: string - results: - - description: Full stack graph as JSON (includes build config per app) - name: stack-json - type: string - - description: Space-separated list of apps in topological order - name: app-list - type: string - - description: Entry-point app (typically the frontend) - name: entry-app - type: string - - description: Ordered chain of apps for header propagation validation - name: propagation-chain - type: string - - description: Header value to use for Telepresence intercepts - name: intercept-header-value - type: string - - description: Space-separated list of apps to build (changed-app or all) - name: build-apps - type: string - - description: true if any build-app uses npm (so only that compile step runs) - name: run-compile-npm - type: string - - description: true if any build-app uses maven - name: run-compile-maven - type: string - - description: true if any build-app uses gradle - name: run-compile-gradle - type: string - - description: true if any build-app uses pip - name: run-compile-pip - type: string - - description: true if any build-app uses composer - name: run-compile-composer - type: string - - description: JSON map of app → version (registry defaults merged with overrides) - name: resolved-versions - type: string - steps: - - computeResources: {} - env: - - name: YQ_VERSION - value: v4.45.4 - - name: JQ_VERSION - value: jq-1.7.1 - image: alpine:3.21 - name: resolve - script: | - #!/bin/sh - set -eu - - arch=$(uname -m) - case "$arch" in - x86_64) arch=amd64 ;; - aarch64|arm64) arch=arm64 ;; - *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; - esac - install_static() { - dest="$1" - url="$2" - wget -q -O "$dest" "$url" - chmod +x "$dest" - } - # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). - if ! apk add --no-cache jq yq-go; then - echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 - install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" - install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" - fi - command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } - command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } - - STACK="stacks/stack-one.yaml" - VFILE="stacks/versions.yaml" - OVERRIDES='{}' - CHANGED="demo-fe" - PR="903" - - if [ ! -f "$STACK" ]; then - echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 - ls -la >&2 - ls -la stacks >&2 || true - exit 1 - fi - - STACK_JSON=$(yq -o=json "$STACK") - - # ---------------------------------------------------------- - # Build the full graph JSON (preserves build config per app) - # ---------------------------------------------------------- - echo "$STACK_JSON" | jq -c '{ - name: .name, - description: .description, - propagation: .propagation, - defaults: .defaults, - apps: [.apps[] | { - name: .name, - repo: .repo, - role: .role, - "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), - namespace: (.namespace // null), - "container-port": (."container-port" // null), - "service-port": (."service-port" // null), - "context-dir": (."context-dir" // "."), - dockerfile: (.dockerfile // "Dockerfile"), - build: (.build // {tool:"none", runtime:"custom"}), - downstream: (.downstream // []), - tests: (.tests // {}) - }] - }' > /tmp/stack.json - - cat /tmp/stack.json | tee /tekton/results/stack-json - - # ---------------------------------------------------------- - # Resolve versions: registry defaults + overrides - # ---------------------------------------------------------- - VERSIONS_JSON="{}" - if [ -f "$VFILE" ]; then - VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' - [to_entries[] | {key: .key, value: .value.version}] | from_entries - ') - fi - - # Only keep versions for apps actually in this stack - APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') - STACK_VERSIONS="{}" - for APP in $APP_NAMES; do - VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') - done - - # Merge overrides on top - if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then - echo "Applying version overrides: $OVERRIDES" - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') - fi - - echo "Resolved versions:" - echo "$STACK_VERSIONS" | jq '.' - echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions - echo "" - - # ---------------------------------------------------------- - # Topological order - # ---------------------------------------------------------- - TOPO=$(cat /tmp/stack.json | jq -r ' - def vis($n;$adj): - if (.t|index($n)) then .err=true - elif (.v|index($n)) then . - else .t+=[$n] | - reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | - .t-=[$n] | .v+=[$n] | .o+=[$n] - end; - def topo: - . as $g | - ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | - ($g.apps | map(.name)) as $all | - {v:[],t:[],o:[],err:false} | - reduce $all[] as $n (.; - if (.v|index($n)) then . else .|vis($n;$adj) end - ) | - if .err then error("cycle") else .o|reverse end; - topo | join(" ") - ') - echo -n "$TOPO" | tee /tekton/results/app-list - echo "" - - # ---------------------------------------------------------- - # Entry point (app that no other app lists as downstream) - # ---------------------------------------------------------- - ENTRY=$(cat /tmp/stack.json | jq -r ' - (.apps|map(.downstream)|flatten) as $deps | - .apps[] | select(.name as $n | ($deps|index($n))|not) | .name - ' | head -1) - echo -n "$ENTRY" | tee /tekton/results/entry-app - echo "" - - # ---------------------------------------------------------- - # Propagation chain from entry - # ---------------------------------------------------------- - cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' - def walk($name): - . as $g | - ($g.apps[]|select(.name==$name)) as $app | - if $app then [$name] + reduce ($app.downstream//[])[] as $d - ([]; . + ($g|walk($d))) - else [] end; - walk($s) | join(" ") - ' | tee /tekton/results/propagation-chain - - # ---------------------------------------------------------- - # Intercept header - # ---------------------------------------------------------- - if [ -n "$PR" ]; then - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value - else - echo -n "" | tee /tekton/results/intercept-header-value - fi - echo "" - - # ---------------------------------------------------------- - # Build list - # ---------------------------------------------------------- - if [ -n "$CHANGED" ]; then - echo -n "$CHANGED" | tee /tekton/results/build-apps - else - echo -n "$TOPO" | tee /tekton/results/build-apps - fi - echo "" - - # ---------------------------------------------------------- - # Which compile steps to run (only tools used by build-apps) - # ---------------------------------------------------------- - BUILD_APPS=$(cat /tekton/results/build-apps) - RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" - for app in $BUILD_APPS; do - tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) RUN_NPM="true" ;; - maven) RUN_MAVEN="true" ;; - gradle) RUN_GRADLE="true" ;; - pip) RUN_PIP="true" ;; - composer) RUN_COMPOSER="true" ;; - esac - done - echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm - echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven - echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle - echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip - echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer - echo "" - securityContext: - runAsUser: 0 - workingDir: /workspace/source - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:17:38Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: run-tests - tekton.dev/task: run-stack-tests - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-run-tests - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13622" - uid: 9237177e-0f17-43e6-b91f-ed70a25b84d6 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: app-list - value: demo-fe release-lifecycle-demo demo-api - - name: entry-app - value: demo-fe - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: tests-to-run - value: "" - - name: unmapped-area - value: "" - - name: apps-to-test - value: "" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: run-stack-tests - timeout: 1h0m0s - workspaces: - - name: test-source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:18:13Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:13Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-run-tests-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: test-summary - type: string - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - startTime: "2026-09-28T03:17:38Z" - steps: - - container: step-run-tests - imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 - name: run-tests - provenance: {} - terminated: - containerID: containerd://eeb81d93deb7f10a0abb876f47148c2dbe9d9641ac87b1435b85e1a517052e56 - exitCode: 0 - finishedAt: "2026-09-28T03:18:12Z" - message: '[{"key":"test-summary","value":"{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": - \"pass\",\n \"demo-api\": \"pass\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:17:43Z" - terminationReason: Completed - taskSpec: - description: | - Two-phase test execution: - Phase 1 — E2E through entry point: - Always sends requests through the stack's entry app (frontend) - with the intercept header. This exercises the full chain and - proves the intercepted PR app works in context. - For A→B→C→D where C is intercepted, the request enters A, - flows through B, hits the PR build of C via Telepresence, - then continues to D. The header propagates end-to-end. - - Phase 2 — Per-app tests: - Runs each app's configured test suites (Postman, Playwright, - Artillery) with the intercept header attached. For intercepted - apps this validates the PR build directly. For non-intercepted - apps this validates they still work with the header present. - - Runner logic lives in scripts/run-stack-tests-runners.sh and is mounted from ConfigMap run-stack-tests-runners so the Task does not depend on the cloned platform git-revision. - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated list of apps in topological order - name: app-list - type: string - - description: Entry-point app (frontend / root of the graph) - name: entry-app - type: string - - description: Full ordered chain from entry to leaves - name: propagation-chain - type: string - - description: Space-separated list of intercepted apps (changed in this PR) - name: build-apps - type: string - - default: "" - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: "" - description: Comma-separated test IDs from query-test-plan. Empty = run all - tests. - name: tests-to-run - type: string - - default: "" - description: Service name with no mapped regression tests. Non-empty = report - unmapped. - name: unmapped-area - type: string - - default: "" - description: Comma-separated service/app names whose tests should run. Empty - = run all. - name: apps-to-test - type: string - results: - - description: JSON summary of test results per app + e2e - name: test-summary - type: string - steps: - - computeResources: {} - image: node:22-alpine - name: run-tests - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq bash >/dev/null 2>&1 - - npm install -g newman artillery >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - APP_LIST="demo-fe release-lifecycle-demo demo-api" - ENTRY_APP="demo-fe" - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - TESTS_TO_RUN="" - UNMAPPED_AREA="" - APPS_TO_TEST="" - TEST_SOURCE="/workspace/test-source" - TEST_SUMMARY_PATH="/tekton/results/test-summary" - export STACK_JSON APP_LIST ENTRY_APP CHAIN BUILD_APPS INTERCEPT \ - DEFAULT_NS TESTS_TO_RUN UNMAPPED_AREA APPS_TO_TEST \ - TEST_SOURCE TEST_SUMMARY_PATH - - RUNNERS="/opt/tekton-dag/run-stack-tests-runners.sh" - if [ ! -f "$RUNNERS" ]; then - echo "ERROR: run-stack-tests runners ConfigMap missing: $RUNNERS" >&2 - exit 1 - fi - # shellcheck disable=SC1090 - . "$RUNNERS" - volumeMounts: - - mountPath: /opt/tekton-dag - name: runners-script - workingDir: /workspace/test-source - volumes: - - configMap: - name: run-stack-tests-runners - name: runners-script - workspaces: - - name: test-source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:45Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: validate-original-traffic - tekton.dev/task: validate-original-traffic - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-validate-original-traffic - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13402" - uid: 44cb7b2e-2172-49ff-8295-3b83a2260049 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: entry-app - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: validate-original-traffic - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:17:33Z" - conditions: - - lastTransitionTime: "2026-09-28T03:17:33Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-validate-original-traffic-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: original-traffic-summary - type: string - value: | - { - "demo-fe": { - "health-check": "pass", - "http-code": "200" - }, - "release-lifecycle-demo": { - "health-check": "pass", - "http-code": "200" - }, - "demo-api": { - "health-check": "pass", - "http-code": "200" - }, - "e2e-no-header-passthrough": { - "status": "pass", - "http-code": "200" - }, - "artillery-no-header-burst": "pass", - "overall": "pass" - } - startTime: "2026-09-28T03:16:45Z" - steps: - - container: step-validate - imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 - name: validate - provenance: {} - terminated: - containerID: containerd://d9397c9746f9b3fb25cb7a2012a638548ac84da8e0bde7d616fff9c30de12520 - exitCode: 0 - finishedAt: "2026-09-28T03:17:32Z" - message: '[{"key":"original-traffic-summary","value":"{\n \"demo-fe\": {\n \"health-check\": - \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": - {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": - {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": - {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": - \"pass\",\n \"overall\": \"pass\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:16:50Z" - terminationReason: Completed - taskSpec: - description: | - Milestone 5 — Validates that original (non-intercepted) traffic continues to work while Telepresence intercepts are active. - Sends requests to every app in the stack WITHOUT the intercept header. These requests must reach the original deployments, not the PR pods. This proves the intercept is additive (header-based split) and does not disrupt normal service operation. - For a stack A→B→C→D where C is intercepted: - - Request WITHOUT header enters A → B → C (original) → D - - All four services respond normally from their original deployments - - The PR pod for C is never hit because no header is present - - Two checks per app: - 1. Direct health check — curl the service without headers - 2. Entry-point passthrough — request enters through the entry app - without headers, exercises the full chain via original deployments - - If Artillery is available, also runs a short load burst without headers to confirm sustained traffic handling during the intercept window. - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated ordered list of apps in the chain - name: propagation-chain - type: string - - default: "" - description: Space-separated list of intercepted apps (for reporting only) - name: build-apps - type: string - - description: Entry-point app (frontend / root of the graph) - name: entry-app - type: string - - default: staging - name: default-namespace - type: string - results: - - description: 'JSON summary: per-app health + e2e passthrough without headers' - name: original-traffic-summary - type: string - steps: - - computeResources: {} - image: node:22-alpine - name: validate - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq bash >/dev/null 2>&1 - npm install -g artillery >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - ENTRY_APP="demo-fe" - DEFAULT_NS="staging" - - echo '{}' > /tmp/orig-summary.json - OVERALL_PASS=true - - echo "============================================================" - echo " Milestone 5: Original Traffic Validation" - echo " (intercepts are ACTIVE — these requests carry NO header)" - echo "============================================================" - echo "" - echo " Intercepted apps: ${BUILD_APPS:-}" - echo " Full chain: $CHAIN" - echo " Entry point: $ENTRY_APP" - echo "" - echo " Expectation: every request WITHOUT the intercept header" - echo " reaches the ORIGINAL deployment, not the PR pod." - echo "" - - # =========================================================== - # Phase 1: Direct health check per service (no headers) - # =========================================================== - echo "############################################################" - echo " PHASE 1: Direct health check per service (no headers)" - echo "############################################################" - echo "" - - for APP in $CHAIN; do - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - MARKER="" - $IS_INTERCEPTED && MARKER=" [INTERCEPTED — should still serve original on bare requests]" - - echo " $APP:${MARKER}" - echo " URL: $URL" - echo " Headers: " - - HTTP_CODE=$(curl -s -o /tmp/orig-response-${APP}.txt -w "%{http_code}" \ - --connect-timeout 10 --max-time 30 \ - "$URL" 2>/dev/null || echo "000") - - if [ "$HTTP_CODE" = "000" ]; then - echo " WARN: Service not reachable (may be expected in dry-run)" - STATUS="unreachable" - elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then - echo " PASS: HTTP $HTTP_CODE — original deployment responding" - STATUS="pass" - else - echo " FAIL: HTTP $HTTP_CODE — unexpected response" - STATUS="fail" - OVERALL_PASS=false - fi - - jq --arg a "$APP" --arg s "$STATUS" --arg c "$HTTP_CODE" \ - '. + {($a): {"health-check": $s, "http-code": $c}}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - echo "" - done - - # =========================================================== - # Phase 2: Full-chain passthrough via entry point (no headers) - # =========================================================== - echo "############################################################" - echo " PHASE 2: Full-chain passthrough (no intercept headers)" - echo "############################################################" - echo "" - - ENTRY_NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - ENTRY_SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - ENTRY_URL="http://${ENTRY_APP}.${ENTRY_NS}.svc.cluster.local:${ENTRY_SPORT}/" - - echo " Entry URL: $ENTRY_URL" - echo " Headers: (no x-dev-session, no baggage)" - echo "" - echo " This request should flow through ALL original deployments." - echo " Even intercepted apps should respond from their original pods" - echo " because no header matches the Telepresence intercept rule." - echo "" - - PASSTHROUGH_RESULT=$(curl -s \ - --connect-timeout 15 --max-time 60 \ - "$ENTRY_URL" 2>/dev/null || echo '{"error":"unreachable"}') - - echo " Response:" - echo "$PASSTHROUGH_RESULT" | jq '.' 2>/dev/null || echo " $PASSTHROUGH_RESULT" - echo "" - - PASSTHROUGH_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --connect-timeout 15 --max-time 60 \ - "$ENTRY_URL" 2>/dev/null || echo "000") - - if [ "$PASSTHROUGH_CODE" = "000" ]; then - echo " WARN: Entry point not reachable" - PASSTHROUGH_STATUS="unreachable" - elif [ "$PASSTHROUGH_CODE" -ge 200 ] && [ "$PASSTHROUGH_CODE" -lt 400 ]; then - echo " PASS: HTTP $PASSTHROUGH_CODE — full chain responding without headers" - PASSTHROUGH_STATUS="pass" - else - echo " FAIL: HTTP $PASSTHROUGH_CODE" - PASSTHROUGH_STATUS="fail" - OVERALL_PASS=false - fi - - jq --arg s "$PASSTHROUGH_STATUS" --arg c "$PASSTHROUGH_CODE" \ - '. + {"e2e-no-header-passthrough": {"status": $s, "http-code": $c}}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - # =========================================================== - # Phase 3: Artillery burst without headers - # =========================================================== - echo "" - echo "############################################################" - echo " PHASE 3: Artillery load burst (no intercept headers)" - echo "############################################################" - echo "" - echo " Short burst against entry point — no headers." - echo " Confirms sustained original-traffic handling during intercept." - echo "" - - cat > /tmp/original-traffic-artillery.yml </dev/null; then - echo " Artillery burst: PASS" - else - ARTY_EXIT=$? - if [ $ARTY_EXIT -eq 127 ]; then - echo " Artillery not available — skipping load burst (non-fatal)" - ARTILLERY_STATUS="skipped" - else - echo " Artillery burst: FAIL (exit $ARTY_EXIT)" - ARTILLERY_STATUS="fail" - OVERALL_PASS=false - fi - fi - - jq --arg s "$ARTILLERY_STATUS" \ - '. + {"artillery-no-header-burst": $s}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - # =========================================================== - # Summary - # =========================================================== - echo "" - echo "============================================================" - echo " Original Traffic Validation Summary" - echo "============================================================" - - jq --arg o "$([ "$OVERALL_PASS" = "true" ] && echo pass || echo fail)" \ - '. + {"overall": $o}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - cat /tmp/orig-summary.json | jq '.' - cat /tmp/orig-summary.json | tee /tekton/results/original-traffic-summary - - if [ "$OVERALL_PASS" = "false" ]; then - echo "" - echo "FAILED: Original traffic was disrupted while intercepts were active." - exit 1 - fi - - echo "" - echo "PASSED: Original traffic unaffected by active intercepts." -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:45Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: validate-propagation - tekton.dev/task: validate-stack-propagation - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-validate-propagation - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13256" - uid: 3537be13-4e47-4a45-91a9-e1685d434007 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: deployed-pods - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: validate-stack-propagation - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:16:51Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:51Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-validate-propagation-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:16:45Z" - steps: - - container: step-validate - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: validate - provenance: {} - terminated: - containerID: containerd://602973402dcb5a72a08d1cf9c3ce9a00c7d7c424f80ff394201939858f43fede - exitCode: 0 - finishedAt: "2026-09-28T03:16:50Z" - reason: Completed - startedAt: "2026-09-28T03:16:49Z" - terminationReason: Completed - taskSpec: - description: | - Fail-closed check that the original override header is transferred hop-to-hop up to the intercepted app(s). A rewritten or dropped value (e.g. pr-42 → local-debug) fails the task: intercepts only match the original session. - The header only needs to propagate from the entry point UP TO the intercepted app. Beyond the intercept, downstream calls are normal — there's no Telepresence intercept on those services to match on, so the header doesn't need to be there. - Example: A(originator) → B(forwarder) → C(terminal), D(terminal) - If B is intercepted: - - Header must reach B (A originates → B receives via Telepresence) - - B's calls to C and D are normal calls to normal deployments - - C and D do NOT need the header — no intercept to match - If C is intercepted: - - Header must reach C (A originates → B forwards → C receives) - - D is untouched - If B AND C are intercepted: - - Header must reach B AND continue to C - - B must forward because there's another intercept downstream - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated ordered list of apps in the chain - name: propagation-chain - type: string - - default: "" - description: Space-separated list of intercepted apps - name: build-apps - type: string - - description: Header value used for intercepts (e.g. x-dev-session:pr-42) - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: "" - description: | - JSON map app -> PR pod name from deploy-intercepts. When non-empty the - task also proves routing: a header-matched request must be served by - that PR pod and an unmatched request must not be (read from the pod's - access log through the Kubernetes API). - name: deployed-pods - type: string - steps: - - computeResources: {} - image: alpine:3.19 - name: validate - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') - - HEADER_VAL="" - if [ -n "$INTERCEPT" ]; then - HEADER_VAL=$(echo "$INTERCEPT" | cut -d: -f2-) - fi - - COUNT=0 - for APP in $CHAIN; do COUNT=$((COUNT + 1)); done - - # Find the deepest intercepted app in the chain - # Header only needs to propagate up to this point - DEEPEST_INTERCEPT_POS=0 - POS=0 - for APP in $CHAIN; do - POS=$((POS + 1)) - for BA in $BUILD_APPS; do - if [ "$BA" = "$APP" ]; then - DEEPEST_INTERCEPT_POS=$POS - fi - done - done - - echo "=============================================" - echo " Stack Propagation Validation" - echo "=============================================" - echo " Chain: $CHAIN" - echo " Header: $HEADER_NAME = $HEADER_VAL" - echo " Baggage key: $BAGGAGE_KEY" - echo " Hop count: $COUNT" - echo " Intercepted: ${BUILD_APPS:-}" - echo " Deepest intercept: position $DEEPEST_INTERCEPT_POS of $COUNT" - echo "" - - # Show the propagation contract for each hop - echo " Propagation contract:" - HOP=0 - PAST_DEEPEST=false - for APP in $CHAIN; do - HOP=$((HOP + 1)) - PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then - PAST_DEEPEST=true - fi - - TAG="" - $IS_INTERCEPTED && TAG=" ** PR BUILD **" - - if $PAST_DEEPEST; then - echo " $HOP. $APP ($PROP_ROLE) → NORMAL call (no intercept downstream, header not required)" - else - case "$PROP_ROLE" in - originator) echo " $HOP. $APP ($PROP_ROLE)${TAG} → SETS header, sends to next hop" ;; - forwarder) - # Only needs to forward if there's another intercepted app downstream - HAS_DOWNSTREAM_INTERCEPT=false - CHECK_POS=0 - for C in $CHAIN; do - CHECK_POS=$((CHECK_POS + 1)) - if [ $CHECK_POS -gt $HOP ]; then - for BA in $BUILD_APPS; do - [ "$BA" = "$C" ] && HAS_DOWNSTREAM_INTERCEPT=true - done - fi - done - - if $IS_INTERCEPTED && ! $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, downstream calls are NORMAL (no forwarding needed)" - elif $IS_INTERCEPTED && $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, MUST FORWARD (intercepted app downstream)" - elif $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, MUST FORWARD (intercepted app downstream)" - else - echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, downstream calls NORMAL" - fi - ;; - terminal) echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header, END of chain" ;; - *) echo " $HOP. $APP ($PROP_ROLE)${TAG}" ;; - esac - fi - done - echo "" - - if [ "$COUNT" -le 1 ]; then - echo "Single-app stack — health check only." - ENTRY=$(echo $CHAIN | awk '{print $1}') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - URL="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}/propagation" - - echo " Health check: $URL" - HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - --connect-timeout 10 --max-time 30 \ - "$URL" 2>/dev/null || echo "000") - - if [ "$HTTP_CODE" = "000" ]; then - echo " WARN: Service not reachable (may be expected in dry-run)" - elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then - echo " PASS: HTTP $HTTP_CODE" - else - echo " WARN: HTTP $HTTP_CODE (non-fatal for PR validation)" - fi - exit 0 - fi - - # Multi-hop validation — enter through the originator - ENTRY=$(echo $CHAIN | awk '{print $1}') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - BASE="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}" - TRACEPARENT="00-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 32)-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 16)-01" - - fetch_originator() { - body_file=$(mktemp) - http_code=$(curl -s -o "$body_file" -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - -H "traceparent: ${TRACEPARENT}" \ - --connect-timeout 10 --max-time 60 \ - "$1" 2>/dev/null || true) - [ -n "$http_code" ] || http_code="000" - printf '%s' "$http_code" > /tmp/originator-http-code - cat "$body_file" - rm -f "$body_file" - } - - URL="${BASE}/propagation" - echo "Sending test request to originator: $URL" - echo " Headers: ${HEADER_NAME}=${HEADER_VAL}, baggage=${BAGGAGE_KEY}=${HEADER_VAL}" - echo "" - - RESULT=$(fetch_originator "$URL") - HTTP_CODE=$(cat /tmp/originator-http-code 2>/dev/null || echo "000") - if [ "$HTTP_CODE" = "404" ] || [ "$HTTP_CODE" = "000" ] \ - || echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then - URL="${BASE}/" - echo " /propagation unavailable (HTTP $HTTP_CODE) — retrying $URL" - RESULT=$(fetch_originator "$URL") - fi - - echo "Response:" - echo "$RESULT" | jq '.' 2>/dev/null || echo "$RESULT" - echo "" - - FAILED=0 - - if echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then - echo "FAIL: originator unreachable — cannot prove hop-to-hop copy" - FAILED=1 - fi - - HEADER_FOUND=false - if [ -n "$HEADER_VAL" ] && printf '%s' "$RESULT" | grep -Fq "$HEADER_VAL"; then - HEADER_FOUND=true - fi - - REWRITTEN=false - REWRITE_VALS=$(printf '%s' "$RESULT" | jq -r ' - .. | objects - | (.session // .devSession // .headerValue // empty) - | select(type=="string" and . != "") - ' 2>/dev/null || true) - if [ -n "$HEADER_VAL" ] && [ -n "$REWRITE_VALS" ]; then - for SV in $REWRITE_VALS; do - if [ "$SV" != "$HEADER_VAL" ]; then - REWRITTEN=true - echo "FAIL: original override '$HEADER_VAL' was rewritten to '$SV'" - FAILED=1 - fi - done - fi - - if [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND; then - echo "FAIL: original override '$HEADER_VAL' missing from response" - FAILED=1 - fi - - echo "Hop-by-hop verification (fail-closed):" - HOP=0 - for APP in $CHAIN; do - HOP=$((HOP + 1)) - PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - MARKER="" - $IS_INTERCEPTED && MARKER=" [INTERCEPTED]" - - REPO_BASE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|.repo // ""' | awk -F/ '{print $NF}') - REACHED=false - echo "$RESULT" | grep -qi "$APP" && REACHED=true - if [ -n "$REPO_BASE" ]; then - echo "$RESULT" | grep -qi "$REPO_BASE" && REACHED=true - fi - - HOP_SESSION=$(printf '%s' "$RESULT" | jq -r --arg a "$APP" ' - [.. | objects | select((.app // .name // .service // "") | ascii_downcase | contains($a | ascii_downcase))] - | map(.session // .devSession // .headerValue // empty) - | map(select(. != "")) - | first // empty - ' 2>/dev/null || true) - - HEADER_REQUIRED=true - if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then - HEADER_REQUIRED=false - fi - - if ! $HEADER_REQUIRED; then - echo " HOP $HOP $APP ($PROP_ROLE): OK (beyond intercept — original override not required)" - elif ! $REACHED; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — NOT REACHED (header required at this hop)" - FAILED=1 - elif [ -n "$HOP_SESSION" ] && [ -n "$HEADER_VAL" ] && [ "$HOP_SESSION" != "$HEADER_VAL" ]; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — rewritten session='$HOP_SESSION' (expected '$HEADER_VAL')" - FAILED=1 - elif [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND && [ -z "$HOP_SESSION" ]; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — original override not confirmed" - FAILED=1 - else - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: PASS — REACHED session=${HOP_SESSION:-$HEADER_VAL}" - fi - done - - echo "" - if [ "$FAILED" -ne 0 ]; then - echo "FAIL: original override was not transferred hop-to-hop" - exit 1 - fi - if $HEADER_FOUND; then - echo "PASS: original override '$HEADER_VAL' transferred hop-to-hop" - else - echo "PASS: hop-to-hop verification complete" - fi - echo "" - - # ------------------------------------------------------------------ - # Routing proof (fail-closed). The /propagation echo above is served - # identically by the baseline and the PR pod, so it cannot tell which - # pod answered. Prove it from the PR pod's own access log: a request - # tagged with a unique query string and carrying the header must show - # up there; an untagged-header request with a different tag must not. - # ------------------------------------------------------------------ - DEPLOYED_PODS='{ - "demo-fe": "pr-demo-fe-1790565353" - } - ' - if [ -n "$HEADER_VAL" ] && [ -n "$BUILD_APPS" ] \ - && [ -n "$DEPLOYED_PODS" ] && [ "$DEPLOYED_PODS" != "{}" ]; then - echo "Routing proof (fail-closed): PR pod must serve matched traffic only" - SA_DIR=/var/run/secrets/kubernetes.io/serviceaccount - API="https://kubernetes.default.svc" - pod_log() { - # $1 namespace, $2 pod. Prefer the app container; fall back to the - # pod default if that container name does not exist. - out=$(curl -s --cacert "$SA_DIR/ca.crt" \ - -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ - "$API/api/v1/namespaces/$1/pods/$2/log?container=pr-component&sinceSeconds=600" || true) - if printf '%s' "$out" | grep -q '"kind":"Status"'; then - out=$(curl -s --cacert "$SA_DIR/ca.crt" \ - -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ - "$API/api/v1/namespaces/$1/pods/$2/log?sinceSeconds=600" || true) - fi - printf '%s' "$out" - } - for APP in $BUILD_APPS; do - POD=$(echo "$DEPLOYED_PODS" | jq -r --arg a "$APP" '.[$a] // empty') - if [ -z "$POD" ]; then - echo " $APP: FAIL — no PR pod recorded in deployed-pods" - FAILED=1 - continue - fi - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - SVC="http://${APP}.${NS}.svc.cluster.local:${SPORT}" - TAG=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12) - HIT="probehit${TAG}" - MISS="probemiss${TAG}" - - HIT_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - --connect-timeout 10 --max-time 30 \ - "${SVC}/propagation?${HIT}" 2>/dev/null || echo "000") - MISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --connect-timeout 10 --max-time 30 \ - "${SVC}/propagation?${MISS}" 2>/dev/null || echo "000") - echo " $APP -> $POD: matched request HTTP $HIT_CODE, unmatched request HTTP $MISS_CODE" - - LOG="" - ATTEMPT=0 - while [ $ATTEMPT -lt 10 ]; do - ATTEMPT=$((ATTEMPT + 1)) - LOG=$(pod_log "$NS" "$POD") - if printf '%s' "$LOG" | grep -q "$HIT"; then break; fi - sleep 2 - done - - if ! printf '%s' "$LOG" | grep -q "$HIT"; then - echo " $APP: FAIL — header-matched request never reached PR pod $POD (intercept is not routing)" - echo " --- last 20 log lines of $POD ---" - printf '%s\n' "$LOG" | tail -n 20 | sed 's/^/ /' - FAILED=1 - elif printf '%s' "$LOG" | grep -q "$MISS"; then - echo " $APP: FAIL — unmatched request also reached PR pod $POD (intercept steals all traffic)" - FAILED=1 - else - echo " $APP: PASS — PR pod $POD served the matched request and not the unmatched one" - fi - done - echo "" - if [ "$FAILED" -ne 0 ]; then - echo "FAIL: intercept routing not proven" - exit 1 - fi - echo "PASS: intercept routing proven from PR pod access logs" - echo "" - elif [ -n "$BUILD_APPS" ]; then - echo "Routing proof skipped: deployed-pods not provided" - echo "" - fi - - echo "Propagation validation complete." -kind: List -metadata: - resourceVersion: "" diff --git a/artifacts/intercept-e2e/pr-traffic-evidence.log b/artifacts/intercept-e2e/pr-traffic-evidence.log deleted file mode 100644 index 573a53a..0000000 --- a/artifacts/intercept-e2e/pr-traffic-evidence.log +++ /dev/null @@ -1,66 +0,0 @@ -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
-[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization -[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl diff --git a/artifacts/intercept-e2e/readyz.json b/artifacts/intercept-e2e/readyz.json deleted file mode 100644 index bf2d58c..0000000 --- a/artifacts/intercept-e2e/readyz.json +++ /dev/null @@ -1 +0,0 @@ -{"stacks_loaded":9,"status":"ok"} diff --git a/artifacts/intercept-e2e/run-1-pipeline-results.json b/artifacts/intercept-e2e/run-1-pipeline-results.json deleted file mode 100644 index f911afb..0000000 --- a/artifacts/intercept-e2e/run-1-pipeline-results.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "stackrun-bootstrap-bhmj5", - "condition": { - "lastTransitionTime": "2026-09-28T03:14:30Z", - "message": "Tasks Completed: 8 (Failed: 0, Cancelled 0), Skipped: 5", - "reason": "Completed", - "status": "True", - "type": "Succeeded" - }, - "results": [] -} diff --git a/artifacts/intercept-e2e/run-1-pipelinerun.yaml b/artifacts/intercept-e2e/run-1-pipelinerun.yaml deleted file mode 100644 index 8a71589..0000000 --- a/artifacts/intercept-e2e/run-1-pipelinerun.yaml +++ /dev/null @@ -1,482 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: PipelineRun -metadata: - annotations: - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:08Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/pipeline: stack-bootstrap - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5 - namespace: tekton-pipelines - resourceVersion: "12223" - uid: eb808615-af94-42bf-939a-f2c547b42675 -spec: - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: git-revision - value: main - - name: stack-file - value: stacks/stack-one.yaml - - name: image-registry - value: localhost:5000 - - name: cache-repo - value: "" - - name: max-retries - value: "2" - pipelineRef: - name: stack-bootstrap - taskRunTemplate: - serviceAccountName: tekton-pr-sa - timeouts: - pipeline: 2h0m0s - workspaces: - - name: shared-workspace - volumeClaimTemplate: - metadata: - creationTimestamp: null - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2Gi - status: {} - - name: ssh-key - secret: - secretName: ssh-key-secret - - name: build-cache - persistentVolumeClaim: - claimName: build-cache -status: - childReferences: - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-fetch-source - pipelineTaskName: fetch-source - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-resolve-stack - pipelineTaskName: resolve-stack - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-clone-app-repos - pipelineTaskName: clone-app-repos - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-build-select-tool-apps - pipelineTaskName: build-select-tool-apps - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-build-compile-npm - pipelineTaskName: build-compile-npm - whenExpressions: - - input: "true" - operator: in - values: - - "true" - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-build-compile-maven - pipelineTaskName: build-compile-maven - whenExpressions: - - input: "true" - operator: in - values: - - "true" - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-build-containerize - pipelineTaskName: build-containerize - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-bootstrap-bhmj5-deploy-full-stack - pipelineTaskName: deploy-full-stack - completionTime: "2026-09-28T03:14:30Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:30Z" - message: 'Tasks Completed: 8 (Failed: 0, Cancelled 0), Skipped: 5' - reason: Completed - status: "True" - type: Succeeded - pipelineSpec: - description: | - One-time bootstrap: clone, resolve, build all stack apps, deploy full stack. Run this so the cluster has every app running (Services by app name). Then run stack-pr-test with a changed-app to add intercepts and run E2E. - params: - - description: Platform repo URL (has stacks/; app repos come from stack) - name: git-url - type: string - - description: Branch, tag, or SHA - name: git-revision - type: string - - default: stacks/stack-one.yaml - description: Path to stack YAML relative to repo root - name: stack-file - type: string - - description: Container registry base (e.g. localhost:5000) - name: image-registry - type: string - - default: base-1 - description: Tag for base images (e.g. base-1) - name: image-tag - type: string - - default: ubuntu:22.04 - description: Image for npm compile step - name: compile-image-npm - type: string - - default: ubuntu:22.04 - description: Image for Maven compile step - name: compile-image-maven - type: string - - default: ubuntu:22.04 - description: Image for Gradle compile step - name: compile-image-gradle - type: string - - default: ubuntu:22.04 - description: Image for pip compile step - name: compile-image-pip - type: string - - default: ubuntu:22.04 - description: Image for Composer/PHP compile step - name: compile-image-php - type: string - - default: "" - description: Kaniko cache repo. Empty disables cache. - name: cache-repo - type: string - - default: "0" - description: Max concurrent Kaniko pods for containerize. 0 = unlimited. - name: max-parallel-builds - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task to run after clone, before compile. - name: pre-build-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task to run after containerize, before deploy. - name: post-build-task - type: string - tasks: - - name: fetch-source - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - taskRef: - kind: Task - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - - name: resolve-stack - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: version-overrides - value: '{}' - runAfter: - - fetch-source - taskRef: - kind: Task - name: resolve-stack - workspaces: - - name: source - workspace: shared-workspace - - name: clone-app-repos - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: git-revision - value: main - runAfter: - - resolve-stack - taskRef: - kind: Task - name: clone-app-repos - workspaces: - - name: source - workspace: shared-workspace - - name: ssh-key - workspace: ssh-key - - name: build-select-tool-apps - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - runAfter: - - clone-app-repos - taskRef: - kind: Task - name: build-select-tool-apps - workspaces: - - name: source - workspace: shared-workspace - - name: hook-pre-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - runAfter: - - build-select-tool-apps - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: build-compile-npm - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-npm - value: ubuntu:22.04 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-npm - when: - - input: $(tasks.resolve-stack.results.run-compile-npm) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-maven - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-maven - value: ubuntu:22.04 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-maven - when: - - input: $(tasks.resolve-stack.results.run-compile-maven) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-gradle - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-gradle - value: ubuntu:22.04 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-gradle - when: - - input: $(tasks.resolve-stack.results.run-compile-gradle) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-pip - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-pip - value: ubuntu:22.04 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-pip - when: - - input: $(tasks.resolve-stack.results.run-compile-pip) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-composer - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-php - value: ubuntu:22.04 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-composer - when: - - input: $(tasks.resolve-stack.results.run-compile-composer) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-containerize - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - - name: image-tag - value: base-1 - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - runAfter: - - build-compile-npm - - build-compile-maven - - build-compile-gradle - - build-compile-pip - - build-compile-composer - taskRef: - kind: Task - name: build-containerize - workspaces: - - name: source - workspace: shared-workspace - - name: hook-post-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: image-registry - value: localhost:5000 - runAfter: - - build-containerize - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: deploy-full-stack - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: default-namespace - value: staging - runAfter: - - build-containerize - taskRef: - kind: Task - name: deploy-full-stack - workspaces: - - name: shared-workspace - - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; - required for SSH pull - name: ssh-key - - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse - across runs. - name: build-cache - optional: true - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - skippedTasks: - - name: hook-pre-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: build-compile-gradle - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-pip - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-composer - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: hook-post-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - startTime: "2026-09-28T03:13:08Z" diff --git a/artifacts/intercept-e2e/run-1-pod-logs.txt b/artifacts/intercept-e2e/run-1-pod-logs.txt deleted file mode 100644 index 4a71ff5..0000000 --- a/artifacts/intercept-e2e/run-1-pod-logs.txt +++ /dev/null @@ -1,305 +0,0 @@ -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/prepare] 2026/09/28 03:13:38 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/prepare] 2026/09/28 03:13:19 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/place-scripts] 2026/09/28 03:13:38 Decoded script /tekton/scripts/script-0-x4dvx -[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/prepare] 2026/09/28 03:13:31 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/prepare] 2026/09/28 03:14:25 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/prepare] 2026/09/28 03:13:38 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/place-scripts] 2026/09/28 03:14:26 Decoded script /tekton/scripts/script-0-xsnqx -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/place-scripts] 2026/09/28 03:14:07 Decoded script /tekton/scripts/script-0-nc9v2 -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/place-scripts] 2026/09/28 03:13:38 Decoded script /tekton/scripts/script-0-nlv58 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/prepare] 2026/09/28 03:14:06 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] === Compile (maven): release-lifecycle-demo === -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Scanning for projects... -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -----------------< com.example:tekton-dag-spring-boot >----------------- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building tekton-dag-spring-boot 0.1.0 -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --------------------------------[ jar ]--------------------------------- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-clean-plugin:3.3.2:clean (default-clean) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Copying 1 resource from src/main/resources to target/classes -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Copying 0 resource from src/main/resources to target/classes -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :source -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 2 source files with javac [debug release 21] to target/classes -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/release-lifecycle-demo/src/test/resources -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:testCompile (default-testCompile) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :dependency -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 1 source file with javac [debug release 21] to target/test-classes -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-surefire-plugin:3.1.2:test (default-test) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Tests are skipped. -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building jar: /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- spring-boot-maven-plugin:3.2.0:repackage (repackage) @ tekton-dag-spring-boot --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Replacing main artifact /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar with repackaged archive, adding nested dependencies in BOOT-INF/. -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] The original artifact has been renamed to /workspace/source/release-lifecycle-demo/target/tekton-dag-spring-boot-0.1.0.jar.original -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] BUILD SUCCESS -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Total time: 1.435 s -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Finished at: 2026-09-28T03:14:03Z -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] === Compile (maven): demo-api === -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Scanning for projects... -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -------------< com.example:tekton-dag-spring-boot-gradle >-------------- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building tekton-dag-spring-boot-gradle 0.1.0 -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --------------------------------[ jar ]--------------------------------- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-clean-plugin:3.3.2:clean (default-clean) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/main/resources -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/main/resources -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Changes detected - recompiling the module! :source -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Compiling 3 source files with javac [debug release 21] to target/classes -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-resources-plugin:3.3.1:testResources (default-testResources) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] skip non existing resourceDirectory /workspace/source/demo-api/src/test/resources -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-compiler-plugin:3.11.0:testCompile (default-testCompile) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] No sources to compile -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-surefire-plugin:3.1.2:test (default-test) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Tests are skipped. -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Building jar: /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] --- spring-boot-maven-plugin:3.2.0:repackage (repackage) @ tekton-dag-spring-boot-gradle --- -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Replacing main artifact /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar with repackaged archive, adding nested dependencies in BOOT-INF/. -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] The original artifact has been renamed to /workspace/source/demo-api/target/tekton-dag-spring-boot-gradle-0.1.0.jar.original -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] BUILD SUCCESS -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Total time: 1.328 s -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] Finished at: 2026-09-28T03:14:05Z -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] [INFO] ------------------------------------------------------------------------ -[pod/stackrun-bootstrap-bhmj5-build-compile-maven-pod/step-compile-maven] Compile (maven) done. -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 1s -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] run `npm fund` for details -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] npm audit fix -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] npm audit fix --force -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] > vite build -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] transforming... -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] rendering chunks... -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] computing gzip size... -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] ✓ built in 468ms -[pod/stackrun-bootstrap-bhmj5-build-compile-npm-pod/step-compile-npm] Compile (npm) done. -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] Resolved versions: -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] { -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] } -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/step-resolve] truetruefalsefalsefalse -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/place-scripts] 2026/09/28 03:13:25 Decoded script /tekton/scripts/script-0-l6cgk -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/prepare] 2026/09/28 03:13:14 Entrypoint initialization -[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' true '=' true ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + cleandir -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + test -z -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] {"level":"info","ts":1790565198.504641,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] {"level":"info","ts":1790565198.5168085,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + cd /workspace/output/ -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git rev-parse HEAD -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + EXIT_CODE=0 -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' 1790468109 -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Apps: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] PVC: pvc-58ec7948bb -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Cache: disabled -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Max parallel: 0 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: demo-fe -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565249 created -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-release-lifecycle-demo-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/release-lifecycle-demo:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/release-lifecycle-demo:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-release-lifecycle-demo-1790565249 created -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Containerize: demo-api -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Launching: kaniko-demo-api-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-api:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-api:base-1 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod/kaniko-demo-api-1790565249 created -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] --- Waiting for final batch --- -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565249: Succeeded -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-release-lifecycle-demo-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-release-lifecycle-demo-1790565249: Succeeded -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Waiting: kaniko-demo-api-1790565249 -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] kaniko-demo-api-1790565249: Succeeded -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565249" deleted from tekton-pipelines namespace -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-demo-api-1790565249" deleted from tekton-pipelines namespace -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] pod "kaniko-release-lifecycle-demo-1790565249" deleted from tekton-pipelines namespace -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] Built images: -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] { -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:base-1", -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-api": "localhost:5000/demo-api:base-1" -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] } -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] { -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:base-1", -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] "demo-api": "localhost:5000/demo-api:base-1" -[pod/stackrun-bootstrap-bhmj5-build-containerize-pod/step-containerize] } -[pod/stackrun-bootstrap-bhmj5-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:13:31 Decoded script /tekton/scripts/script-0-sl58b -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] ============================================= -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploy full stack (base for intercept E2E) -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] ============================================= -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying demo-fe -> staging (image: localhost:5000/demo-fe:base-1) -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=originator -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=demo-fe -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] DOWNSTREAM_URL=http://release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BFF_UPSTREAM=http://release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging configured -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-fe unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/demo-fe unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying release-lifecycle-demo -> staging (image: localhost:5000/release-lifecycle-demo:base-1) -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=forwarder -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] DOWNSTREAM_URL=http://demo-api -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BFF_UPSTREAM=http://demo-api -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/release-lifecycle-demo unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/release-lifecycle-demo unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Deploying demo-api -> staging (image: localhost:5000/demo-api:base-1) -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Baggage env: -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ENABLED=true -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_ROLE=terminal -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_HEADER_NAME=x-dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] BAGGAGE_KEY=dev-session -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] APP_NAME=demo-api -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] namespace/staging unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-api unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] service/demo-api unchanged -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Waiting for Deployments to be available... -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-fe condition met -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/release-lifecycle-demo condition met -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] deployment.apps/demo-api condition met -[pod/stackrun-bootstrap-bhmj5-deploy-full-stack-pod/step-deploy] Full stack deployed. -[pod/stackrun-bootstrap-bhmj5-fetch-source-pod/place-scripts] 2026/09/28 03:13:14 Decoded script /tekton/scripts/script-0-9lrll -[pod/stackrun-bootstrap-bhmj5-resolve-stack-pod/place-scripts] 2026/09/28 03:13:19 Decoded script /tekton/scripts/script-0-mtbsv -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning release-lifecycle-demo from https://github.com/jmjava/tekton-dag-spring-boot.git (revision: main) -> /workspace/source/release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Cloning demo-api from https://github.com/jmjava/tekton-dag-spring-boot-gradle.git (revision: main) -> /workspace/source/demo-api -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [release-lifecycle-demo] Cloning into '/workspace/source/release-lifecycle-demo'... -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-api] Cloning into '/workspace/source/demo-api'... -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: demo-fe -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-spring-boot -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at d13b03e Merge pull request #1 from jmjava/milestone-4 -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [release-lifecycle-demo] at d13b03e (main) -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-spring-boot-gradle -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] HEAD is now at c0840ee Fix Dockerfile: use target/*.jar (Maven output) instead of build/libs -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] [demo-api] at c0840ee (main) -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] Done: demo-api -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/release-lifecycle-demo -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-api -[pod/stackrun-bootstrap-bhmj5-clone-app-repos-pod/prepare] 2026/09/28 03:13:25 Entrypoint initialization diff --git a/artifacts/intercept-e2e/run-1-stackrun.yaml b/artifacts/intercept-e2e/run-1-stackrun.yaml deleted file mode 100644 index 4b9b720..0000000 --- a/artifacts/intercept-e2e/run-1-stackrun.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: tektondag.io/v1alpha1 -kind: StackRun -metadata: - creationTimestamp: "2026-09-28T03:13:08Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - tektondag.io/mode: bootstrap - name: stackrun-bootstrap-bhmj5 - namespace: tekton-pipelines - resourceVersion: "12224" - uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 -spec: - cacheRepo: "" - gitRevision: main - gitUrl: https://github.com/jmjava/tekton-dag.git - imageRegistry: localhost:5000 - maxRetries: 2 - mode: bootstrap - stackFile: stacks/stack-one.yaml - stackRef: stack-one - timeout: 2h -status: - conditions: - - lastTransitionTime: "2026-09-28T03:13:08Z" - message: PipelineRun stackrun-bootstrap-bhmj5 phase=Completed - observedGeneration: 1 - reason: Completed - status: "False" - type: Ready - observedGeneration: 1 - phase: Completed - pipelineRunName: stackrun-bootstrap-bhmj5 diff --git a/artifacts/intercept-e2e/run-1-taskruns.yaml b/artifacts/intercept-e2e/run-1-taskruns.yaml deleted file mode 100644 index 9a19f78..0000000 --- a/artifacts/intercept-e2e/run-1-taskruns.yaml +++ /dev/null @@ -1,1946 +0,0 @@ -apiVersion: v1 -items: -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:37Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: build-compile-maven - tekton.dev/task: build-compile-maven - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-build-compile-maven - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "12019" - uid: 6226e26c-ded1-4c51-970c-8af2f72fe8eb - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: compile-image-maven - value: ubuntu:22.04 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-compile-maven - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - - name: build-cache - persistentVolumeClaim: - claimName: build-cache - status: - artifacts: {} - completionTime: "2026-09-28T03:14:05Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:05Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-build-compile-maven-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:13:37Z" - steps: - - container: step-compile-maven - imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 - name: compile-maven - provenance: {} - terminated: - containerID: containerd://988f0c82664fbb0c360df98044cf1f3a332fed1d58b8a01b160546e4adc4fb14 - exitCode: 0 - finishedAt: "2026-09-28T03:14:05Z" - reason: Completed - startedAt: "2026-09-28T03:13:42Z" - terminationReason: Completed - taskSpec: - description: Runs Maven compile for apps in .tool-apps.json (invoked only when - build-apps include maven). - params: - - name: stack-json - type: string - - default: ubuntu:22.04 - name: compile-image-maven - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: COMPILE_IMAGE - value: ubuntu:22.04 - image: ubuntu:22.04 - name: compile-maven - script: | - #!/usr/bin/env bash - set -e - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates openjdk-21-jdk-headless >/dev/null 2>&1; fi - [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.m2/repository" && export MAVEN_OPTS="-Dmaven.repo.local=$CACHE/.m2/repository" - APPS=$(jq -r '.maven[]' .tool-apps.json 2>/dev/null || true) - [ -z "$APPS" ] && echo "No maven apps" && exit 0 - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then - apt-get install -y -qq maven >/dev/null 2>&1 || { curl -fsSL https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz | tar xz -C /opt && ln -sf /opt/apache-maven-3.9.6/bin/mvn /usr/local/bin/mvn; } - fi - for APP in $APPS; do - echo "=== Compile (maven): $APP ===" - CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') - PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') - POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') - CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') - APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" - [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - cd "$APP_DIR" - [ -n "$PRE_CMD" ] && eval "$PRE_CMD" - [ -n "$CMD" ] && eval "$CMD" || mvn -B clean package -DskipTests - [ -n "$POST_CMD" ] && eval "$POST_CMD" - done - echo "Compile (maven) done." - workingDir: /workspace/source - workspaces: - - name: source - - name: build-cache - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:37Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: build-compile-npm - tekton.dev/task: build-compile-npm - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-build-compile-npm - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "12006" - uid: 57a2df7c-a576-453c-941f-fd80c8bc7fc0 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: compile-image-npm - value: ubuntu:22.04 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-compile-npm - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - - name: build-cache - persistentVolumeClaim: - claimName: build-cache - status: - artifacts: {} - completionTime: "2026-09-28T03:14:04Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:04Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-build-compile-npm-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:13:37Z" - steps: - - container: step-compile-npm - imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 - name: compile-npm - provenance: {} - terminated: - containerID: containerd://2a88534b4d567c2a447812b431effbdd77879224eaa274ad80d2acb055b49211 - exitCode: 0 - finishedAt: "2026-09-28T03:14:04Z" - reason: Completed - startedAt: "2026-09-28T03:13:42Z" - terminationReason: Completed - taskSpec: - description: Runs npm compile for apps in .tool-apps.json (invoked only when - build-apps include npm). - params: - - name: stack-json - type: string - - default: ubuntu:22.04 - name: compile-image-npm - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: COMPILE_IMAGE - value: ubuntu:22.04 - image: ubuntu:22.04 - name: compile-npm - script: | - #!/usr/bin/env bash - set -e - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi - [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" - APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) - [ -z "$APPS" ] && echo "No npm apps" && exit 0 - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 - fi - for APP in $APPS; do - echo "=== Compile (npm): $APP ===" - CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') - PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') - POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') - CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') - APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" - [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - cd "$APP_DIR" - [ -n "$PRE_CMD" ] && eval "$PRE_CMD" - if [ -n "$CMD" ]; then - RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') - eval "$RUN_CMD" - else - [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present - fi - [ -n "$POST_CMD" ] && eval "$POST_CMD" - done - echo "Compile (npm) done." - workingDir: /workspace/source - workspaces: - - name: source - - name: build-cache - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:14:05Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: build-containerize - tekton.dev/task: build-containerize - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-build-containerize - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "12160" - uid: 4f6f41e1-94c6-4849-8fb4-151102447280 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe release-lifecycle-demo demo-api - - name: image-registry - value: localhost:5000 - - name: image-tag - value: base-1 - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-containerize - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - status: - artifacts: {} - completionTime: "2026-09-28T03:14:24Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:24Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-build-containerize-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: built-images - type: string - value: | - { - "demo-fe": "localhost:5000/demo-fe:base-1", - "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", - "demo-api": "localhost:5000/demo-api:base-1" - } - startTime: "2026-09-28T03:14:05Z" - steps: - - container: step-containerize - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: containerize - provenance: {} - terminated: - containerID: containerd://e9dd691b622fdde8a7e2821346833a013c35fd181c2de93ef237372ea47ac262 - exitCode: 0 - finishedAt: "2026-09-28T03:14:24Z" - message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:base-1\",\n \"release-lifecycle-demo\": - \"localhost:5000/release-lifecycle-demo:base-1\",\n \"demo-api\": \"localhost:5000/demo-api:base-1\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:09Z" - terminationReason: Completed - taskSpec: - description: | - Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. - params: - - name: stack-json - type: string - - name: build-apps - type: string - - name: image-registry - type: string - - name: image-tag - type: string - - default: pr- - name: tag-prefix - type: string - - default: "" - description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables - cache. - name: cache-repo - type: string - - default: "0" - description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). - name: max-parallel-builds - type: string - results: - - description: JSON map of app-name → full image URI - name: built-images - type: string - steps: - - computeResources: {} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: bitnami/kubectl:latest - name: containerize - script: | - #!/bin/bash - set -e - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe release-lifecycle-demo demo-api" - REGISTRY="localhost:5000" - IMAGE_TAG='base-1' - TAG_PREFIX="" - CACHE_REPO="" - MAX_PARALLEL="0" - SOURCE_PVC="pvc-58ec7948bb" - SOURCE_PATH="/workspace/source" - NS="$POD_NAMESPACE" - - PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') - PUSH_CACHE="" - if [ -n "$CACHE_REPO" ]; then - PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') - fi - - if [ -z "$SOURCE_PVC" ]; then - echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 - exit 1 - fi - - IS_JSON=false - case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac - - TS=$(date +%s) - - echo "=============================================" - echo " Parallel Containerize (Kaniko pods)" - echo "=============================================" - echo " Apps: $BUILD_APPS" - echo " PVC: $SOURCE_PVC" - echo " Cache: ${CACHE_REPO:-disabled}" - echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" - echo "" - - > /tmp/pod-list.txt - > /tmp/app-images.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - - wait_for_batch() { - local BATCH_FAILED="" - while IFS= read -r P; do - [ -z "$P" ] && continue - echo " Waiting: $P" >&2 - while true; do - PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") - case "$PH" in - Succeeded) echo " $P: Succeeded" >&2; break ;; - Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; - *) sleep 5 ;; - esac - done - done < /tmp/batch-pods.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - echo "$BATCH_FAILED" - } - - FAILED="" - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Containerize: $APP" - echo "=========================================" - - if $IS_JSON; then - APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) - [ -z "$APP_VER" ] && APP_VER="latest" - TAG="${TAG_PREFIX}${APP_VER}" - else - TAG="${TAG_PREFIX}${IMAGE_TAG}" - fi - - CONTEXT_PATH="${SOURCE_PATH}/${APP}" - FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" - PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" - PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" - - if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then - echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - continue - fi - - KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" - if [ -n "$PUSH_CACHE" ]; then - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" - else - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" - fi - KANIKO_ARGS="${KANIKO_ARGS}]" - - POD_NAME="kaniko-${APP}-${TS}" - echo " Launching: $POD_NAME" - echo " Push to: $PUSH_IMAGE" - echo " Pull as: $PULL_IMAGE" - - cat <> /tmp/pod-list.txt - echo "$POD_NAME" >> /tmp/batch-pods.txt - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - BATCH_COUNT=$((BATCH_COUNT + 1)) - echo "" - - if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then - echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - done - - if [ -s /tmp/batch-pods.txt ]; then - echo " --- Waiting for final batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - - echo "" - echo " Cleaning up Kaniko pods..." - while IFS= read -r POD_NAME; do - [ -z "$POD_NAME" ] && continue - kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & - done < /tmp/pod-list.txt - wait - - if [ -n "$FAILED" ]; then - echo "FAILED: Kaniko pods failed:$FAILED" >&2 - for P in $FAILED; do - echo "--- Logs for $P ---" - kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true - done - exit 1 - fi - - > /tmp/parts.txt - while IFS='=' read -r APP IMG; do - [ -z "$APP" ] && continue - echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt - done < /tmp/app-images.txt - - TOTAL=$(wc -l < /tmp/parts.txt) - COUNT=0 - echo '{' > /tmp/built.json - while IFS= read -r line; do - COUNT=$((COUNT + 1)) - if [ "$COUNT" -lt "$TOTAL" ]; then - echo "${line}," >> /tmp/built.json - else - echo "${line}" >> /tmp/built.json - fi - done < /tmp/parts.txt - echo '}' >> /tmp/built.json - - echo "" - echo " Built images:" - cat /tmp/built.json - cat /tmp/built.json | tee /tekton/results/built-images - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:30Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: build-select-tool-apps - tekton.dev/task: build-select-tool-apps - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-build-select-tool-apps - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "11826" - uid: ef45341a-f32a-47d1-908d-af426141d9c9 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe release-lifecycle-demo demo-api - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-select-tool-apps - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - status: - artifacts: {} - completionTime: "2026-09-28T03:13:37Z" - conditions: - - lastTransitionTime: "2026-09-28T03:13:37Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-build-select-tool-apps-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:13:30Z" - steps: - - container: step-select-tool-apps - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: select-tool-apps - provenance: {} - terminated: - containerID: containerd://e57aa968193bebc54f1afdc7d06aee6f8c9aa94dbf0a0a14cb9b7c72506c7fd2 - exitCode: 0 - finishedAt: "2026-09-28T03:13:37Z" - reason: Completed - startedAt: "2026-09-28T03:13:36Z" - terminationReason: Completed - taskSpec: - description: Writes .tool-apps.json from stack-json and build-apps; used by - conditional compile tasks. - params: - - name: stack-json - type: string - - name: build-apps - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: BUILD_APPS - value: demo-fe release-lifecycle-demo demo-api - image: alpine:3.19 - name: select-tool-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" - for app in $BUILD_APPS; do - tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) NPM_APPS="$NPM_APPS $app" ;; - maven) MAVEN_APPS="$MAVEN_APPS $app" ;; - gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; - pip) PIP_APPS="$PIP_APPS $app" ;; - composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; - esac - done - jq -n \ - --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ - '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json - echo "Tool app lists written to .tool-apps.json" - workingDir: /workspace/source - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:24Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: clone-app-repos - tekton.dev/task: clone-app-repos - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-clone-app-repos - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "11755" - uid: 39decb57-ff32-4e53-85e9-69061edd8499 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe release-lifecycle-demo demo-api - - name: git-revision - value: main - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: clone-app-repos - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - - name: ssh-key - secret: - secretName: ssh-key-secret - status: - artifacts: {} - completionTime: "2026-09-28T03:13:30Z" - conditions: - - lastTransitionTime: "2026-09-28T03:13:30Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-clone-app-repos-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:13:24Z" - steps: - - container: step-clone-apps - imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f - name: clone-apps - provenance: {} - terminated: - containerID: containerd://0e99c8112e3feb6bcb6b3b43aa019a9d2af8b258d97732657befd2e6666e415c - exitCode: 0 - finishedAt: "2026-09-28T03:13:30Z" - reason: Completed - startedAt: "2026-09-28T03:13:29Z" - terminationReason: Completed - taskSpec: - description: | - Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. - params: - - description: Stack graph JSON (from resolve-stack) - name: stack-json - type: string - - description: Space-separated list of app names to clone - name: build-apps - type: string - - default: main - description: Branch or SHA to check out for app repos (default; overridden - by app-revisions per app) - name: git-revision - type: string - - default: '{}' - description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). - Used for PR builds where the changed app is checked out at its PR branch. - name: app-revisions - type: string - steps: - - computeResources: {} - image: alpine/git:latest - name: clone-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe release-lifecycle-demo demo-api" - DEFAULT_REVISION="main" - APP_REVISIONS='{}' - WORKSPACE="/workspace/source" - - # Clear existing app dirs so we get a fresh clone (no stale/cached content) - echo " Clearing existing app dirs..." - for APP in $BUILD_APPS; do - rm -rf "$WORKSPACE/$APP" - done - - # Prefer authenticated SSH when a key is present. Public repositories - # can be cloned over HTTPS from an empty Secret workspace. - mkdir -p /root/.ssh - chmod 700 /root/.ssh - KEY_DIR="/workspace/ssh-key" - CLONE_TRANSPORT=https - if [ -f "$KEY_DIR/id_ed25519" ]; then - cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 - chmod 600 /root/.ssh/id_ed25519 - CLONE_TRANSPORT=ssh - elif [ -f "$KEY_DIR/id_rsa" ]; then - cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa - chmod 600 /root/.ssh/id_rsa - CLONE_TRANSPORT=ssh - else - echo " No SSH key found; cloning public repositories over HTTPS" - fi - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true - fi - - # Clone all app repos in parallel (M7.1) - clone_app() { - local APP="$1" REPO="$2" REVISION="$3" URL="$4" - echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" - git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" - if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then - echo "ERROR: could not fetch $REVISION for $APP" >&2 - exit 1 - fi - git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD - echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" - echo " Done: $APP" - } - - PIDS="" - for APP in $BUILD_APPS; do - REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') - if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then - echo " WARN: No repo for app $APP in stack, skipping" - continue - fi - REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') - [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - URL="git@github.com:${REPO}.git" - else - URL="https://github.com/${REPO}.git" - fi - clone_app "$APP" "$REPO" "$REVISION" "$URL" & - PIDS="$PIDS $!" - done - - CLONE_FAILED=false - for PID in $PIDS; do - if ! wait "$PID"; then - CLONE_FAILED=true - fi - done - if [ "$CLONE_FAILED" = "true" ]; then - echo "ERROR: One or more clones failed" >&2 - exit 1 - fi - - echo "" - echo "App repos cloned (parallel). Listing:" - for APP in $BUILD_APPS; do - [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true - done - workingDir: /workspace/source - workspaces: - - description: Workspace with platform repo at root; app repos will be cloned - into source/ - name: source - - description: Volume that may contain id_ed25519 or id_rsa for private-repository - SSH clones - name: ssh-key -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:14:25Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: deploy-full-stack - tekton.dev/task: deploy-full-stack - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-deploy-full-stack - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "12221" - uid: a1ed4745-7f31-407c-a1d3-4e75f35d049a - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: built-images - value: | - { - "demo-fe": "localhost:5000/demo-fe:base-1", - "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", - "demo-api": "localhost:5000/demo-api:base-1" - } - - name: default-namespace - value: staging - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: deploy-full-stack - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:14:29Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:29Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-deploy-full-stack-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:14:25Z" - steps: - - container: step-deploy - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: deploy - provenance: {} - terminated: - containerID: containerd://f121b1c7185724070652ab471061fb045f783983ff3927008c366cb65ca16cfd - exitCode: 0 - finishedAt: "2026-09-28T03:14:29Z" - reason: Completed - startedAt: "2026-09-28T03:14:28Z" - terminationReason: Completed - taskSpec: - description: | - Deploys the full stack so every app has a Deployment and Service in the cluster. Used once (bootstrap) before running PR pipeline with intercepts. deploy-stack-intercepts expects these Services to exist; it only adds PR pods + Telepresence intercept for changed app(s). M13: injects stack secrets/config blocks as envFrom and volume mounts; fails fast when referenced Secrets are missing. Also injects BAGGAGE_* / APP_NAME / DOWNSTREAM_URL so install() copies the original override header hop-to-hop without a hand-written env block. - params: - - description: Full stack graph JSON (apps, defaults.namespace, ports, secrets, - config) - name: stack-json - type: string - - description: JSON map of app name → image URI - name: built-images - type: string - - default: staging - description: Namespace for apps that do not specify one - name: default-namespace - type: string - - default: "true" - description: When true, fail if referenced Secrets are missing before apply - name: validate-secrets - type: string - steps: - - computeResources: {} - image: bitnami/kubectl:latest - name: deploy - script: | - #!/bin/bash - set -euo pipefail - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILT='{ - "demo-fe": "localhost:5000/demo-fe:base-1", - "release-lifecycle-demo": "localhost:5000/release-lifecycle-demo:base-1", - "demo-api": "localhost:5000/demo-api:base-1" - } - ' - DEFAULT_NS="staging" - VALIDATE_SECRETS="true" - - echo "=============================================" - echo " Deploy full stack (base for intercept E2E)" - echo "=============================================" - - for APP in $(echo "$STACK_JSON" | jq -r '.apps[].name'); do - IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') - if [ -z "$IMAGE" ] || [ "$IMAGE" = "null" ]; then - echo " SKIP $APP: no image in built-images" - continue - fi - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - - # Pre-deploy Secret + ConfigMap validation (M13) - if [ "$VALIDATE_SECRETS" = "true" ]; then - MISSING_SECRETS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - .apps[] | select(.name==$a) | - [(.secrets."env-from" // [])[], ((.secrets."volume-mounts" // [])[]?.secret // empty)] | - unique | .[] - ') - for S in $MISSING_SECRETS; do - if ! kubectl get secret "$S" -n "$NS" >/dev/null 2>&1; then - echo "ERROR: app $APP references Secret '$S' which is missing in namespace $NS" - exit 1 - fi - done - MISSING_CMS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - .apps[] | select(.name==$a) | - [(.config."env-from" // [])[], ((.config."volume-mounts" // [])[]?.configmap // empty)] | - unique | .[] - ') - for C in $MISSING_CMS; do - if ! kubectl get configmap "$C" -n "$NS" >/dev/null 2>&1; then - echo "ERROR: app $APP references ConfigMap '$C' which is missing in namespace $NS" - exit 1 - fi - done - fi - - # Build Deployment JSON with optional envFrom / volumes from stack secrets+config - # Volume names are lowercased and sanitized for DNS-1123. - DEPLOY_JSON=$(echo "$STACK_JSON" | jq -c --arg a "$APP" --arg ns "$NS" \ - --arg img "$IMAGE" --argjson cport "$CPORT" ' - def volname($prefix; $i; $n): - (($prefix + "-" + ($i|tostring) + "-" + $n) - | ascii_downcase - | gsub("_"; "-") - | gsub("[^a-z0-9-]"; "-") - | gsub("-+"; "-") - | sub("^-+"; "") - | sub("-+$"; "") - | .[0:63]); - (.apps[] | select(.name==$a)) as $app | - ($app.secrets."env-from" // []) as $senv | - ($app.config."env-from" // []) as $cenv | - ($app.secrets."volume-mounts" // []) as $svm | - ($app.config."volume-mounts" // []) as $cvm | - [ - ($senv[] | {secretRef: {name: .}}), - ($cenv[] | {configMapRef: {name: .}}) - ] as $envFrom | - [ - ($svm | to_entries[] | { - name: volname("secret"; .key; .value.secret), - mountPath: .value."mount-path", - readOnly: true - }), - ($cvm | to_entries[] | { - name: volname("cm"; .key; .value.configmap), - mountPath: .value."mount-path", - readOnly: true - }) - ] as $mounts | - [ - ($svm | to_entries[] | { - name: volname("secret"; .key; .value.secret), - secret: {secretName: .value.secret} - }), - ($cvm | to_entries[] | { - name: volname("cm"; .key; .value.configmap), - configMap: {name: .value.configmap} - }) - ] as $vols | - ($app.downstream // []) as $down | - (.propagation."header-name" // "x-dev-session") as $hname | - (.propagation."baggage-key" // "dev-session") as $bkey | - ((.propagation.enabled // true) | tostring) as $penabled | - ($app."propagation-role" // ( - if ($down|length)==0 then "terminal" - elif (($app.role // "")|ascii_downcase) == "frontend" then "originator" - else "forwarder" - end - )) as $role | - ( - if ($penabled == "false" or $penabled == "False") then [] - else - [ - {name: "BAGGAGE_ENABLED", value: "true"}, - {name: "BAGGAGE_ROLE", value: $role}, - {name: "BAGGAGE_HEADER_NAME", value: $hname}, - {name: "BAGGAGE_KEY", value: $bkey}, - {name: "APP_NAME", value: $a} - ] - + (if ($down|length) > 0 then - [ - {name: "DOWNSTREAM_URL", value: ("http://" + ($down[0]|tostring))}, - {name: "BFF_UPSTREAM", value: ("http://" + ($down[0]|tostring))} - ] - else [] end) - end - ) as $baggageEnv | - { - apiVersion: "apps/v1", - kind: "Deployment", - metadata: { - name: $a, - namespace: $ns, - labels: {app: $a, "app.kubernetes.io/part-of": "tekton-stack"} - }, - spec: { - replicas: 1, - selector: {matchLabels: {app: $a}}, - template: { - metadata: {labels: {app: $a}}, - spec: ({ - containers: [( - { - name: "app", - image: $img, - ports: [{containerPort: ($cport|tonumber)}], - readinessProbe: { - tcpSocket: {port: ($cport|tonumber)}, - initialDelaySeconds: 15, - periodSeconds: 10 - } - } - + (if ($baggageEnv|length) > 0 then {env: $baggageEnv} else {} end) - + (if ($envFrom|length) > 0 then {envFrom: $envFrom} else {} end) - + (if ($mounts|length) > 0 then {volumeMounts: $mounts} else {} end) - )], - } + (if ($vols|length) > 0 then {volumes: $vols} else {} end)) - } - } - } - ') - - echo "" - echo " Deploying $APP -> $NS (image: $IMAGE)" - echo "$DEPLOY_JSON" | jq -r ' - .spec.template.spec.containers[0].env // [] - | map(" " + .name + "=" + .value) - | if length>0 then " Baggage env:\n" + join("\n") else empty end - ' - kubectl create namespace "$NS" --dry-run=client -o yaml | kubectl apply -f - - echo "$DEPLOY_JSON" | kubectl apply -f - - - kubectl apply -f - </dev/null || echo " WARN: $APP not ready yet" - done - echo " Full stack deployed." -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tekton.dev/categories: Git - tekton.dev/deprecated: "true" - tekton.dev/displayName: git clone - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 - tekton.dev/tags: git - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:09Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: fetch-source - tekton.dev/task: git-clone - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-fetch-source - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "11623" - uid: cabd5d48-bdfa-468e-99b9-9372a25d89c0 - spec: - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: git-clone - timeout: 1h0m0s - workspaces: - - name: output - persistentVolumeClaim: - claimName: pvc-58ec7948bb - status: - artifacts: {} - completionTime: "2026-09-28T03:13:18Z" - conditions: - - lastTransitionTime: "2026-09-28T03:13:18Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-fetch-source-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: commit - type: string - value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 - - name: committer-date - type: string - value: "1790468109" - - name: url - type: string - value: https://github.com/jmjava/tekton-dag.git - startTime: "2026-09-28T03:13:10Z" - steps: - - container: step-clone - imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df - name: clone - provenance: {} - terminated: - containerID: containerd://41189653631b01ce136c423c7421a71c5a9d1d34ab07e1e5c54cc8f110181e9b - exitCode: 0 - finishedAt: "2026-09-28T03:13:18Z" - message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:13:17Z" - terminationReason: Completed - taskSpec: - description: |- - These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. - The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. - params: - - description: Repository URL to clone from. - name: url - type: string - - default: "" - description: Revision to checkout. (branch, tag, sha, ref, etc...) - name: revision - type: string - - default: "" - description: Refspec to fetch before checking out revision. - name: refspec - type: string - - default: "true" - description: Initialize and fetch git submodules. - name: submodules - type: string - - default: "1" - description: Perform a shallow clone, fetching only the most recent N commits. - name: depth - type: string - - default: "true" - description: Set the `http.sslVerify` global git config. Setting this to `false` - is not advised unless you are sure that you trust your git remote. - name: sslVerify - type: string - - default: ca-bundle.crt - description: file name of mounted crt using ssl-ca-directory workspace. default - value is ca-bundle.crt. - name: crtFileName - type: string - - default: "" - description: Subdirectory inside the `output` Workspace to clone the repo - into. - name: subdirectory - type: string - - default: "" - description: Define the directory patterns to match or exclude when performing - a sparse checkout. - name: sparseCheckoutDirectories - type: string - - default: "true" - description: Clean out the contents of the destination directory if it already - exists before cloning. - name: deleteExisting - type: string - - default: "" - description: HTTP proxy server for non-SSL requests. - name: httpProxy - type: string - - default: "" - description: HTTPS proxy server for SSL requests. - name: httpsProxy - type: string - - default: "" - description: Opt out of proxying HTTP/HTTPS requests. - name: noProxy - type: string - - default: "true" - description: Log the commands that are executed during `git-clone`'s operation. - name: verbose - type: string - - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - description: The image providing the git-init binary that this Task runs. - name: gitInitImage - type: string - - default: /home/git - description: | - Absolute path to the user's home directory. - name: userHome - type: string - results: - - description: The precise commit SHA that was fetched by this Task. - name: commit - type: string - - description: The precise URL that was fetched by this Task. - name: url - type: string - - description: The epoch timestamp of the commit that was fetched by this Task. - name: committer-date - type: string - steps: - - computeResources: {} - env: - - name: HOME - value: /home/git - - name: PARAM_URL - value: https://github.com/jmjava/tekton-dag.git - - name: PARAM_REVISION - value: main - - name: PARAM_REFSPEC - - name: PARAM_SUBMODULES - value: "true" - - name: PARAM_DEPTH - value: "1" - - name: PARAM_SSL_VERIFY - value: "true" - - name: PARAM_CRT_FILENAME - value: ca-bundle.crt - - name: PARAM_SUBDIRECTORY - - name: PARAM_DELETE_EXISTING - value: "true" - - name: PARAM_HTTP_PROXY - - name: PARAM_HTTPS_PROXY - - name: PARAM_NO_PROXY - - name: PARAM_VERBOSE - value: "true" - - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES - - name: PARAM_USER_HOME - value: /home/git - - name: WORKSPACE_OUTPUT_PATH - value: /workspace/output - - name: WORKSPACE_SSH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSH_DIRECTORY_PATH - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH - - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSL_CA_DIRECTORY_PATH - image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - name: clone - script: | - #!/usr/bin/env sh - set -eu - - if [ "${PARAM_VERBOSE}" = "true" ] ; then - set -x - fi - - if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" - chmod 400 "${PARAM_USER_HOME}/.git-credentials" - chmod 400 "${PARAM_USER_HOME}/.gitconfig" - fi - - if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then - cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh - chmod 700 "${PARAM_USER_HOME}"/.ssh - chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* - fi - - if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then - export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" - if [ "${PARAM_CRT_FILENAME}" != "" ] ; then - export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" - fi - fi - CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" - - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" - # or the root of a mounted volume. - if [ -d "${CHECKOUT_DIR}" ] ; then - # Delete non-hidden files and directories - rm -rf "${CHECKOUT_DIR:?}"/* - # Delete files and directories starting with . but excluding .. - rm -rf "${CHECKOUT_DIR}"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "${CHECKOUT_DIR}"/..?* - fi - } - - if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then - cleandir || true - fi - - test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" - test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" - test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" - - git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" - /ko-app/git-init \ - -url="${PARAM_URL}" \ - -revision="${PARAM_REVISION}" \ - -refspec="${PARAM_REFSPEC}" \ - -path="${CHECKOUT_DIR}" \ - -sslVerify="${PARAM_SSL_VERIFY}" \ - -submodules="${PARAM_SUBMODULES}" \ - -depth="${PARAM_DEPTH}" \ - -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" - cd "${CHECKOUT_DIR}" - RESULT_SHA="$(git rev-parse HEAD)" - EXIT_CODE="$?" - if [ "${EXIT_CODE}" != 0 ] ; then - exit "${EXIT_CODE}" - fi - RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" - printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" - printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" - printf "%s" "${PARAM_URL}" > "/tekton/results/url" - securityContext: - runAsNonRoot: true - runAsUser: 65532 - workspaces: - - description: The git repo will be cloned onto the volume backing this Workspace. - name: output - - description: | - A .ssh directory with private key, known_hosts, config, etc. Copied to - the user's home before git commands are executed. Used to authenticate - with the git remote when performing the clone. Binding a Secret to this - Workspace is strongly recommended over other volume types. - name: ssh-directory - optional: true - - description: | - A Workspace containing a .gitconfig and .git-credentials file. These - will be copied to the user's home before any git commands are run. Any - other files in this Workspace are ignored. It is strongly recommended - to use ssh-directory over basic-auth whenever possible and to bind a - Secret to this Workspace over other volume types. - name: basic-auth - optional: true - - description: | - A workspace containing CA certificates, this will be used by Git to - verify the peer with when fetching or pushing over HTTPS. - name: ssl-ca-directory - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: 3e33705f-40f1-4543-9da2-beaec1beedc3 - creationTimestamp: "2026-09-28T03:13:18Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-bootstrap - tekton.dev/pipelineRun: stackrun-bootstrap-bhmj5 - tekton.dev/pipelineRunUID: eb808615-af94-42bf-939a-f2c547b42675 - tekton.dev/pipelineTask: resolve-stack - tekton.dev/task: resolve-stack - tektondag.io/stackrun: stackrun-bootstrap-bhmj5 - name: stackrun-bootstrap-bhmj5-resolve-stack - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-bootstrap-bhmj5 - uid: eb808615-af94-42bf-939a-f2c547b42675 - resourceVersion: "11686" - uid: 090c3a47-e421-425c-80ba-2c394be4472c - spec: - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: version-overrides - value: '{}' - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: resolve-stack - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-58ec7948bb - status: - artifacts: {} - completionTime: "2026-09-28T03:13:24Z" - conditions: - - lastTransitionTime: "2026-09-28T03:13:24Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-bootstrap-bhmj5-resolve-stack-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: app-list - type: string - value: demo-fe release-lifecycle-demo demo-api - - name: build-apps - type: string - value: demo-fe release-lifecycle-demo demo-api - - name: entry-app - type: string - value: demo-fe - - name: intercept-header-value - type: string - value: "" - - name: propagation-chain - type: string - value: | - demo-fe release-lifecycle-demo demo-api - - name: resolved-versions - type: string - value: | - {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} - - name: run-compile-composer - type: string - value: "false" - - name: run-compile-gradle - type: string - value: "false" - - name: run-compile-maven - type: string - value: "true" - - name: run-compile-npm - type: string - value: "true" - - name: run-compile-pip - type: string - value: "false" - - name: stack-json - type: string - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - startTime: "2026-09-28T03:13:18Z" - steps: - - container: step-resolve - imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 - name: resolve - provenance: {} - terminated: - containerID: containerd://1bcf97d69257e9e85826432d8d17a5bb97132804eed50d42c3447167d4f4639d - exitCode: 0 - finishedAt: "2026-09-28T03:13:24Z" - message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe - release-lifecycle-demo demo-api","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"","type":1},{"key":"propagation-chain","value":"demo-fe - release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"true","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo - 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence - (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm - install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:13:23Z" - terminationReason: Completed - taskSpec: - description: | - Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. - params: - - description: Path to the stack YAML relative to workspace root - name: stack-file - type: string - - default: stacks/versions.yaml - description: Path to versions.yaml relative to workspace root - name: versions-file - type: string - - default: '{}' - description: | - JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. - name: version-overrides - type: string - - default: "" - description: App whose PR triggered this run (empty = build all) - name: changed-app - type: string - - default: "" - description: PR number for intercept-header generation - name: pr-number - type: string - results: - - description: Full stack graph as JSON (includes build config per app) - name: stack-json - type: string - - description: Space-separated list of apps in topological order - name: app-list - type: string - - description: Entry-point app (typically the frontend) - name: entry-app - type: string - - description: Ordered chain of apps for header propagation validation - name: propagation-chain - type: string - - description: Header value to use for Telepresence intercepts - name: intercept-header-value - type: string - - description: Space-separated list of apps to build (changed-app or all) - name: build-apps - type: string - - description: true if any build-app uses npm (so only that compile step runs) - name: run-compile-npm - type: string - - description: true if any build-app uses maven - name: run-compile-maven - type: string - - description: true if any build-app uses gradle - name: run-compile-gradle - type: string - - description: true if any build-app uses pip - name: run-compile-pip - type: string - - description: true if any build-app uses composer - name: run-compile-composer - type: string - - description: JSON map of app → version (registry defaults merged with overrides) - name: resolved-versions - type: string - steps: - - computeResources: {} - env: - - name: YQ_VERSION - value: v4.45.4 - - name: JQ_VERSION - value: jq-1.7.1 - image: alpine:3.21 - name: resolve - script: | - #!/bin/sh - set -eu - - arch=$(uname -m) - case "$arch" in - x86_64) arch=amd64 ;; - aarch64|arm64) arch=arm64 ;; - *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; - esac - install_static() { - dest="$1" - url="$2" - wget -q -O "$dest" "$url" - chmod +x "$dest" - } - # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). - if ! apk add --no-cache jq yq-go; then - echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 - install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" - install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" - fi - command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } - command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } - - STACK="stacks/stack-one.yaml" - VFILE="stacks/versions.yaml" - OVERRIDES='{}' - CHANGED="" - PR="" - - if [ ! -f "$STACK" ]; then - echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 - ls -la >&2 - ls -la stacks >&2 || true - exit 1 - fi - - STACK_JSON=$(yq -o=json "$STACK") - - # ---------------------------------------------------------- - # Build the full graph JSON (preserves build config per app) - # ---------------------------------------------------------- - echo "$STACK_JSON" | jq -c '{ - name: .name, - description: .description, - propagation: .propagation, - defaults: .defaults, - apps: [.apps[] | { - name: .name, - repo: .repo, - role: .role, - "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), - namespace: (.namespace // null), - "container-port": (."container-port" // null), - "service-port": (."service-port" // null), - "context-dir": (."context-dir" // "."), - dockerfile: (.dockerfile // "Dockerfile"), - build: (.build // {tool:"none", runtime:"custom"}), - downstream: (.downstream // []), - tests: (.tests // {}) - }] - }' > /tmp/stack.json - - cat /tmp/stack.json | tee /tekton/results/stack-json - - # ---------------------------------------------------------- - # Resolve versions: registry defaults + overrides - # ---------------------------------------------------------- - VERSIONS_JSON="{}" - if [ -f "$VFILE" ]; then - VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' - [to_entries[] | {key: .key, value: .value.version}] | from_entries - ') - fi - - # Only keep versions for apps actually in this stack - APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') - STACK_VERSIONS="{}" - for APP in $APP_NAMES; do - VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') - done - - # Merge overrides on top - if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then - echo "Applying version overrides: $OVERRIDES" - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') - fi - - echo "Resolved versions:" - echo "$STACK_VERSIONS" | jq '.' - echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions - echo "" - - # ---------------------------------------------------------- - # Topological order - # ---------------------------------------------------------- - TOPO=$(cat /tmp/stack.json | jq -r ' - def vis($n;$adj): - if (.t|index($n)) then .err=true - elif (.v|index($n)) then . - else .t+=[$n] | - reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | - .t-=[$n] | .v+=[$n] | .o+=[$n] - end; - def topo: - . as $g | - ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | - ($g.apps | map(.name)) as $all | - {v:[],t:[],o:[],err:false} | - reduce $all[] as $n (.; - if (.v|index($n)) then . else .|vis($n;$adj) end - ) | - if .err then error("cycle") else .o|reverse end; - topo | join(" ") - ') - echo -n "$TOPO" | tee /tekton/results/app-list - echo "" - - # ---------------------------------------------------------- - # Entry point (app that no other app lists as downstream) - # ---------------------------------------------------------- - ENTRY=$(cat /tmp/stack.json | jq -r ' - (.apps|map(.downstream)|flatten) as $deps | - .apps[] | select(.name as $n | ($deps|index($n))|not) | .name - ' | head -1) - echo -n "$ENTRY" | tee /tekton/results/entry-app - echo "" - - # ---------------------------------------------------------- - # Propagation chain from entry - # ---------------------------------------------------------- - cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' - def walk($name): - . as $g | - ($g.apps[]|select(.name==$name)) as $app | - if $app then [$name] + reduce ($app.downstream//[])[] as $d - ([]; . + ($g|walk($d))) - else [] end; - walk($s) | join(" ") - ' | tee /tekton/results/propagation-chain - - # ---------------------------------------------------------- - # Intercept header - # ---------------------------------------------------------- - if [ -n "$PR" ]; then - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value - else - echo -n "" | tee /tekton/results/intercept-header-value - fi - echo "" - - # ---------------------------------------------------------- - # Build list - # ---------------------------------------------------------- - if [ -n "$CHANGED" ]; then - echo -n "$CHANGED" | tee /tekton/results/build-apps - else - echo -n "$TOPO" | tee /tekton/results/build-apps - fi - echo "" - - # ---------------------------------------------------------- - # Which compile steps to run (only tools used by build-apps) - # ---------------------------------------------------------- - BUILD_APPS=$(cat /tekton/results/build-apps) - RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" - for app in $BUILD_APPS; do - tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) RUN_NPM="true" ;; - maven) RUN_MAVEN="true" ;; - gradle) RUN_GRADLE="true" ;; - pip) RUN_PIP="true" ;; - composer) RUN_COMPOSER="true" ;; - esac - done - echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm - echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven - echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle - echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip - echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer - echo "" - securityContext: - runAsUser: 0 - workingDir: /workspace/source - workspaces: - - name: source -kind: List -metadata: - resourceVersion: "" diff --git a/artifacts/intercept-e2e/run-2-pipeline-results.json b/artifacts/intercept-e2e/run-2-pipeline-results.json deleted file mode 100644 index a07e2ee..0000000 --- a/artifacts/intercept-e2e/run-2-pipeline-results.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "stackrun-pr-27exw", - "condition": { - "lastTransitionTime": "2026-09-28T03:18:21Z", - "message": "Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8", - "reason": "Completed", - "status": "True", - "type": "Succeeded" - }, - "results": [ - { - "name": "test-summary", - "value": "{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": \"pass\",\n \"demo-api\": \"pass\"\n}\n" - }, - { - "name": "original-traffic-summary", - "value": "{\n \"demo-fe\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": \"pass\",\n \"overall\": \"pass\"\n}\n" - } - ] -} diff --git a/artifacts/intercept-e2e/run-2-pipelinerun.yaml b/artifacts/intercept-e2e/run-2-pipelinerun.yaml deleted file mode 100644 index 58a5f6c..0000000 --- a/artifacts/intercept-e2e/run-2-pipelinerun.yaml +++ /dev/null @@ -1,830 +0,0 @@ -apiVersion: tekton.dev/v1 -kind: PipelineRun -metadata: - annotations: - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:30Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/pipeline: stack-pr-test - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw - namespace: tekton-pipelines - resourceVersion: "13751" - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b -spec: - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: git-revision - value: main - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: app-revisions - value: '{}' - - name: image-registry - value: localhost:5000 - - name: cache-repo - value: "" - - name: intercept-backend - value: mirrord - - name: dashboard-url - value: "" - - name: pr-repo-url - value: "" - - name: max-retries - value: "2" - pipelineRef: - name: stack-pr-test - taskRunTemplate: - serviceAccountName: tekton-pr-sa - timeouts: - pipeline: 2h0m0s - workspaces: - - name: shared-workspace - volumeClaimTemplate: - metadata: - creationTimestamp: null - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2Gi - status: {} - - name: ssh-key - secret: - secretName: ssh-key-secret - - name: build-cache - persistentVolumeClaim: - claimName: build-cache -status: - childReferences: - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-fetch-source - pipelineTaskName: fetch-source - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-resolve-stack - pipelineTaskName: resolve-stack - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-clone-app-repos - pipelineTaskName: clone-app-repos - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-pr-snapshot-tag - pipelineTaskName: pr-snapshot-tag - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-select-tool-apps - pipelineTaskName: build-select-tool-apps - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-compile-npm - pipelineTaskName: build-compile-npm - whenExpressions: - - input: "true" - operator: in - values: - - "true" - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-build-containerize - pipelineTaskName: build-containerize - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-deploy-intercepts-mirrord - pipelineTaskName: deploy-intercepts-mirrord - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-deploy-intercepts-result - pipelineTaskName: deploy-intercepts-result - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-validate-propagation - pipelineTaskName: validate-propagation - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-validate-original-traffic - pipelineTaskName: validate-original-traffic - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-query-test-plan - pipelineTaskName: query-test-plan - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-run-tests - pipelineTaskName: run-tests - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-cleanup - pipelineTaskName: cleanup - - apiVersion: tekton.dev/v1 - kind: TaskRun - name: stackrun-pr-27exw-post-pr-comment - pipelineTaskName: post-pr-comment - completionTime: "2026-09-28T03:18:21Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:21Z" - message: 'Tasks Completed: 15 (Failed: 0, Cancelled 0), Skipped: 8' - reason: Completed - status: "True" - type: Succeeded - finallyStartTime: "2026-09-28T03:18:14Z" - pipelineSpec: - description: | - PR testing pipeline. Uses the currently running apps in the cluster and only builds/replaces the one app being tested (changed-app). Other apps are left as-is; mirrord intercepts route PR traffic only to the new build. Tests one app at a time (changed-app is required when invoking this pipeline). 1. Clones platform repo and resolves the stack graph 2. Clones and builds ONLY the changed app (snapshot tag) — no build of other apps 3. Deploys intercepts only for that app; rest of stack keeps running as-is 4. Validates header propagation, runs test suites 5. Posts a PR comment; does **not** bump `versions.yaml` (snapshot image tags only) 6. Cleans up PR pods (always) PR builds use snapshot tagging so they are never confused with real releases. - finally: - - name: hook-post-test - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: cleanup - params: - - name: deployed-pods - value: $(tasks.deploy-intercepts-result.results.deployed-pods) - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: intercept-backend - value: mirrord - taskRef: - kind: Task - name: cleanup-stack-pods - - name: post-pr-comment - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: pr-repo-url - value: "" - - name: pr-number - value: "903" - - name: pipeline-run-name - value: stackrun-pr-27exw - - name: namespace - value: tekton-pipelines - - name: status - value: Completed - - name: test-summary - value: $(tasks.run-tests.results.test-summary) - - name: dashboard-url - value: "" - - name: github-secret-name - value: github-token - taskRef: - kind: Task - name: post-pr-comment - params: - - description: Platform repo URL (e.g. tekton-dag) — has stacks/, versions; app - repos are cloned separately from stack - name: git-url - type: string - - description: Branch, tag, or SHA for platform repo and (unless overridden) app - repos - name: git-revision - type: string - - default: stacks/stack-one.yaml - description: Path to the stack YAML relative to repo root - name: stack-file - type: string - - default: "" - description: App being tested (required). Only this app is built and given an - intercept; other apps use existing cluster deployments. - name: changed-app - type: string - - description: PR number - name: pr-number - type: string - - default: '{}' - description: Optional JSON map app → revision for cloning app repos (e.g. {"demo-fe":"pr-branch"}). - Used when the PR is in the app repo so the changed app is checked out at its - PR branch. - name: app-revisions - type: string - - description: Container registry base (e.g. 123456.dkr.ecr.us-east-1.amazonaws.com) - name: image-registry - type: string - - default: '{}' - description: JSON map of app → version overrides (empty = use versions.yaml) - name: version-overrides - type: string - - default: ubuntu:22.04 - description: Pre-built image for npm compile - name: compile-image-npm - type: string - - default: ubuntu:22.04 - description: Pre-built image for Maven compile - name: compile-image-maven - type: string - - default: ubuntu:22.04 - description: Pre-built image for Gradle compile - name: compile-image-gradle - type: string - - default: ubuntu:22.04 - description: Pre-built image for pip compile - name: compile-image-pip - type: string - - default: ubuntu:22.04 - description: Pre-built image for Composer/PHP compile - name: compile-image-php - type: string - - default: localhost:5000/tekton-dag-build-mirrord:latest - description: Pre-built image for mirrord proxy pods (M7) - name: compile-image-mirrord - type: string - - default: mirrord - description: Intercept backend. Only mirrord is implemented; the param is kept - for API compatibility. - name: intercept-backend - type: string - - default: "" - description: Base URL of Tekton Dashboard; PR comment will include link to this - run (optional) - name: dashboard-url - type: string - - default: github-token - description: 'Kubernetes secret name for GitHub token (key: token) when posting - PR comments' - name: github-secret-name - type: string - - default: "" - description: When PR is in the app repo, pass the app repo URL here so the PR - comment is posted to the correct repo; empty = use git-url (platform repo) - name: pr-repo-url - type: string - - default: "" - description: Kaniko cache repo. Empty disables cache. - name: cache-repo - type: string - - default: "0" - description: Max concurrent Kaniko pods for containerize. 0 = unlimited. - name: max-parallel-builds - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after clone, before compile (e.g. - code-gen, license-scan). - name: pre-build-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after containerize, before deploy - (e.g. image-scan, SBOM). - name: post-build-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run after deploy, before tests (e.g. - seed-data). - name: pre-test-task - type: string - - default: tekton-dag-hook-noop - description: Optional Tekton Task name to run in finally block after tests (e.g. - slack-notify). - name: post-test-task - type: string - - default: "2" - description: | - Preferred retry count for infrastructure-sensitive tasks (compile/containerize). Pipeline tasks use a fixed retries: 2 for those steps; test tasks stay at 0. Orchestrator sets this param from MAX_RETRIES / request body for auditability. - name: max-retries - type: string - results: - - description: "" - name: test-summary - value: $(tasks.run-tests.results.test-summary) - - description: "" - name: original-traffic-summary - value: $(tasks.validate-original-traffic.results.original-traffic-summary) - tasks: - - name: fetch-source - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - taskRef: - kind: Task - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - - name: resolve-stack - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: version-overrides - value: '{}' - runAfter: - - fetch-source - taskRef: - kind: Task - name: resolve-stack - workspaces: - - name: source - workspace: shared-workspace - - name: clone-app-repos - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: git-revision - value: main - - name: app-revisions - value: '{}' - runAfter: - - resolve-stack - taskRef: - kind: Task - name: clone-app-repos - workspaces: - - name: source - workspace: shared-workspace - - name: ssh-key - workspace: ssh-key - - name: pr-snapshot-tag - params: - - name: snapshot-tag - value: stackrun-pr-27exw - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - runAfter: - - resolve-stack - taskRef: - kind: Task - name: pr-snapshot-tag - - name: build-select-tool-apps - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - runAfter: - - clone-app-repos - - pr-snapshot-tag - taskRef: - kind: Task - name: build-select-tool-apps - workspaces: - - name: source - workspace: shared-workspace - - name: hook-pre-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - runAfter: - - build-select-tool-apps - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: build-compile-npm - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-npm - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-npm - when: - - input: $(tasks.resolve-stack.results.run-compile-npm) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-maven - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-maven - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-maven - when: - - input: $(tasks.resolve-stack.results.run-compile-maven) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-gradle - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-gradle - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-gradle - when: - - input: $(tasks.resolve-stack.results.run-compile-gradle) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-pip - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-pip - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-pip - when: - - input: $(tasks.resolve-stack.results.run-compile-pip) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-compile-composer - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: compile-image-php - value: ubuntu:22.04 - retries: 2 - runAfter: - - build-select-tool-apps - taskRef: - kind: Task - name: build-compile-composer - when: - - input: $(tasks.resolve-stack.results.run-compile-composer) - operator: in - values: - - "true" - workspaces: - - name: source - workspace: shared-workspace - - name: build-cache - workspace: build-cache - - name: build-containerize - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - - name: image-tag - value: $(tasks.pr-snapshot-tag.results.snapshot-versions) - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - retries: 2 - runAfter: - - build-compile-npm - - build-compile-maven - - build-compile-gradle - - build-compile-pip - - build-compile-composer - taskRef: - kind: Task - name: build-containerize - workspaces: - - name: source - workspace: shared-workspace - - name: hook-post-build - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: image-registry - value: localhost:5000 - runAfter: - - build-containerize - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: deploy-intercepts-mirrord - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: built-images - value: $(tasks.build-containerize.results.built-images) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: mirrord-image - value: localhost:5000/tekton-dag-build-mirrord:latest - runAfter: - - build-containerize - taskRef: - kind: Task - name: deploy-intercept-mirrord - workspaces: - - name: shared-workspace - workspace: shared-workspace - - name: deploy-intercepts-result - runAfter: - - deploy-intercepts-mirrord - taskRef: - kind: Task - name: deploy-intercepts-result - workspaces: - - name: shared-workspace - workspace: shared-workspace - - name: validate-propagation - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: deployed-pods - value: $(tasks.deploy-intercepts-result.results.deployed-pods) - runAfter: - - deploy-intercepts-result - taskRef: - kind: Task - name: validate-stack-propagation - - name: validate-original-traffic - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: entry-app - value: $(tasks.resolve-stack.results.entry-app) - runAfter: - - deploy-intercepts-result - taskRef: - kind: Task - name: validate-original-traffic - - name: hook-pre-test - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: image-registry - value: localhost:5000 - runAfter: - - validate-propagation - - validate-original-traffic - taskRef: - params: - - name: kind - value: task - - name: namespace - value: tekton-pipelines - - name: name - value: tekton-dag-hook-noop - resolver: cluster - when: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - workspaces: - - name: source - workspace: shared-workspace - - name: query-test-plan - params: - - name: changed-app - value: demo-fe - runAfter: - - hook-pre-test - taskRef: - kind: Task - name: query-test-plan - - name: run-tests - params: - - name: stack-json - value: $(tasks.resolve-stack.results.stack-json) - - name: app-list - value: $(tasks.resolve-stack.results.app-list) - - name: entry-app - value: $(tasks.resolve-stack.results.entry-app) - - name: propagation-chain - value: $(tasks.resolve-stack.results.propagation-chain) - - name: build-apps - value: $(tasks.resolve-stack.results.build-apps) - - name: intercept-header-value - value: $(tasks.resolve-stack.results.intercept-header-value) - - name: tests-to-run - value: $(tasks.query-test-plan.results.tests-to-run) - - name: unmapped-area - value: $(tasks.query-test-plan.results.unmapped-area) - - name: apps-to-test - value: $(tasks.query-test-plan.results.apps-to-test) - runAfter: - - query-test-plan - taskRef: - kind: Task - name: run-stack-tests - workspaces: - - name: test-source - workspace: shared-workspace - workspaces: - - description: Shared PVC for source code and test data - name: shared-workspace - - description: Volume with SSH key (id_ed25519 or id_rsa) for cloning app repos; - required for SSH pull - name: ssh-key - - description: Persistent dependency cache (.m2, .npm, etc.). Create once, reuse - across runs. - name: build-cache - optional: true - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: test-summary - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: original-traffic-summary - value: | - { - "demo-fe": { - "health-check": "pass", - "http-code": "200" - }, - "release-lifecycle-demo": { - "health-check": "pass", - "http-code": "200" - }, - "demo-api": { - "health-check": "pass", - "http-code": "200" - }, - "e2e-no-header-passthrough": { - "status": "pass", - "http-code": "200" - }, - "artillery-no-header-burst": "pass", - "overall": "pass" - } - skippedTasks: - - name: hook-pre-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: build-compile-maven - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-gradle - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-pip - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: build-compile-composer - reason: When Expressions evaluated to false - whenExpressions: - - input: "false" - operator: in - values: - - "true" - - name: hook-post-build - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: hook-pre-test - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - - name: hook-post-test - reason: When Expressions evaluated to false - whenExpressions: - - input: tekton-dag-hook-noop - operator: notin - values: - - tekton-dag-hook-noop - startTime: "2026-09-28T03:14:30Z" diff --git a/artifacts/intercept-e2e/run-2-pod-logs.txt b/artifacts/intercept-e2e/run-2-pod-logs.txt deleted file mode 100644 index 2b7b004..0000000 --- a/artifacts/intercept-e2e/run-2-pod-logs.txt +++ /dev/null @@ -1,540 +0,0 @@ -[pod/stackrun-pr-27exw-build-containerize-pod/place-scripts] 2026/09/28 03:15:32 Decoded script /tekton/scripts/script-0-njrdt -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/prepare] 2026/09/28 03:15:50 Entrypoint initialization -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Milestone 5: Original Traffic Validation -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] (intercepts are ACTIVE — these requests carry NO header) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Intercepted apps: demo-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Full chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry point: demo-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Expectation: every request WITHOUT the intercept header -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] reaches the ORIGINAL deployment, not the PR pod. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 1: Direct health check per service (no headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-fe: [INTERCEPTED — should still serve original on bare requests] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-fe.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] release-lifecycle-demo: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://release-lifecycle-demo.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] demo-api: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] URL: http://demo-api.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — original deployment responding -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 2: Full-chain passthrough (no intercept headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Entry URL: http://demo-fe.staging.svc.cluster.local:80/ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Headers: (no x-dev-session, no baggage) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] This request should flow through ALL original deployments. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Even intercepted apps should respond from their original pods -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] because no header matches the Telepresence intercept rule. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Response: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] tekton-dag-vue-fe -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate]
-[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASS: HTTP 200 — full chain responding without headers -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PHASE 3: Artillery load burst (no intercept headers) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ############################################################ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Short burst against entry point — no headers. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Confirms sustained original-traffic handling during intercept. -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Test run id: tmxfc_9p9rm93yn875ngqdk84ekm5mdxf9g_jrkn -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase started: Burst without intercept headers (index: 0, duration: 10s) 03:17:21(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Phase completed: Burst without intercept headers (index: 0, duration: 10s) 03:17:31(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:30(+0000) (width: 7.202s) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 15240 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 5/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 40 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 2.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Metrics for period to: 03:17:40(+0000) (width: 1.204s) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 3810 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 10 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 3.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3.1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 3.9 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] All VUs finished. Total time: 10 seconds -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Summary report @ 03:17:32(+0000) -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -------------------------------- -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.codes.200: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.downloaded_bytes: ......................................................... 19050 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.request_rate: ............................................................. 10/sec -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.requests: ................................................................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.response_time.2xx: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 0.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 1 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] http.responses: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.completed: .............................................................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created: ................................................................ 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.created_by_name.Original traffic (no intercept header): ................. 50 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.failed: ................................................................. 0 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] vusers.session_length: -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] min: ......................................................................... 2.4 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] max: ......................................................................... 21.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] mean: ........................................................................ 5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] median: ...................................................................... 3 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p95: ......................................................................... 19.5 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] p99: ......................................................................... 20.7 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Artillery burst: PASS -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] Original Traffic Validation Summary -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] ============================================================ -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-fe": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "release-lifecycle-demo": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "demo-api": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "health-check": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "e2e-no-header-passthrough": { -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "status": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "http-code": "200" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] }, -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "artillery-no-header-burst": "pass", -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] "overall": "pass" -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] -[pod/stackrun-pr-27exw-validate-original-traffic-pod/step-validate] PASSED: Original traffic unaffected by active intercepts. -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] Wrote deployed-pods to result: { -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] "demo-fe": "pr-demo-fe-1790565353" -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/step-pass-through] } -[pod/stackrun-pr-27exw-post-pr-comment-pod/step-post-comment] No GITHUB_TOKEN secret; skipping PR comment. -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (1/2) Installing oniguruma (6.9.9-r0) -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] (2/2) Installing jq (1.7.1-r0) -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Executing busybox-1.36.1-r20.trigger -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] OK: 9 MiB in 17 packages -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] {"demo-fe":"stackrun-pr-27exw"} -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/step-build-map] Snapshot tag map: {"demo-fe":"stackrun-pr-27exw"} -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/step-select-tool-apps] Tool app lists written to .tool-apps.json -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup: removing PR pods -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] ========================================= -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Deleting pod/pr-demo-fe-1790565353 in staging -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "pr-demo-fe-1790565353" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning orphaned pr-test pods... -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-proxy-demo-fe-1790565353" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleaning mirrord agent and proxy pods... -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] pod "mirrord-agent-iqefckhppq-9cpf8" deleted from staging namespace -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] No resources found -[pod/stackrun-pr-27exw-cleanup-pod/step-cleanup] Cleanup complete. -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/place-scripts] 2026/09/28 03:16:42 Decoded script /tekton/scripts/script-0-n9wmm -[pod/stackrun-pr-27exw-query-test-plan-pod/prepare] 2026/09/28 03:17:33 Entrypoint initialization -[pod/stackrun-pr-27exw-resolve-stack-pod/place-scripts] 2026/09/28 03:14:44 Decoded script /tekton/scripts/script-0-89bp6 -[pod/stackrun-pr-27exw-validate-original-traffic-pod/place-scripts] 2026/09/28 03:16:47 Decoded script /tekton/scripts/script-0-crgzs -[pod/stackrun-pr-27exw-validate-propagation-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization -[pod/stackrun-pr-27exw-build-compile-npm-pod/place-scripts] 2026/09/28 03:15:06 Decoded script /tekton/scripts/script-0-8kkrq -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord Intercept Deployment -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ============================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Build apps: demo-fe -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept header: x-dev-session:pr-903 -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Namespace: staging -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying intercept: demo-fe -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] ========================================= -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying PR pod: pr-demo-fe-1790565353 in staging -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Baggage: role=originator header=x-dev-session -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/pr-demo-fe-1790565353 condition met -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] PR pod ready: pr-demo-fe-1790565353 (IP: 10.244.0.128) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] mirrord header_filter: (?i)^x-dev-session: pr-903$ -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] configmap/mirrord-config-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Deploying mirrord proxy: mirrord-proxy-demo-fe-1790565353 -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] pod/mirrord-proxy-demo-fe-1790565353 created -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Proxy mirrord-proxy-demo-fe-1790565353 connected to agent mirrord-agent-iqefckhppq-9cpf8; both Running 40s, 0 restarts (routing is proven in validate-propagation) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] Intercept active for demo-fe (traffic with header -> PR pod pr-demo-fe-1790565353) -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] { -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] "demo-fe": "pr-demo-fe-1790565353" -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/step-deploy] } -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-lw67t -[pod/stackrun-pr-27exw-run-tests-pod/prepare] 2026/09/28 03:17:38 Entrypoint initialization -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 1: E2E test through entry point (demo-fe) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Intercepted: demo-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Header: x-dev-session=pr-903 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Entry URL: http://demo-fe.staging.svc.cluster.local:80 -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Response: -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] tekton-dag-vue-fe -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests]
-[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 1 (demo-fe) [INTERCEPTED → PR build]: NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 2 (release-lifecycle-demo): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] HOP 3 (demo-api): NOT CONFIRMED -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] E2E: PASS -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] PHASE 2: Per-app tests -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] #################################################### -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Skipping demo-fe (already tested in e2e phase) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: release-lifecycle-demo -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/bff-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Testing: demo-api -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] (normal cluster deployment) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] [postman] Collection not found: tests/postman/api-tests.json (skipping) -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] Test Summary -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] ========================================= -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] { -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "e2e-entry-point": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "release-lifecycle-demo": "pass", -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] "demo-api": "pass" -[pod/stackrun-pr-27exw-run-tests-pod/step-run-tests] } -[pod/stackrun-pr-27exw-cleanup-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Clearing existing app dirs... -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] No SSH key found; cloning public repositories over HTTPS -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Cloning demo-fe from https://github.com/jmjava/tekton-dag-vue-fe.git (revision: main) -> /workspace/source/demo-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] Cloning into '/workspace/source/demo-fe'... -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] From https://github.com/jmjava/tekton-dag-vue-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] * branch main -> FETCH_HEAD -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] HEAD is now at 7043747 Serve /propagation as a hop report that keeps the original override. -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] [demo-fe] at 7043747 (main) -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] Done: demo-fe -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] App repos cloned (parallel). Listing: -[pod/stackrun-pr-27exw-clone-app-repos-pod/step-clone-apps] /workspace/source/demo-fe -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' false '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + CHECKOUT_DIR=/workspace/output/ -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' true '=' true ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cleandir -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' -d /workspace/output/ ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//.[!.]*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + rm -rf '/workspace/output//..?*' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + test -z -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git config --global --add safe.directory /workspace/output -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + /ko-app/git-init '-url=https://github.com/jmjava/tekton-dag.git' '-revision=main' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.6958718,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/jmjava/tekton-dag.git @ 0c75b06952f99bc1b397e5b5add47a9efe3847f0 (grafted, HEAD, origin/main) in path /workspace/output/"} -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] {"level":"info","ts":1790565281.7070696,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + cd /workspace/output/ -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git rev-parse HEAD -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_SHA=0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + EXIT_CODE=0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + '[' 0 '!=' 0 ] -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + git log -1 '--pretty=%ct' -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + RESULT_COMMITTER_DATE=1790468109 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 1790468109 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' 0c75b06952f99bc1b397e5b5add47a9efe3847f0 -[pod/stackrun-pr-27exw-fetch-source-pod/step-clone] + printf '%s' https://github.com/jmjava/tekton-dag.git -[pod/stackrun-pr-27exw-deploy-intercepts-mirrord-pod/place-scripts] 2026/09/28 03:15:51 Decoded script /tekton/scripts/script-0-z777r -[pod/stackrun-pr-27exw-post-pr-comment-pod/prepare] 2026/09/28 03:18:14 Entrypoint initialization -[pod/stackrun-pr-27exw-pr-snapshot-tag-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization -[pod/stackrun-pr-27exw-query-test-plan-pod/place-scripts] 2026/09/28 03:17:34 Decoded script /tekton/scripts/script-0-c2df2 -[pod/stackrun-pr-27exw-resolve-stack-pod/prepare] 2026/09/28 03:14:43 Entrypoint initialization -[pod/stackrun-pr-27exw-build-compile-npm-pod/prepare] 2026/09/28 03:15:05 Entrypoint initialization -[pod/stackrun-pr-27exw-clone-app-repos-pod/place-scripts] 2026/09/28 03:14:51 Decoded script /tekton/scripts/script-0-5g7lz -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/x86_64/APKINDEX.tar.gz -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (1/3) Installing oniguruma (6.9.9-r0) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (2/3) Installing jq (1.7.1-r0) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] (3/3) Installing yq-go (4.44.5-r5) -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Executing busybox-1.37.0-r14.trigger -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] OK: 19 MiB in 18 packages -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] Resolved versions: -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] { -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-fe": "0.1.0-rc.1", -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "release-lifecycle-demo": "0.1.0-rc.0", -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] "demo-api": "0.1.0-rc.0" -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] } -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] x-dev-session:pr-903 -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] demo-fe -[pod/stackrun-pr-27exw-resolve-stack-pod/step-resolve] truefalsefalsefalsefalse -[pod/stackrun-pr-27exw-run-tests-pod/place-scripts] 2026/09/28 03:17:39 Decoded script /tekton/scripts/script-0-x9mpl -[pod/stackrun-pr-27exw-fetch-source-pod/place-scripts] 2026/09/28 03:14:39 Decoded script /tekton/scripts/script-0-v9bbr -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] Querying test plan: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=demo-fe&radius=1 -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] {"error":"orchestrator unreachable"} -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] -[pod/stackrun-pr-27exw-query-test-plan-pod/step-query] WARN: test-plan query failed; will run all tests -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] === Compile (npm): demo-fe === -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] added 63 packages, and audited 65 packages in 776ms -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 16 packages are looking for funding -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] run `npm fund` for details -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] 7 vulnerabilities (2 moderate, 4 high, 1 critical) -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address issues that do not require attention, run: -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] To address all issues (including breaking changes), run: -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] npm audit fix --force -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Run `npm audit` for details. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > tekton-dag-vue-fe@0.1.0 build -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] > vite build -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] vite v5.4.21 building for production... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] transforming... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ 11 modules transformed. -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] rendering chunks... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] computing gzip size... -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/index.html 0.38 kB │ gzip: 0.27 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-pL5GxHwD.css 0.06 kB │ gzip: 0.08 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] dist/assets/index-D3hpJZIT.js 60.00 kB │ gzip: 23.99 kB -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] ✓ built in 449ms -[pod/stackrun-pr-27exw-build-compile-npm-pod/step-compile-npm] Compile (npm) done. -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/place-scripts] 2026/09/28 03:14:59 Decoded script /tekton/scripts/script-0-pfvfz -[pod/stackrun-pr-27exw-cleanup-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-c5pss -[pod/stackrun-pr-27exw-post-pr-comment-pod/place-scripts] 2026/09/28 03:18:14 Decoded script /tekton/scripts/script-0-h6gz2 -[pod/stackrun-pr-27exw-validate-propagation-pod/place-scripts] 2026/09/28 03:16:46 Decoded script /tekton/scripts/script-0-vmphb -[pod/stackrun-pr-27exw-build-containerize-pod/prepare] 2026/09/28 03:15:31 Entrypoint initialization -[pod/stackrun-pr-27exw-build-select-tool-apps-pod/prepare] 2026/09/28 03:14:58 Entrypoint initialization -[pod/stackrun-pr-27exw-clone-app-repos-pod/prepare] 2026/09/28 03:14:50 Entrypoint initialization -[pod/stackrun-pr-27exw-deploy-intercepts-result-pod/prepare] 2026/09/28 03:16:41 Entrypoint initialization -[pod/stackrun-pr-27exw-fetch-source-pod/prepare] 2026/09/28 03:14:38 Entrypoint initialization -[pod/stackrun-pr-27exw-validate-original-traffic-pod/prepare] 2026/09/28 03:16:46 Entrypoint initialization -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Stack Propagation Validation -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ============================================= -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Chain: demo-fe release-lifecycle-demo demo-api -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Header: x-dev-session = pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Baggage key: dev-session -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop count: 3 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Intercepted: demo-fe -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Deepest intercept: position 1 of 3 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation contract: -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 1. demo-fe (originator) ** PR BUILD ** → SETS header, sends to next hop -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 2. release-lifecycle-demo (forwarder) → NORMAL call (no intercept downstream, header not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] 3. demo-api (terminal) → NORMAL call (no intercept downstream, header not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Sending test request to originator: http://demo-fe.staging.svc.cluster.local:80/propagation -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Headers: x-dev-session=pr-903, baggage=dev-session=pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Response: -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "app": "demo-fe", -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "session": "pr-903", -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "hops": [ -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] { -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] "error": "HTTP Error 404: " -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] ] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] } -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Hop-by-hop verification (fail-closed): -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 1 demo-fe (originator) [INTERCEPTED]: PASS — REACHED session=pr-903 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 2 release-lifecycle-demo (forwarder): OK (beyond intercept — original override not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] HOP 3 demo-api (terminal): OK (beyond intercept — original override not required) -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: original override 'pr-903' transferred hop-to-hop -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Routing proof (fail-closed): PR pod must serve matched traffic only -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe -> pr-demo-fe-1790565353: matched request HTTP 200, unmatched request HTTP 200 -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] demo-fe: PASS — PR pod pr-demo-fe-1790565353 served the matched request and not the unmatched one -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] PASS: intercept routing proven from PR pod access logs -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] -[pod/stackrun-pr-27exw-validate-propagation-pod/step-validate] Propagation validation complete. -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Parallel Containerize (Kaniko pods) -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ============================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Apps: demo-fe -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] PVC: pvc-c91a6da3ac -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cache: disabled -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Max parallel: 0 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Containerize: demo-fe -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] ========================================= -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Launching: kaniko-demo-fe-1790565334 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Push to: kind-registry:5000/demo-fe:stackrun-pr-27exw -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Pull as: localhost:5000/demo-fe:stackrun-pr-27exw -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod/kaniko-demo-fe-1790565334 created -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] --- Waiting for final batch --- -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Waiting: kaniko-demo-fe-1790565334 -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] kaniko-demo-fe-1790565334: Succeeded -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Cleaning up Kaniko pods... -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] pod "kaniko-demo-fe-1790565334" deleted from tekton-pipelines namespace -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] Built images: -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] { -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" -[pod/stackrun-pr-27exw-build-containerize-pod/step-containerize] } diff --git a/artifacts/intercept-e2e/run-2-stackrun.yaml b/artifacts/intercept-e2e/run-2-stackrun.yaml deleted file mode 100644 index 3bfe20f..0000000 --- a/artifacts/intercept-e2e/run-2-stackrun.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: tektondag.io/v1alpha1 -kind: StackRun -metadata: - creationTimestamp: "2026-09-28T03:14:30Z" - generation: 1 - labels: - app.kubernetes.io/part-of: tekton-job-standardization - tektondag.io/mode: pr - name: stackrun-pr-27exw - namespace: tekton-pipelines - resourceVersion: "13752" - uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 -spec: - appRevisions: '{}' - cacheRepo: "" - changedApp: demo-fe - gitRevision: main - gitUrl: https://github.com/jmjava/tekton-dag.git - imageRegistry: localhost:5000 - interceptBackend: mirrord - maxRetries: 2 - mode: pr - prNumber: 903 - stackFile: stacks/stack-one.yaml - stackRef: stack-one - timeout: 2h -status: - conditions: - - lastTransitionTime: "2026-09-28T03:14:30Z" - message: PipelineRun stackrun-pr-27exw phase=Completed - observedGeneration: 1 - reason: Completed - status: "False" - type: Ready - observedGeneration: 1 - phase: Completed - pipelineRunName: stackrun-pr-27exw diff --git a/artifacts/intercept-e2e/run-2-taskruns.yaml b/artifacts/intercept-e2e/run-2-taskruns.yaml deleted file mode 100644 index f61902f..0000000 --- a/artifacts/intercept-e2e/run-2-taskruns.yaml +++ /dev/null @@ -1,3712 +0,0 @@ -apiVersion: v1 -items: -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:04Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-compile-npm - tekton.dev/task: build-compile-npm - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-compile-npm - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12743" - uid: fdda3572-535a-4387-8b26-7248c7df0428 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: compile-image-npm - value: ubuntu:22.04 - retries: 2 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-compile-npm - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - - name: build-cache - persistentVolumeClaim: - claimName: build-cache - status: - artifacts: {} - completionTime: "2026-09-28T03:15:31Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:31Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-compile-npm-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:15:04Z" - steps: - - container: step-compile-npm - imageID: docker.io/library/ubuntu@sha256:b8b6ee6aa931ecd9d0d952abc34dc0e5f7c6a30c6bb71b079fe399fde0329c02 - name: compile-npm - provenance: {} - terminated: - containerID: containerd://43ce915d1a0a09e87dcad9297d5ee92597300ec9fd1f6b19481e001c679eb5df - exitCode: 0 - finishedAt: "2026-09-28T03:15:30Z" - reason: Completed - startedAt: "2026-09-28T03:15:10Z" - terminationReason: Completed - taskSpec: - description: Runs npm compile for apps in .tool-apps.json (invoked only when - build-apps include npm). - params: - - name: stack-json - type: string - - default: ubuntu:22.04 - name: compile-image-npm - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: COMPILE_IMAGE - value: ubuntu:22.04 - image: ubuntu:22.04 - name: compile-npm - script: | - #!/usr/bin/env bash - set -e - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then apt-get update -qq && apt-get install -y -qq curl jq ca-certificates gnupg >/dev/null 2>&1; fi - [ "true" = "true" ] && CACHE="/workspace/build-cache" && mkdir -p "$CACHE/.npm" && export npm_config_cache="$CACHE/.npm" - APPS=$(jq -r '.npm[]' .tool-apps.json 2>/dev/null || true) - [ -z "$APPS" ] && echo "No npm apps" && exit 0 - if [ "$COMPILE_IMAGE" = "ubuntu:22.04" ]; then - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1 && apt-get install -y -qq nodejs >/dev/null 2>&1 - fi - for APP in $APPS; do - echo "=== Compile (npm): $APP ===" - CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."build-command" // ""') - PRE_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."pre-command" // ""') - POST_CMD=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build."post-command" // ""') - CONTEXT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|."context-dir" // "."') - APP_DIR="/workspace/source"; [ -d "/workspace/source/${APP}" ] && APP_DIR="/workspace/source/${APP}" - [ "$CONTEXT" != "." ] && [ -d "${APP_DIR}/${CONTEXT}" ] && APP_DIR="${APP_DIR}/${CONTEXT}" - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.env // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.env[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - for k in $(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.build.legacy // {} | keys[]' 2>/dev/null); do v=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg k "$k" '.apps[]|select(.name==$a)|.build.legacy[$k] // ""'); [ -n "$k" ] && export "$k=$v"; done - cd "$APP_DIR" - [ -n "$PRE_CMD" ] && eval "$PRE_CMD" - if [ -n "$CMD" ]; then - RUN_CMD="$CMD"; echo "$CMD" | grep -q "npm ci" && [ ! -f package-lock.json ] && RUN_CMD=$(echo "$CMD" | sed 's/npm ci/npm install/g') - eval "$RUN_CMD" - else - [ -f package-lock.json ] && npm ci || npm install; npm run build --if-present - fi - [ -n "$POST_CMD" ] && eval "$POST_CMD" - done - echo "Compile (npm) done." - workingDir: /workspace/source - workspaces: - - name: source - - name: build-cache - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:31Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-containerize - tekton.dev/task: build-containerize - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-containerize - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12863" - uid: 23bcfc3f-1b78-4504-bb52-697f12eee6cc - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: image-registry - value: localhost:5000 - - name: image-tag - value: '{"demo-fe":"stackrun-pr-27exw"}' - - name: tag-prefix - value: "" - - name: cache-repo - value: "" - - name: max-parallel-builds - value: "0" - retries: 2 - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-containerize - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:15:50Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:50Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-containerize-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: built-images - type: string - value: | - { - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - startTime: "2026-09-28T03:15:31Z" - steps: - - container: step-containerize - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: containerize - provenance: {} - terminated: - containerID: containerd://aade96dbc2d6995b603ef23548575566ef8e30f4bc14971b2e0a370689799f08 - exitCode: 0 - finishedAt: "2026-09-28T03:15:49Z" - message: '[{"key":"built-images","value":"{\n \"demo-fe\": \"localhost:5000/demo-fe:stackrun-pr-27exw\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:15:34Z" - terminationReason: Completed - taskSpec: - description: | - Runs Kaniko to build and push images for build-apps. M7.1: builds all apps in parallel by spawning one Kaniko pod per app (each mounts the shared PVC). Supports Kaniko layer cache via cache-repo param. - params: - - name: stack-json - type: string - - name: build-apps - type: string - - name: image-registry - type: string - - name: image-tag - type: string - - default: pr- - name: tag-prefix - type: string - - default: "" - description: Kaniko cache repo (e.g. localhost:5000/kaniko-cache). Empty disables - cache. - name: cache-repo - type: string - - default: "0" - description: Max Kaniko pods to run concurrently. 0 = unlimited (all at once). - name: max-parallel-builds - type: string - results: - - description: JSON map of app-name → full image URI - name: built-images - type: string - steps: - - computeResources: {} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: bitnami/kubectl:latest - name: containerize - script: | - #!/bin/bash - set -e - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - REGISTRY="localhost:5000" - IMAGE_TAG='{"demo-fe":"stackrun-pr-27exw"}' - TAG_PREFIX="" - CACHE_REPO="" - MAX_PARALLEL="0" - SOURCE_PVC="pvc-c91a6da3ac" - SOURCE_PATH="/workspace/source" - NS="$POD_NAMESPACE" - - PUSH_REGISTRY=$(echo "$REGISTRY" | sed 's|localhost:|kind-registry:|') - PUSH_CACHE="" - if [ -n "$CACHE_REPO" ]; then - PUSH_CACHE=$(echo "$CACHE_REPO" | sed 's|localhost:|kind-registry:|') - fi - - if [ -z "$SOURCE_PVC" ]; then - echo "ERROR: source workspace must be PVC-backed for parallel containerize" >&2 - exit 1 - fi - - IS_JSON=false - case "$IMAGE_TAG" in *"{"*) IS_JSON=true ;; esac - - TS=$(date +%s) - - echo "=============================================" - echo " Parallel Containerize (Kaniko pods)" - echo "=============================================" - echo " Apps: $BUILD_APPS" - echo " PVC: $SOURCE_PVC" - echo " Cache: ${CACHE_REPO:-disabled}" - echo " Max parallel: ${MAX_PARALLEL:-0 (unlimited)}" - echo "" - - > /tmp/pod-list.txt - > /tmp/app-images.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - - wait_for_batch() { - local BATCH_FAILED="" - while IFS= read -r P; do - [ -z "$P" ] && continue - echo " Waiting: $P" >&2 - while true; do - PH=$(kubectl get pod "$P" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "Pending") - case "$PH" in - Succeeded) echo " $P: Succeeded" >&2; break ;; - Failed) echo " $P: FAILED" >&2; BATCH_FAILED="${BATCH_FAILED} ${P}"; break ;; - *) sleep 5 ;; - esac - done - done < /tmp/batch-pods.txt - > /tmp/batch-pods.txt - BATCH_COUNT=0 - echo "$BATCH_FAILED" - } - - FAILED="" - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Containerize: $APP" - echo "=========================================" - - if $IS_JSON; then - APP_VER=$(echo "$IMAGE_TAG" | sed 's/[{}" ]//g' | tr ',' '\n' | grep "^${APP}:" | cut -d: -f2) - [ -z "$APP_VER" ] && APP_VER="latest" - TAG="${TAG_PREFIX}${APP_VER}" - else - TAG="${TAG_PREFIX}${IMAGE_TAG}" - fi - - CONTEXT_PATH="${SOURCE_PATH}/${APP}" - FULL_DOCKERFILE="${CONTEXT_PATH}/Dockerfile" - PUSH_IMAGE="${PUSH_REGISTRY}/${APP}:${TAG}" - PULL_IMAGE="${REGISTRY}/${APP}:${TAG}" - - if [ ! -f "$FULL_DOCKERFILE" ] && [ ! -d "$CONTEXT_PATH" ]; then - echo " WARN: No Dockerfile at $FULL_DOCKERFILE — skipping" - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - continue - fi - - KANIKO_ARGS="[\"--dockerfile=${FULL_DOCKERFILE}\",\"--context=${CONTEXT_PATH}\",\"--destination=${PUSH_IMAGE}\",\"--insecure\",\"--insecure-pull\",\"--ignore-path=/product_uuid\",\"--ignore-path=/sys\"" - if [ -n "$PUSH_CACHE" ]; then - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=true\",\"--cache-repo=${PUSH_CACHE}\",\"--cache-ttl=168h\"" - else - KANIKO_ARGS="${KANIKO_ARGS},\"--cache=false\"" - fi - KANIKO_ARGS="${KANIKO_ARGS}]" - - POD_NAME="kaniko-${APP}-${TS}" - echo " Launching: $POD_NAME" - echo " Push to: $PUSH_IMAGE" - echo " Pull as: $PULL_IMAGE" - - cat <> /tmp/pod-list.txt - echo "$POD_NAME" >> /tmp/batch-pods.txt - echo "${APP}=${PULL_IMAGE}" >> /tmp/app-images.txt - BATCH_COUNT=$((BATCH_COUNT + 1)) - echo "" - - if [ "$MAX_PARALLEL" -gt 0 ] && [ "$BATCH_COUNT" -ge "$MAX_PARALLEL" ]; then - echo " --- Batch limit ($MAX_PARALLEL) reached, waiting for batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - done - - if [ -s /tmp/batch-pods.txt ]; then - echo " --- Waiting for final batch ---" - BATCH_RESULT=$(wait_for_batch) - [ -n "$BATCH_RESULT" ] && FAILED="${FAILED}${BATCH_RESULT}" - fi - - echo "" - echo " Cleaning up Kaniko pods..." - while IFS= read -r POD_NAME; do - [ -z "$POD_NAME" ] && continue - kubectl delete pod "$POD_NAME" -n "$NS" --ignore-not-found=true 2>/dev/null & - done < /tmp/pod-list.txt - wait - - if [ -n "$FAILED" ]; then - echo "FAILED: Kaniko pods failed:$FAILED" >&2 - for P in $FAILED; do - echo "--- Logs for $P ---" - kubectl logs "$P" -n "$NS" --tail=30 2>/dev/null || true - done - exit 1 - fi - - > /tmp/parts.txt - while IFS='=' read -r APP IMG; do - [ -z "$APP" ] && continue - echo " \"${APP}\": \"${IMG}\"" >> /tmp/parts.txt - done < /tmp/app-images.txt - - TOTAL=$(wc -l < /tmp/parts.txt) - COUNT=0 - echo '{' > /tmp/built.json - while IFS= read -r line; do - COUNT=$((COUNT + 1)) - if [ "$COUNT" -lt "$TOTAL" ]; then - echo "${line}," >> /tmp/built.json - else - echo "${line}" >> /tmp/built.json - fi - done < /tmp/parts.txt - echo '}' >> /tmp/built.json - - echo "" - echo " Built images:" - cat /tmp/built.json - cat /tmp/built.json | tee /tekton/results/built-images - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:57Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: build-select-tool-apps - tekton.dev/task: build-select-tool-apps - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-build-select-tool-apps - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12598" - uid: 7fd8c6db-96f9-422b-886c-0619452f5c67 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: build-select-tool-apps - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:15:03Z" - conditions: - - lastTransitionTime: "2026-09-28T03:15:03Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-build-select-tool-apps-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:14:57Z" - steps: - - container: step-select-tool-apps - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: select-tool-apps - provenance: {} - terminated: - containerID: containerd://e9ec0062367c667f256c7db155c97349e621a9c9909ce13cf4d98312986afd29 - exitCode: 0 - finishedAt: "2026-09-28T03:15:02Z" - reason: Completed - startedAt: "2026-09-28T03:15:02Z" - terminationReason: Completed - taskSpec: - description: Writes .tool-apps.json from stack-json and build-apps; used by - conditional compile tasks. - params: - - name: stack-json - type: string - - name: build-apps - type: string - steps: - - computeResources: {} - env: - - name: STACK_JSON - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: BUILD_APPS - value: demo-fe - image: alpine:3.19 - name: select-tool-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - NPM_APPS=""; MAVEN_APPS=""; GRADLE_APPS=""; PIP_APPS=""; COMPOSER_APPS="" - for app in $BUILD_APPS; do - tool=$(echo "$STACK_JSON" | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) NPM_APPS="$NPM_APPS $app" ;; - maven) MAVEN_APPS="$MAVEN_APPS $app" ;; - gradle) GRADLE_APPS="$GRADLE_APPS $app" ;; - pip) PIP_APPS="$PIP_APPS $app" ;; - composer) COMPOSER_APPS="$COMPOSER_APPS $app" ;; - esac - done - jq -n \ - --arg n "${NPM_APPS# }" --arg m "${MAVEN_APPS# }" --arg g "${GRADLE_APPS# }" --arg p "${PIP_APPS# }" --arg c "${COMPOSER_APPS# }" \ - '{npm:(if $n=="" then [] else ($n|split(" ")|map(select(length>0))) end),maven:(if $m=="" then [] else ($m|split(" ")|map(select(length>0))) end),gradle:(if $g=="" then [] else ($g|split(" ")|map(select(length>0))) end),pip:(if $p=="" then [] else ($p|split(" ")|map(select(length>0))) end),composer:(if $c=="" then [] else ($c|split(" ")|map(select(length>0))) end)}' > .tool-apps.json - echo "Tool app lists written to .tool-apps.json" - workingDir: /workspace/source - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:18:13Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: finally - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: cleanup - tekton.dev/task: cleanup-stack-pods - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-cleanup - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13749" - uid: 01a6f20e-b5cb-4b58-a591-e4b2cfc4c69f - spec: - params: - - name: deployed-pods - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: intercept-backend - value: mirrord - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: cleanup-stack-pods - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:18:21Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:21Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-cleanup-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:18:13Z" - steps: - - container: step-cleanup - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: cleanup - provenance: {} - terminated: - containerID: containerd://ff60c3d658ef971f654359bc451a08191c9eed7c2eea50b35543cf4d37006564 - exitCode: 0 - finishedAt: "2026-09-28T03:18:20Z" - reason: Completed - startedAt: "2026-09-28T03:18:17Z" - terminationReason: Completed - taskSpec: - description: | - Cleans up all PR pods deployed for a stack pipeline run. Runs as a finally task so cleanup happens even on failure. - params: - - default: '{}' - description: JSON map of app → pod name (from deploy-stack-intercepts) - name: deployed-pods - type: string - - default: staging - name: default-namespace - type: string - - default: '{}' - name: stack-json - type: string - - default: telepresence - description: When mirrord, also delete mirrord agent and proxy pods - name: intercept-backend - type: string - steps: - - computeResources: {} - image: bitnami/kubectl:latest - name: cleanup - script: | - #!/bin/bash - set -e - - PODS='{ - "demo-fe": "pr-demo-fe-1790565353" - } - ' - DEFAULT_NS="staging" - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - INTERCEPT_BACKEND="mirrord" - - echo "=========================================" - echo " Cleanup: removing PR pods" - echo "=========================================" - - if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then - echo " No pods to clean up." - exit 0 - fi - - for APP in $(echo "$PODS" | jq -r 'keys[]'); do - POD=$(echo "$PODS" | jq -r --arg a "$APP" '.[$a]') - - NS="$DEFAULT_NS" - if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") - fi - - echo " Deleting pod/$POD in $NS" - kubectl delete pod "$POD" -n "$NS" --ignore-not-found=true - done - - # Also clean up any leftover pods from this pipeline - echo " Cleaning orphaned pr-test pods..." - kubectl delete pods -l managed-by=tekton-job-standardization \ - -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - - # When mirrord was used: remove mirrord agent and proxy pods in same namespace(s) - if [ "$INTERCEPT_BACKEND" = "mirrord" ]; then - echo " Cleaning mirrord agent and proxy pods..." - for APP in $(echo "$PODS" | jq -r 'keys[]'); do - NS="$DEFAULT_NS" - if [ "$STACK_JSON" != "{}" ] && [ -n "$STACK_JSON" ]; then - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn' 2>/dev/null || echo "$DEFAULT_NS") - fi - kubectl delete pods -l app=mirrord -n "$NS" --ignore-not-found=true 2>/dev/null || true - kubectl delete pods -l app=mirrord-proxy -n "$NS" --ignore-not-found=true 2>/dev/null || true - done - # Fallback: delete in default namespace if no apps in PODS - if [ "$PODS" = "{}" ] || [ -z "$PODS" ]; then - kubectl delete pods -l app=mirrord -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - kubectl delete pods -l app=mirrord-proxy -n "$DEFAULT_NS" --ignore-not-found=true 2>/dev/null || true - fi - fi - - echo " Cleanup complete." -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: clone-app-repos - tekton.dev/task: clone-app-repos - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-clone-app-repos - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12529" - uid: 81533211-9697-469e-b476-bcea52ae3080 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: git-revision - value: main - - name: app-revisions - value: '{}' - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: clone-app-repos - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - - name: ssh-key - secret: - secretName: ssh-key-secret - status: - artifacts: {} - completionTime: "2026-09-28T03:14:56Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:56Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-clone-app-repos-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:14:50Z" - steps: - - container: step-clone-apps - imageID: docker.io/alpine/git@sha256:832b1cd1a271509f3d5272a1a62d4cb2ab1a53426ebde1f6c2cb7349f907dc6f - name: clone-apps - provenance: {} - terminated: - containerID: containerd://5707f7167ce70a72e624d0bcdace677780459f7eb1c7acf0ab606075d565760b - exitCode: 0 - finishedAt: "2026-09-28T03:14:55Z" - reason: Completed - startedAt: "2026-09-28T03:14:54Z" - terminationReason: Completed - taskSpec: - description: | - Clones each app repo from the stack into workspace/. Run after fetch-source and resolve-stack. Stack .apps[].repo (e.g. jmjava/tekton-dag-vue-fe) uses SSH when the workspace contains a private key and HTTPS otherwise. Private repositories require the SSH key. - params: - - description: Stack graph JSON (from resolve-stack) - name: stack-json - type: string - - description: Space-separated list of app names to clone - name: build-apps - type: string - - default: main - description: Branch or SHA to check out for app repos (default; overridden - by app-revisions per app) - name: git-revision - type: string - - default: '{}' - description: Optional JSON map of app name to revision (e.g. {"demo-fe":"pr-branch"}). - Used for PR builds where the changed app is checked out at its PR branch. - name: app-revisions - type: string - steps: - - computeResources: {} - image: alpine/git:latest - name: clone-apps - script: | - #!/bin/sh - set -e - apk add --no-cache jq >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - DEFAULT_REVISION="main" - APP_REVISIONS='{}' - WORKSPACE="/workspace/source" - - # Clear existing app dirs so we get a fresh clone (no stale/cached content) - echo " Clearing existing app dirs..." - for APP in $BUILD_APPS; do - rm -rf "$WORKSPACE/$APP" - done - - # Prefer authenticated SSH when a key is present. Public repositories - # can be cloned over HTTPS from an empty Secret workspace. - mkdir -p /root/.ssh - chmod 700 /root/.ssh - KEY_DIR="/workspace/ssh-key" - CLONE_TRANSPORT=https - if [ -f "$KEY_DIR/id_ed25519" ]; then - cp "$KEY_DIR/id_ed25519" /root/.ssh/id_ed25519 - chmod 600 /root/.ssh/id_ed25519 - CLONE_TRANSPORT=ssh - elif [ -f "$KEY_DIR/id_rsa" ]; then - cp "$KEY_DIR/id_rsa" /root/.ssh/id_rsa - chmod 600 /root/.ssh/id_rsa - CLONE_TRANSPORT=ssh - else - echo " No SSH key found; cloning public repositories over HTTPS" - fi - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - ssh-keyscan -H github.com >> /root/.ssh/known_hosts 2>/dev/null || true - fi - - # Clone all app repos in parallel (M7.1) - clone_app() { - local APP="$1" REPO="$2" REVISION="$3" URL="$4" - echo " Cloning $APP from $URL (revision: $REVISION) -> $WORKSPACE/$APP" - git clone --depth 1 "$URL" "$WORKSPACE/$APP" 2>&1 | sed "s/^/ [$APP] /" - if ! git -C "$WORKSPACE/$APP" fetch --depth 1 origin "$REVISION"; then - echo "ERROR: could not fetch $REVISION for $APP" >&2 - exit 1 - fi - git -C "$WORKSPACE/$APP" checkout --detach FETCH_HEAD - echo " [$APP] at $(git -C "$WORKSPACE/$APP" rev-parse --short HEAD) ($REVISION)" - echo " Done: $APP" - } - - PIDS="" - for APP in $BUILD_APPS; do - REPO=$(echo "$STACK_JSON" | jq -r --arg a "$APP" '.apps[]|select(.name==$a)|.repo') - if [ -z "$REPO" ] || [ "$REPO" = "null" ]; then - echo " WARN: No repo for app $APP in stack, skipping" - continue - fi - REVISION=$(echo "$APP_REVISIONS" | jq -r --arg a "$APP" '.[$a] // empty') - [ -z "$REVISION" ] && REVISION="$DEFAULT_REVISION" - if [ "$CLONE_TRANSPORT" = "ssh" ]; then - URL="git@github.com:${REPO}.git" - else - URL="https://github.com/${REPO}.git" - fi - clone_app "$APP" "$REPO" "$REVISION" "$URL" & - PIDS="$PIDS $!" - done - - CLONE_FAILED=false - for PID in $PIDS; do - if ! wait "$PID"; then - CLONE_FAILED=true - fi - done - if [ "$CLONE_FAILED" = "true" ]; then - echo "ERROR: One or more clones failed" >&2 - exit 1 - fi - - echo "" - echo "App repos cloned (parallel). Listing:" - for APP in $BUILD_APPS; do - [ -d "$WORKSPACE/$APP" ] && echo " $WORKSPACE/$APP" || true - done - workingDir: /workspace/source - workspaces: - - description: Workspace with platform repo at root; app repos will be cloned - into source/ - name: source - - description: Volume that may contain id_ed25519 or id_rsa for private-repository - SSH clones - name: ssh-key -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:15:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: deploy-intercepts-mirrord - tekton.dev/task: deploy-intercept-mirrord - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-deploy-intercepts-mirrord - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13112" - uid: 9b6af9c4-b873-4957-92b4-e57095fbd860 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: build-apps - value: demo-fe - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: built-images - value: | - { - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: mirrord-image - value: localhost:5000/tekton-dag-build-mirrord:latest - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: deploy-intercept-mirrord - timeout: 1h0m0s - workspaces: - - name: shared-workspace - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:16:41Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:41Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-deploy-intercepts-mirrord-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: deployed-pods - type: string - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - startTime: "2026-09-28T03:15:50Z" - steps: - - container: step-deploy - imageID: docker.io/bitnami/kubectl@sha256:ab90e1058e5a658cc94b4e7eb6d48e5758cfd6d77b5dd1869513aec3a3054673 - name: deploy - provenance: {} - terminated: - containerID: containerd://88587dcb06e8b0adec20ea28a8fb6e6b5d1c0894f1a9830b852865fb2cfa658e - exitCode: 0 - finishedAt: "2026-09-28T03:16:40Z" - message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:15:53Z" - terminationReason: Completed - taskSpec: - description: | - Deploys PR pods with mirrord-based intercepts (M7). For each built app: 1) Deploys a PR pod running only the built image (no Telepresence sidecar). 2) Deploys a mirrord-proxy pod that runs mirrord exec wrapping a socat proxy; - traffic matching the intercept header is stolen from the original deployment - and forwarded to the PR pod. Same interface as deploy-stack-intercepts; - use when intercept-backend=mirrord. - params: - - description: Full stack graph JSON (used to resolve ports, namespaces, topology) - name: stack-json - type: string - - description: Space-separated list of apps that were built (ONLY these get - intercepts) - name: build-apps - type: string - - default: "" - description: Full ordered chain from entry to leaf (for logging context) - name: propagation-chain - type: string - - description: JSON map of app → image URI - name: built-images - type: string - - description: Header match for mirrord (e.g. x-dev-session:pr-42) - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: localhost:5000/tekton-dag-build-mirrord:latest - description: Image for mirrord proxy pods (mirrord CLI + socat) - name: mirrord-image - type: string - - default: mirrord-intercept - description: | - ServiceAccount the proxy pod runs as. mirrord exec must read the target - Deployment and create the mirrord-agent Job; the default SA cannot. - Create it with scripts/install-mirrord-intercept-rbac.sh. - name: proxy-service-account - type: string - results: - - description: JSON map of app → pod name (PR pods) - name: deployed-pods - type: string - steps: - - computeResources: {} - image: bitnami/kubectl:latest - name: deploy - script: | - #!/bin/bash - set -e - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - BUILD_APPS="demo-fe" - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILT='{ - "demo-fe": "localhost:5000/demo-fe:stackrun-pr-27exw" - } - ' - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - MIRRORD_IMAGE="localhost:5000/tekton-dag-build-mirrord:latest" - PROXY_SA="mirrord-intercept" - DEPLOYED_PODS_FILE="/workspace/shared-workspace/deployed-pods.json" - - echo "=============================================" - echo " mirrord Intercept Deployment" - echo "=============================================" - echo " Build apps: $BUILD_APPS" - echo " Intercept header: $INTERCEPT" - echo " Namespace: $DEFAULT_NS" - echo "" - - echo '{}' > /tmp/pods.json - - for APP in $BUILD_APPS; do - echo "=========================================" - echo " Deploying intercept: $APP" - echo "=========================================" - - IMAGE=$(echo "$BUILT" | jq -r --arg a "$APP" '.[$a]') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - CPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."container-port" // "8080") as $dp | .apps[]|select(.name==$a)|."container-port" // $dp') - - TS=$(date +%s) - POD_NAME="pr-${APP}-${TS}" - PROXY_NAME="mirrord-proxy-${APP}-${TS}" - CM_NAME="mirrord-config-${APP}-${TS}" - - BAGGAGE_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a)) as $app | - ($app.downstream // []) as $down | - $app."propagation-role" // ( - if ($down|length)==0 then "terminal" - elif (($app.role // "")|ascii_downcase)=="frontend" then "originator" - else "forwarder" end) - ') - BAGGAGE_HEADER=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') - DOWNSTREAM_URL=$(echo "$STACK_JSON" | jq -r --arg a "$APP" ' - (.apps[] | select(.name==$a) | .downstream // []) as $down | - if ($down|length)>0 then "http://" + ($down[0]|tostring) else empty end - ') - - echo " Deploying PR pod: $POD_NAME in $NS" - echo " Baggage: role=$BAGGAGE_ROLE header=$BAGGAGE_HEADER" - cat <: " (colon + space). The param is "name:value" - # with no space, so passing it verbatim never matched (2026-09-27, - # found on local kind). Build an anchored, case-insensitive filter. - if [ -n "$INTERCEPT" ]; then - HDR_NAME="${INTERCEPT%%:*}" - HDR_VAL="${INTERCEPT#*:}" - HDR_VAL="${HDR_VAL# }" - HEADER_FILTER="(?i)^${HDR_NAME}: ${HDR_VAL}\$" - else - HEADER_FILTER=".*" - fi - echo " mirrord header_filter: ${HEADER_FILTER}" - MIRRORD_CONFIG=$(jq -n \ - --arg path "deployment/${APP}" \ - --arg ns "$NS" \ - --arg header "$HEADER_FILTER" \ - '{ - target: { path: $path, namespace: $ns }, - agent: { namespace: $ns }, - feature: { - network: { - incoming: { mode: "steal", http_filter: { header_filter: $header } }, - outgoing: true - }, - fs: "local" - } - }') - - kubectl create configmap "$CM_NAME" --namespace "$NS" --from-literal=config.json="$MIRRORD_CONFIG" - - echo " Deploying mirrord proxy: $PROXY_NAME" - cat < ${PR_POD_IP}:${CPORT}" - exec /usr/local/bin/mirrord exec -f /config/config.json -- socat TCP-LISTEN:${CPORT},fork TCP:${PR_POD_IP}:${CPORT} - env: - - name: HOME - value: /tmp - - name: MIRRORD_TELEMETRY - value: "false" - - name: MIRRORD_PROGRESS_MODE - value: "off" - # INFO gives the gate below its positive marker: - # 'Created agent pod ... pod_name: "mirrord-agent-..."'. - # (mirrord still prints a non-fatal - # 'ERROR mirrord::connection: failed to obtain machine ID'.) - - name: RUST_LOG - value: "mirrord=info" - - name: PR_POD_IP - value: "${PR_POD_IP}" - - name: CPORT - value: "${CPORT}" - volumeMounts: - - name: config - mountPath: /config - readOnly: true - securityContext: - runAsUser: 0 - privileged: true - capabilities: - add: [SYS_ADMIN, SYS_PTRACE, NET_ADMIN] - volumes: - - name: config - configMap: - name: ${CM_NAME} - PROXYPOD - - # Fail closed, with a positive marker. A Ready flicker is not proof: - # with no readiness probe a container is Ready the instant it runs, - # and mirrord exec can fail seconds later. Observed on kind: the - # proxy logs 'Created agent pod' at ~1s; without pods/portforward - # RBAC the WebSocket upgrade 403s at ~+17s and the agent gives up at - # ~+30s. So require: proxy Running, zero restarts, no fatal log - # line, the agent pod named in the proxy log Running, and all of - # that still true 40s after the agent pod was first seen. The - # proxy's own IP:port is NOT probed - under the mirrord layer socat's - # listener is virtual; routing is proven in validate-propagation. - PROXY_OK=false - AGENT_POD="" - AGENT_SEEN=0 - DEADLINE=$(( $(date +%s) + 180 )) - while [ "$(date +%s)" -lt "$DEADLINE" ]; do - PHASE=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") - RESTARTS=$(kubectl get "pod/${PROXY_NAME}" -n "$NS" -o jsonpath='{.status.containerStatuses[0].restartCount}' 2>/dev/null || echo "0") - PROXY_LOG=$(kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>/dev/null || true) - # Fatal log lines only. A generic "ERROR mirrord::..." is not - # fatal (the machine-ID telemetry lookup); a real crash ends the - # process and, with restartPolicy Never, moves the pod to Failed. - if [ "$PHASE" = "Failed" ] || [ "$PHASE" = "Succeeded" ] || [ "${RESTARTS:-0}" != "0" ] \ - || printf '%s' "$PROXY_LOG" | grep -Eq 'Failed to create mirrord-agent|Failed to connect to the created mirrord-agent|Forbidden|^Error:|agent (connection|creation) (failed|timed out)'; then - break - fi - if [ -z "$AGENT_POD" ]; then - AGENT_POD=$(printf '%s' "$PROXY_LOG" | sed -n 's/.*Created agent pod.*pod_name: "\([^"]*\)".*/\1/p' | head -n 1) - [ -z "$AGENT_POD" ] || AGENT_SEEN=$(date +%s) - fi - if [ "$PHASE" = "Running" ] && [ -n "$AGENT_POD" ]; then - AGENT_PHASE=$(kubectl get "pod/${AGENT_POD}" -n "$NS" -o jsonpath='{.status.phase}' 2>/dev/null || echo "") - if [ "$AGENT_PHASE" = "Failed" ] || [ "$AGENT_PHASE" = "Succeeded" ]; then - break - fi - if [ "$AGENT_PHASE" = "Running" ] && [ $(( $(date +%s) - AGENT_SEEN )) -ge 40 ]; then - PROXY_OK=true - break - fi - fi - sleep 3 - done - if ! $PROXY_OK; then - echo "ERROR: mirrord proxy ${PROXY_NAME} did not establish an agent connection (proxy phase=${PHASE:-?} restarts=${RESTARTS:-?} agent=${AGENT_POD:-none} agent phase=${AGENT_PHASE:-?})" >&2 - echo "--- proxy pod log ---" >&2 - kubectl logs "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 60 >&2 || true - echo "--- proxy pod describe ---" >&2 - kubectl describe "pod/${PROXY_NAME}" -n "$NS" 2>&1 | tail -n 40 >&2 || true - echo "--- mirrord agent jobs/pods in $NS ---" >&2 - kubectl get jobs,pods -n "$NS" -l app=mirrord 2>&1 >&2 || true - if [ -n "$AGENT_POD" ]; then - echo "--- mirrord agent log (${AGENT_POD}) ---" >&2 - kubectl logs "pod/${AGENT_POD}" -n "$NS" --tail=-1 2>&1 | tail -n 60 >&2 || true - fi - exit 1 - fi - echo " Proxy ${PROXY_NAME} connected to agent ${AGENT_POD}; both Running 40s, 0 restarts (routing is proven in validate-propagation)" - echo " Intercept active for $APP (traffic with header -> PR pod $POD_NAME)" - echo "" - - jq --arg a "$APP" --arg p "$POD_NAME" '. + {($a): $p}' /tmp/pods.json > /tmp/pods-tmp.json - mv /tmp/pods-tmp.json /tmp/pods.json - done - - mkdir -p "$(dirname "${DEPLOYED_PODS_FILE}")" - cat /tmp/pods.json > "$DEPLOYED_PODS_FILE" - cat /tmp/pods.json | tee /tekton/results/deployed-pods - workspaces: - - description: Workspace to write deployed-pods.json for pass-through result - name: shared-workspace -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:41Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: deploy-intercepts-result - tekton.dev/task: deploy-intercepts-result - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-deploy-intercepts-result - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13164" - uid: a8029dc7-4483-4afc-aaf7-baf9cd82fe8f - spec: - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: deploy-intercepts-result - timeout: 1h0m0s - workspaces: - - name: shared-workspace - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:16:45Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:45Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-deploy-intercepts-result-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: deployed-pods - type: string - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - startTime: "2026-09-28T03:16:41Z" - steps: - - container: step-pass-through - imageID: docker.io/library/busybox@sha256:fd7dc98638c8e305f4dc34e979f1c0fdfdcaeb0fbf8fcff77ae834b6da3d7e6e - name: pass-through - provenance: {} - terminated: - containerID: containerd://16624b1833c51db43313d16cfc5dcc811bc38eb73185092c1784d5ec1cf18715 - exitCode: 0 - finishedAt: "2026-09-28T03:16:44Z" - message: '[{"key":"deployed-pods","value":"{\n \"demo-fe\": \"pr-demo-fe-1790565353\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:16:44Z" - terminationReason: Completed - taskSpec: - description: | - Pass-through task (M7). Reads deployed-pods.json from the shared workspace (written by either deploy-intercepts-telepresence or deploy-intercepts-mirrord) and writes it to the deployed-pods result. Downstream and finally tasks reference this task's result so they work with either intercept backend. - results: - - description: JSON map of app → pod name - name: deployed-pods - type: string - steps: - - computeResources: {} - image: busybox - name: pass-through - script: | - #!/bin/sh - set -e - FILE="/workspace/shared-workspace/deployed-pods.json" - if [ ! -f "$FILE" ]; then - echo '{}' > "/tekton/results/deployed-pods" - echo "No deployed-pods.json found; wrote empty object." - exit 0 - fi - cp "$FILE" "/tekton/results/deployed-pods" - echo "Wrote deployed-pods to result: $(cat /tekton/results/deployed-pods)" - workspaces: - - description: Workspace containing deployed-pods.json from the deploy step - name: shared-workspace -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tekton.dev/categories: Git - tekton.dev/deprecated: "true" - tekton.dev/displayName: git clone - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 - tekton.dev/tags: git - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:33Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: fetch-source - tekton.dev/task: git-clone - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-fetch-source - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12350" - uid: 8def9798-f6a9-48d1-acca-b7a8a67a4502 - spec: - params: - - name: url - value: https://github.com/jmjava/tekton-dag.git - - name: revision - value: main - - name: deleteExisting - value: "true" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: git-clone - timeout: 1h0m0s - workspaces: - - name: output - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:14:42Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:42Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-fetch-source-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: commit - type: string - value: 0c75b06952f99bc1b397e5b5add47a9efe3847f0 - - name: committer-date - type: string - value: "1790468109" - - name: url - type: string - value: https://github.com/jmjava/tekton-dag.git - startTime: "2026-09-28T03:14:34Z" - steps: - - container: step-clone - imageID: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init@sha256:28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df - name: clone - provenance: {} - terminated: - containerID: containerd://419cbb2591b360883fdf88f1585593564cbedb42861e6839d6a884ba928fbfd5 - exitCode: 0 - finishedAt: "2026-09-28T03:14:41Z" - message: '[{"key":"commit","value":"0c75b06952f99bc1b397e5b5add47a9efe3847f0","type":1},{"key":"committer-date","value":"1790468109","type":1},{"key":"url","value":"https://github.com/jmjava/tekton-dag.git","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:41Z" - terminationReason: Completed - taskSpec: - description: |- - These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. - The git-clone Task will clone a repo from the provided url into the output Workspace. By default the repo will be cloned into the root of your Workspace. You can clone into a subdirectory by setting this Task's subdirectory param. This Task also supports sparse checkouts. To perform a sparse checkout, pass a list of comma separated directory patterns to this Task's sparseCheckoutDirectories param. - params: - - description: Repository URL to clone from. - name: url - type: string - - default: "" - description: Revision to checkout. (branch, tag, sha, ref, etc...) - name: revision - type: string - - default: "" - description: Refspec to fetch before checking out revision. - name: refspec - type: string - - default: "true" - description: Initialize and fetch git submodules. - name: submodules - type: string - - default: "1" - description: Perform a shallow clone, fetching only the most recent N commits. - name: depth - type: string - - default: "true" - description: Set the `http.sslVerify` global git config. Setting this to `false` - is not advised unless you are sure that you trust your git remote. - name: sslVerify - type: string - - default: ca-bundle.crt - description: file name of mounted crt using ssl-ca-directory workspace. default - value is ca-bundle.crt. - name: crtFileName - type: string - - default: "" - description: Subdirectory inside the `output` Workspace to clone the repo - into. - name: subdirectory - type: string - - default: "" - description: Define the directory patterns to match or exclude when performing - a sparse checkout. - name: sparseCheckoutDirectories - type: string - - default: "true" - description: Clean out the contents of the destination directory if it already - exists before cloning. - name: deleteExisting - type: string - - default: "" - description: HTTP proxy server for non-SSL requests. - name: httpProxy - type: string - - default: "" - description: HTTPS proxy server for SSL requests. - name: httpsProxy - type: string - - default: "" - description: Opt out of proxying HTTP/HTTPS requests. - name: noProxy - type: string - - default: "true" - description: Log the commands that are executed during `git-clone`'s operation. - name: verbose - type: string - - default: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - description: The image providing the git-init binary that this Task runs. - name: gitInitImage - type: string - - default: /home/git - description: | - Absolute path to the user's home directory. - name: userHome - type: string - results: - - description: The precise commit SHA that was fetched by this Task. - name: commit - type: string - - description: The precise URL that was fetched by this Task. - name: url - type: string - - description: The epoch timestamp of the commit that was fetched by this Task. - name: committer-date - type: string - steps: - - computeResources: {} - env: - - name: HOME - value: /home/git - - name: PARAM_URL - value: https://github.com/jmjava/tekton-dag.git - - name: PARAM_REVISION - value: main - - name: PARAM_REFSPEC - - name: PARAM_SUBMODULES - value: "true" - - name: PARAM_DEPTH - value: "1" - - name: PARAM_SSL_VERIFY - value: "true" - - name: PARAM_CRT_FILENAME - value: ca-bundle.crt - - name: PARAM_SUBDIRECTORY - - name: PARAM_DELETE_EXISTING - value: "true" - - name: PARAM_HTTP_PROXY - - name: PARAM_HTTPS_PROXY - - name: PARAM_NO_PROXY - - name: PARAM_VERBOSE - value: "true" - - name: PARAM_SPARSE_CHECKOUT_DIRECTORIES - - name: PARAM_USER_HOME - value: /home/git - - name: WORKSPACE_OUTPUT_PATH - value: /workspace/output - - name: WORKSPACE_SSH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSH_DIRECTORY_PATH - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_BASIC_AUTH_DIRECTORY_PATH - - name: WORKSPACE_SSL_CA_DIRECTORY_BOUND - value: "false" - - name: WORKSPACE_SSL_CA_DIRECTORY_PATH - image: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2 - name: clone - script: | - #!/usr/bin/env sh - set -eu - - if [ "${PARAM_VERBOSE}" = "true" ] ; then - set -x - fi - - if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials" - cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig" - chmod 400 "${PARAM_USER_HOME}/.git-credentials" - chmod 400 "${PARAM_USER_HOME}/.gitconfig" - fi - - if [ "${WORKSPACE_SSH_DIRECTORY_BOUND}" = "true" ] ; then - cp -R "${WORKSPACE_SSH_DIRECTORY_PATH}" "${PARAM_USER_HOME}"/.ssh - chmod 700 "${PARAM_USER_HOME}"/.ssh - chmod -R 400 "${PARAM_USER_HOME}"/.ssh/* - fi - - if [ "${WORKSPACE_SSL_CA_DIRECTORY_BOUND}" = "true" ] ; then - export GIT_SSL_CAPATH="${WORKSPACE_SSL_CA_DIRECTORY_PATH}" - if [ "${PARAM_CRT_FILENAME}" != "" ] ; then - export GIT_SSL_CAINFO="${WORKSPACE_SSL_CA_DIRECTORY_PATH}/${PARAM_CRT_FILENAME}" - fi - fi - CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}/${PARAM_SUBDIRECTORY}" - - cleandir() { - # Delete any existing contents of the repo directory if it exists. - # - # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" - # or the root of a mounted volume. - if [ -d "${CHECKOUT_DIR}" ] ; then - # Delete non-hidden files and directories - rm -rf "${CHECKOUT_DIR:?}"/* - # Delete files and directories starting with . but excluding .. - rm -rf "${CHECKOUT_DIR}"/.[!.]* - # Delete files and directories starting with .. plus any other character - rm -rf "${CHECKOUT_DIR}"/..?* - fi - } - - if [ "${PARAM_DELETE_EXISTING}" = "true" ] ; then - cleandir || true - fi - - test -z "${PARAM_HTTP_PROXY}" || export HTTP_PROXY="${PARAM_HTTP_PROXY}" - test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}" - test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}" - - git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}" - /ko-app/git-init \ - -url="${PARAM_URL}" \ - -revision="${PARAM_REVISION}" \ - -refspec="${PARAM_REFSPEC}" \ - -path="${CHECKOUT_DIR}" \ - -sslVerify="${PARAM_SSL_VERIFY}" \ - -submodules="${PARAM_SUBMODULES}" \ - -depth="${PARAM_DEPTH}" \ - -sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}" - cd "${CHECKOUT_DIR}" - RESULT_SHA="$(git rev-parse HEAD)" - EXIT_CODE="$?" - if [ "${EXIT_CODE}" != 0 ] ; then - exit "${EXIT_CODE}" - fi - RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" - printf "%s" "${RESULT_COMMITTER_DATE}" > "/tekton/results/committer-date" - printf "%s" "${RESULT_SHA}" > "/tekton/results/commit" - printf "%s" "${PARAM_URL}" > "/tekton/results/url" - securityContext: - runAsNonRoot: true - runAsUser: 65532 - workspaces: - - description: The git repo will be cloned onto the volume backing this Workspace. - name: output - - description: | - A .ssh directory with private key, known_hosts, config, etc. Copied to - the user's home before git commands are executed. Used to authenticate - with the git remote when performing the clone. Binding a Secret to this - Workspace is strongly recommended over other volume types. - name: ssh-directory - optional: true - - description: | - A Workspace containing a .gitconfig and .git-credentials file. These - will be copied to the user's home before any git commands are run. Any - other files in this Workspace are ignored. It is strongly recommended - to use ssh-directory over basic-auth whenever possible and to bind a - Secret to this Workspace over other volume types. - name: basic-auth - optional: true - - description: | - A workspace containing CA certificates, this will be used by Git to - verify the peer with when fetching or pushing over HTTPS. - name: ssl-ca-directory - optional: true -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:18:13Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: finally - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: post-pr-comment - tekton.dev/task: post-pr-comment - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-post-pr-comment - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13724" - uid: 6f0a708a-b5d0-4854-8e36-8489cd782565 - spec: - params: - - name: git-url - value: https://github.com/jmjava/tekton-dag.git - - name: pr-repo-url - value: "" - - name: pr-number - value: "903" - - name: pipeline-run-name - value: stackrun-pr-27exw - - name: namespace - value: tekton-pipelines - - name: status - value: Completed - - name: test-summary - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: dashboard-url - value: "" - - name: github-secret-name - value: github-token - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: post-pr-comment - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:18:18Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:18Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-post-pr-comment-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:18:13Z" - steps: - - container: step-post-comment - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: post-comment - provenance: {} - terminated: - containerID: containerd://21a5e3c7b0296249f6ba5e7ddc75583d38b35208765e9f4f315c439ec97f4135 - exitCode: 0 - finishedAt: "2026-09-28T03:18:18Z" - reason: Completed - startedAt: "2026-09-28T03:18:17Z" - terminationReason: Completed - taskSpec: - description: Post a comment on the GitHub PR with run status and Tekton Dashboard - link. - params: - - description: Git repo URL (e.g. https://github.com/owner/repo.git); used when - pr-repo-url is empty - name: git-url - type: string - - default: "" - description: When set, PR comment is posted to this repo (app repo); when - empty, git-url is used - name: pr-repo-url - type: string - - description: PR number (issue number for the comment) - name: pr-number - type: string - - description: Name of this PipelineRun - name: pipeline-run-name - type: string - - description: Namespace of the PipelineRun - name: namespace - type: string - - description: Pipeline status (Succeeded or Failed) - name: status - type: string - - default: "" - description: Optional test summary JSON string - name: test-summary - type: string - - default: "" - description: Base URL of Tekton Dashboard (e.g. https://dashboard.example.com); - comment will include link to this run - name: dashboard-url - type: string - - default: github-token - description: Kubernetes secret name containing key 'token' (GitHub token with - repo scope) - name: github-secret-name - type: string - steps: - - computeResources: {} - env: - - name: GITHUB_TOKEN - valueFrom: - secretKeyRef: - key: token - name: github-token - optional: true - - name: GIT_URL - value: https://github.com/jmjava/tekton-dag.git - - name: PR_REPO_URL - - name: PR_NUMBER - value: "903" - - name: RUN_NAME - value: stackrun-pr-27exw - - name: NAMESPACE - value: tekton-pipelines - - name: STATUS - value: Completed - - name: TEST_SUMMARY - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - - name: DASHBOARD_URL - image: alpine:3.19 - name: post-comment - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq >/dev/null 2>&1 - if [ -z "$GITHUB_TOKEN" ]; then - echo "No GITHUB_TOKEN secret; skipping PR comment." - exit 0 - fi - # Use pr-repo-url when set (PR in app repo), else git-url (platform repo) - COMMENT_URL="${PR_REPO_URL:-$GIT_URL}" - # Derive owner/repo from URL (https://github.com/owner/repo or git@github.com:owner/repo.git) - REPO="${COMMENT_URL#*github.com/}" - REPO="${REPO#*:}" - REPO="${REPO%.git}" - REPO="${REPO#*/}" - OWNER="${COMMENT_URL#*github.com/}" - OWNER="${OWNER#*:}" - OWNER="${OWNER%.git}" - OWNER="${OWNER%%/*}" - if [ -z "$OWNER" ] || [ -z "$REPO" ]; then - echo "Could not parse owner/repo from COMMENT_URL=$COMMENT_URL" - exit 0 - fi - BODY="## Tekton Pipeline Run" - BODY="${BODY}\n\n**Status:** ${STATUS}" - if [ -n "$TEST_SUMMARY" ]; then - BODY="${BODY}\n\n**Test summary:**\n\`\`\`json\n${TEST_SUMMARY}\n\`\`\`" - fi - if [ -n "$DASHBOARD_URL" ]; then - DASH_URL="${DASHBOARD_URL%/}/#/namespaces/${NAMESPACE}/pipelineruns/${RUN_NAME}" - BODY="${BODY}\n\n[View in Tekton Dashboard](${DASH_URL})" - fi - BODY="${BODY}\n\n_PipelineRun: \`${RUN_NAME}\`_" - JSON_BODY=$(printf '%s' "$BODY" | jq -Rs '{ body: . }') - curl -sS -X POST \ - -H "Authorization: Bearer $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/repos/${OWNER}/${REPO}/issues/${PR_NUMBER}/comments" \ - -d "$JSON_BODY" || echo "Failed to post comment (non-fatal)" - echo "Posted comment to PR #${PR_NUMBER}" -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:50Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: pr-snapshot-tag - tekton.dev/task: pr-snapshot-tag - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-pr-snapshot-tag - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12519" - uid: f20ab2ae-22ca-4bbe-b0fb-b96944cbf80f - spec: - params: - - name: snapshot-tag - value: stackrun-pr-27exw - - name: build-apps - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: pr-snapshot-tag - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:14:55Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:55Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-pr-snapshot-tag-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: snapshot-versions - type: string - value: '{"demo-fe":"stackrun-pr-27exw"}' - startTime: "2026-09-28T03:14:50Z" - steps: - - container: step-build-map - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: build-map - provenance: {} - terminated: - containerID: containerd://c5716e5e72905a52dc998aa1872d5f2bf2eb2d5042db77b0fb3c12be588bd7b2 - exitCode: 0 - finishedAt: "2026-09-28T03:14:54Z" - message: '[{"key":"snapshot-versions","value":"{\"demo-fe\":\"stackrun-pr-27exw\"}","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:54Z" - terminationReason: Completed - taskSpec: - description: | - Builds a JSON map of app -> snapshot tag for PR pipeline image tagging. PR builds are not releases; they use a run-specific snapshot tag (e.g. the pipeline run name) so images are clearly non-release. - params: - - description: 'Tag to use for all apps (e.g. pipeline run name: stack-pr-2-6xnbj)' - name: snapshot-tag - type: string - - description: Space-separated list of app names to tag - name: build-apps - type: string - results: - - description: JSON map of app -> snapshot-tag for use as image-tag in build-apps - name: snapshot-versions - type: string - steps: - - computeResources: {} - image: alpine:3.19 - name: build-map - script: | - #!/bin/sh - set -e - apk add --no-cache jq - TAG="stackrun-pr-27exw" - APPS="demo-fe" - OUT="{}" - for APP in $APPS; do - [ -z "$APP" ] && continue - OUT=$(echo "$OUT" | jq -c --arg app "$APP" --arg tag "$TAG" '. + {($app): $tag}') - done - echo -n "$OUT" | tee /tekton/results/snapshot-versions - echo "" - echo "Snapshot tag map: $OUT" - securityContext: - runAsUser: 0 -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:17:33Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: query-test-plan - tekton.dev/task: query-test-plan - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-query-test-plan - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13467" - uid: c622eecb-453b-4bb2-bae0-a44faa8afbcc - spec: - params: - - name: changed-app - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: query-test-plan - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:17:38Z" - conditions: - - lastTransitionTime: "2026-09-28T03:17:38Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-query-test-plan-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: apps-to-test - type: string - value: "" - - name: test-plan-message - type: string - value: test-plan query failed; running all tests - - name: tests-to-run - type: string - value: "" - - name: unmapped-area - type: string - value: "" - startTime: "2026-09-28T03:17:33Z" - steps: - - container: step-query - imageID: docker.io/curlimages/curl@sha256:58adaa4e8dca9c988bae2aba4ab3434a0bb2da16bbe3f92dec39ec7785166777 - name: query - provenance: {} - terminated: - containerID: containerd://4b984b91895eabb1a52cc6ec9190ad1ca37ace0f34e3a9305c7a7a597bf3f03e - exitCode: 0 - finishedAt: "2026-09-28T03:17:37Z" - message: '[{"key":"apps-to-test","value":"","type":1},{"key":"test-plan-message","value":"test-plan - query failed; running all tests","type":1},{"key":"tests-to-run","value":"","type":1},{"key":"unmapped-area","value":"","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:17:37Z" - terminationReason: Completed - taskSpec: - description: | - Query the orchestrator's test-plan endpoint to get the minimal set of regression tests for the changed app. Outputs a comma-separated list of test IDs (or an unmapped-area flag). - params: - - description: The app that changed in this PR - name: changed-app - type: string - - default: "1" - description: Graph traversal depth (1=direct, 2+=neighbors) - name: blast-radius - type: string - - default: http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080 - description: Orchestrator service URL - name: orchestrator-url - type: string - results: - - description: Comma-separated test IDs to run, or empty - name: tests-to-run - type: string - - description: Service name if no mapped tests, or empty - name: unmapped-area - type: string - - description: Comma-separated service/app names whose tests should run, or - empty - name: apps-to-test - type: string - - description: Human-readable summary of the test plan - name: test-plan-message - type: string - steps: - - computeResources: {} - image: curlimages/curl:latest - name: query - script: | - #!/bin/sh - set -e - - APP="demo-fe" - RADIUS="1" - URL="http://tekton-dag-orchestrator.tekton-pipelines.svc.cluster.local:8080/api/test-plan?app=${APP}&radius=${RADIUS}" - - echo "Querying test plan: $URL" - RESPONSE=$(curl -sf "$URL" 2>/dev/null || echo '{"error":"orchestrator unreachable"}') - echo "$RESPONSE" | head -c 2000 - echo "" - - if echo "$RESPONSE" | grep -q '"error"'; then - echo "WARN: test-plan query failed; will run all tests" - echo -n "" > /tekton/results/tests-to-run - echo -n "" > /tekton/results/unmapped-area - echo -n "" > /tekton/results/apps-to-test - echo -n "test-plan query failed; running all tests" > /tekton/results/test-plan-message - exit 0 - fi - - TESTS=$(echo "$RESPONSE" | sed 's/.*"tests":\[//' | sed 's/\].*//' | \ - sed 's/{"id":"//g' | sed 's/","type":"[^"]*"}//g' | tr ',' '\n' | \ - paste -sd ',' -) - UNMAPPED=$(echo "$RESPONSE" | sed -n 's/.*"unmapped_area":"\([^"]*\)".*/\1/p') - MESSAGE=$(echo "$RESPONSE" | sed -n 's/.*"message":"\([^"]*\)".*/\1/p') - SERVICES=$(echo "$RESPONSE" | sed -n 's/.*"services":\[\([^]]*\)\].*/\1/p' | \ - sed 's/"//g') - - echo "" - echo "Tests to run: ${TESTS:-}" - echo "Apps to test: ${SERVICES:-}" - echo "Unmapped area: ${UNMAPPED:-}" - echo "Message: $MESSAGE" - - echo -n "${TESTS}" > /tekton/results/tests-to-run - echo -n "${UNMAPPED}" > /tekton/results/unmapped-area - echo -n "${SERVICES}" > /tekton/results/apps-to-test - echo -n "${MESSAGE}" > /tekton/results/test-plan-message -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:14:42Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: resolve-stack - tekton.dev/task: resolve-stack - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-resolve-stack - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "12428" - uid: 376d8b76-abf1-4c49-b657-9448bc1cb54a - spec: - params: - - name: stack-file - value: stacks/stack-one.yaml - - name: changed-app - value: demo-fe - - name: pr-number - value: "903" - - name: version-overrides - value: '{}' - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: resolve-stack - timeout: 1h0m0s - workspaces: - - name: source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:14:49Z" - conditions: - - lastTransitionTime: "2026-09-28T03:14:49Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-resolve-stack-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: app-list - type: string - value: demo-fe release-lifecycle-demo demo-api - - name: build-apps - type: string - value: demo-fe - - name: entry-app - type: string - value: demo-fe - - name: intercept-header-value - type: string - value: x-dev-session:pr-903 - - name: propagation-chain - type: string - value: | - demo-fe release-lifecycle-demo demo-api - - name: resolved-versions - type: string - value: | - {"demo-fe":"0.1.0-rc.1","release-lifecycle-demo":"0.1.0-rc.0","demo-api":"0.1.0-rc.0"} - - name: run-compile-composer - type: string - value: "false" - - name: run-compile-gradle - type: string - value: "false" - - name: run-compile-maven - type: string - value: "false" - - name: run-compile-npm - type: string - value: "true" - - name: run-compile-pip - type: string - value: "false" - - name: stack-json - type: string - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - startTime: "2026-09-28T03:14:42Z" - steps: - - container: step-resolve - imageID: docker.io/library/alpine@sha256:ce64758a109eb420d874a118f87920e625e12d3634e03b4a5573fd9f6e5d3507 - name: resolve - provenance: {} - terminated: - containerID: containerd://719cd458394417bd85ec21f0ce71520758fc66a2796903f1ed3ab3b97bad691c - exitCode: 0 - finishedAt: "2026-09-28T03:14:48Z" - message: '[{"key":"app-list","value":"demo-fe release-lifecycle-demo demo-api","type":1},{"key":"build-apps","value":"demo-fe","type":1},{"key":"entry-app","value":"demo-fe","type":1},{"key":"intercept-header-value","value":"x-dev-session:pr-903","type":1},{"key":"propagation-chain","value":"demo-fe - release-lifecycle-demo demo-api\n","type":1},{"key":"resolved-versions","value":"{\"demo-fe\":\"0.1.0-rc.1\",\"release-lifecycle-demo\":\"0.1.0-rc.0\",\"demo-api\":\"0.1.0-rc.0\"}\n","type":1},{"key":"run-compile-composer","value":"false","type":1},{"key":"run-compile-gradle","value":"false","type":1},{"key":"run-compile-maven","value":"false","type":1},{"key":"run-compile-npm","value":"true","type":1},{"key":"run-compile-pip","value":"false","type":1},{"key":"stack-json","value":"{\"name\":\"stack-one\",\"description\":\"Demo - 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence - (Spring Boot)\",\"propagation\":{\"header-name\":\"x-dev-session\",\"baggage-key\":\"dev-session\",\"strategy\":\"w3c-baggage\"},\"defaults\":{\"namespace\":\"staging\",\"image-registry\":\"${IMAGE_REGISTRY}\",\"service-port\":\"80\",\"container-port\":\"8080\"},\"apps\":[{\"name\":\"demo-fe\",\"repo\":\"jmjava/tekton-dag-vue-fe\",\"role\":\"frontend\",\"propagation-role\":\"originator\",\"namespace\":null,\"container-port\":\"80\",\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"npm\",\"runtime\":\"vue\",\"node-version\":\"22\",\"build-command\":\"npm - install \u0026\u0026 npm run build\"},\"downstream\":[\"release-lifecycle-demo\"],\"tests\":{\"postman\":\"tests/postman/fe-tests.json\",\"playwright\":\"tests/playwright\",\"artillery\":\"tests/artillery/load-test.yml\"}},{\"name\":\"release-lifecycle-demo\",\"repo\":\"jmjava/tekton-dag-spring-boot\",\"role\":\"middleware\",\"propagation-role\":\"forwarder\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[\"demo-api\"],\"tests\":{\"postman\":\"tests/postman/bff-tests.json\"}},{\"name\":\"demo-api\",\"repo\":\"jmjava/tekton-dag-spring-boot-gradle\",\"role\":\"persistence\",\"propagation-role\":\"terminal\",\"namespace\":null,\"container-port\":null,\"service-port\":null,\"context-dir\":\".\",\"dockerfile\":\"Dockerfile\",\"build\":{\"tool\":\"maven\",\"runtime\":\"spring-boot\",\"java-version\":\"21\",\"build-command\":\"mvn - -B clean package -DskipTests\"},\"downstream\":[],\"tests\":{\"postman\":\"tests/postman/api-tests.json\"}}]}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:14:48Z" - terminationReason: Completed - taskSpec: - description: | - Reads a stack definition and the version registry from the workspace, merges in any version overrides, computes topological build order, and emits structured JSON results that downstream tasks consume. - params: - - description: Path to the stack YAML relative to workspace root - name: stack-file - type: string - - default: stacks/versions.yaml - description: Path to versions.yaml relative to workspace root - name: versions-file - type: string - - default: '{}' - description: | - JSON map of app-name → version to override the registry defaults. Example: {"demo-fe":"0.2.0","demo-api":"0.1.5"} Pass {} to use whatever versions.yaml has. - name: version-overrides - type: string - - default: "" - description: App whose PR triggered this run (empty = build all) - name: changed-app - type: string - - default: "" - description: PR number for intercept-header generation - name: pr-number - type: string - results: - - description: Full stack graph as JSON (includes build config per app) - name: stack-json - type: string - - description: Space-separated list of apps in topological order - name: app-list - type: string - - description: Entry-point app (typically the frontend) - name: entry-app - type: string - - description: Ordered chain of apps for header propagation validation - name: propagation-chain - type: string - - description: Header value to use for Telepresence intercepts - name: intercept-header-value - type: string - - description: Space-separated list of apps to build (changed-app or all) - name: build-apps - type: string - - description: true if any build-app uses npm (so only that compile step runs) - name: run-compile-npm - type: string - - description: true if any build-app uses maven - name: run-compile-maven - type: string - - description: true if any build-app uses gradle - name: run-compile-gradle - type: string - - description: true if any build-app uses pip - name: run-compile-pip - type: string - - description: true if any build-app uses composer - name: run-compile-composer - type: string - - description: JSON map of app → version (registry defaults merged with overrides) - name: resolved-versions - type: string - steps: - - computeResources: {} - env: - - name: YQ_VERSION - value: v4.45.4 - - name: JQ_VERSION - value: jq-1.7.1 - image: alpine:3.21 - name: resolve - script: | - #!/bin/sh - set -eu - - arch=$(uname -m) - case "$arch" in - x86_64) arch=amd64 ;; - aarch64|arm64) arch=arm64 ;; - *) echo "ERROR: unsupported arch $arch" >&2; exit 1 ;; - esac - install_static() { - dest="$1" - url="$2" - wget -q -O "$dest" "$url" - chmod +x "$dest" - } - # Prefer distro packages; fall back to GitHub (reachable in Kind/GHA). - if ! apk add --no-cache jq yq-go; then - echo "apk add jq/yq-go failed; installing static binaries from GitHub" >&2 - install_static /usr/local/bin/jq "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${arch}" - install_static /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${arch}" - fi - command -v jq >/dev/null || { echo "ERROR: jq is required" >&2; exit 1; } - command -v yq >/dev/null || { echo "ERROR: yq is required" >&2; exit 1; } - - STACK="stacks/stack-one.yaml" - VFILE="stacks/versions.yaml" - OVERRIDES='{}' - CHANGED="demo-fe" - PR="903" - - if [ ! -f "$STACK" ]; then - echo "ERROR: stack file not found: $STACK (cwd=$(pwd))" >&2 - ls -la >&2 - ls -la stacks >&2 || true - exit 1 - fi - - STACK_JSON=$(yq -o=json "$STACK") - - # ---------------------------------------------------------- - # Build the full graph JSON (preserves build config per app) - # ---------------------------------------------------------- - echo "$STACK_JSON" | jq -c '{ - name: .name, - description: .description, - propagation: .propagation, - defaults: .defaults, - apps: [.apps[] | { - name: .name, - repo: .repo, - role: .role, - "propagation-role": (."propagation-role" // (if .downstream == [] or .downstream == null then "terminal" elif (.role == "frontend") then "originator" else "forwarder" end)), - namespace: (.namespace // null), - "container-port": (."container-port" // null), - "service-port": (."service-port" // null), - "context-dir": (."context-dir" // "."), - dockerfile: (.dockerfile // "Dockerfile"), - build: (.build // {tool:"none", runtime:"custom"}), - downstream: (.downstream // []), - tests: (.tests // {}) - }] - }' > /tmp/stack.json - - cat /tmp/stack.json | tee /tekton/results/stack-json - - # ---------------------------------------------------------- - # Resolve versions: registry defaults + overrides - # ---------------------------------------------------------- - VERSIONS_JSON="{}" - if [ -f "$VFILE" ]; then - VERSIONS_JSON=$(yq -o=json '.apps' "$VFILE" | jq ' - [to_entries[] | {key: .key, value: .value.version}] | from_entries - ') - fi - - # Only keep versions for apps actually in this stack - APP_NAMES=$(cat /tmp/stack.json | jq -r '.apps[].name') - STACK_VERSIONS="{}" - for APP in $APP_NAMES; do - VER=$(echo "$VERSIONS_JSON" | jq -r --arg a "$APP" '.[$a] // "0.1.0-rc.0"') - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --arg a "$APP" --arg v "$VER" '. + {($a): $v}') - done - - # Merge overrides on top - if [ "$OVERRIDES" != "{}" ] && [ -n "$OVERRIDES" ]; then - echo "Applying version overrides: $OVERRIDES" - STACK_VERSIONS=$(echo "$STACK_VERSIONS" | jq --argjson ov "$OVERRIDES" '. * $ov') - fi - - echo "Resolved versions:" - echo "$STACK_VERSIONS" | jq '.' - echo -n "$STACK_VERSIONS" | jq -c '.' | tee /tekton/results/resolved-versions - echo "" - - # ---------------------------------------------------------- - # Topological order - # ---------------------------------------------------------- - TOPO=$(cat /tmp/stack.json | jq -r ' - def vis($n;$adj): - if (.t|index($n)) then .err=true - elif (.v|index($n)) then . - else .t+=[$n] | - reduce ($adj[$n]//[])[] as $d (.;vis($d;$adj)) | - .t-=[$n] | .v+=[$n] | .o+=[$n] - end; - def topo: - . as $g | - ($g.apps | map({key:.name, value:.downstream}) | from_entries) as $adj | - ($g.apps | map(.name)) as $all | - {v:[],t:[],o:[],err:false} | - reduce $all[] as $n (.; - if (.v|index($n)) then . else .|vis($n;$adj) end - ) | - if .err then error("cycle") else .o|reverse end; - topo | join(" ") - ') - echo -n "$TOPO" | tee /tekton/results/app-list - echo "" - - # ---------------------------------------------------------- - # Entry point (app that no other app lists as downstream) - # ---------------------------------------------------------- - ENTRY=$(cat /tmp/stack.json | jq -r ' - (.apps|map(.downstream)|flatten) as $deps | - .apps[] | select(.name as $n | ($deps|index($n))|not) | .name - ' | head -1) - echo -n "$ENTRY" | tee /tekton/results/entry-app - echo "" - - # ---------------------------------------------------------- - # Propagation chain from entry - # ---------------------------------------------------------- - cat /tmp/stack.json | jq -r --arg s "$ENTRY" ' - def walk($name): - . as $g | - ($g.apps[]|select(.name==$name)) as $app | - if $app then [$name] + reduce ($app.downstream//[])[] as $d - ([]; . + ($g|walk($d))) - else [] end; - walk($s) | join(" ") - ' | tee /tekton/results/propagation-chain - - # ---------------------------------------------------------- - # Intercept header - # ---------------------------------------------------------- - if [ -n "$PR" ]; then - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - echo -n "${HEADER_NAME}:pr-${PR}" | tee /tekton/results/intercept-header-value - else - echo -n "" | tee /tekton/results/intercept-header-value - fi - echo "" - - # ---------------------------------------------------------- - # Build list - # ---------------------------------------------------------- - if [ -n "$CHANGED" ]; then - echo -n "$CHANGED" | tee /tekton/results/build-apps - else - echo -n "$TOPO" | tee /tekton/results/build-apps - fi - echo "" - - # ---------------------------------------------------------- - # Which compile steps to run (only tools used by build-apps) - # ---------------------------------------------------------- - BUILD_APPS=$(cat /tekton/results/build-apps) - RUN_NPM="false"; RUN_MAVEN="false"; RUN_GRADLE="false"; RUN_PIP="false"; RUN_COMPOSER="false" - for app in $BUILD_APPS; do - tool=$(cat /tmp/stack.json | jq -r --arg a "$app" '.apps[]|select(.name==$a)|.build.tool // "none"') - case "$tool" in - npm) RUN_NPM="true" ;; - maven) RUN_MAVEN="true" ;; - gradle) RUN_GRADLE="true" ;; - pip) RUN_PIP="true" ;; - composer) RUN_COMPOSER="true" ;; - esac - done - echo -n "$RUN_NPM" | tee /tekton/results/run-compile-npm - echo -n "$RUN_MAVEN" | tee /tekton/results/run-compile-maven - echo -n "$RUN_GRADLE" | tee /tekton/results/run-compile-gradle - echo -n "$RUN_PIP" | tee /tekton/results/run-compile-pip - echo -n "$RUN_COMPOSER" | tee /tekton/results/run-compile-composer - echo "" - securityContext: - runAsUser: 0 - workingDir: /workspace/source - workspaces: - - name: source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:17:38Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: run-tests - tekton.dev/task: run-stack-tests - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-run-tests - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13622" - uid: 9237177e-0f17-43e6-b91f-ed70a25b84d6 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: app-list - value: demo-fe release-lifecycle-demo demo-api - - name: entry-app - value: demo-fe - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: tests-to-run - value: "" - - name: unmapped-area - value: "" - - name: apps-to-test - value: "" - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: run-stack-tests - timeout: 1h0m0s - workspaces: - - name: test-source - persistentVolumeClaim: - claimName: pvc-c91a6da3ac - status: - artifacts: {} - completionTime: "2026-09-28T03:18:13Z" - conditions: - - lastTransitionTime: "2026-09-28T03:18:13Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-run-tests-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: test-summary - type: string - value: | - { - "e2e-entry-point": "pass", - "release-lifecycle-demo": "pass", - "demo-api": "pass" - } - startTime: "2026-09-28T03:17:38Z" - steps: - - container: step-run-tests - imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 - name: run-tests - provenance: {} - terminated: - containerID: containerd://eeb81d93deb7f10a0abb876f47148c2dbe9d9641ac87b1435b85e1a517052e56 - exitCode: 0 - finishedAt: "2026-09-28T03:18:12Z" - message: '[{"key":"test-summary","value":"{\n \"e2e-entry-point\": \"pass\",\n \"release-lifecycle-demo\": - \"pass\",\n \"demo-api\": \"pass\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:17:43Z" - terminationReason: Completed - taskSpec: - description: | - Two-phase test execution: - Phase 1 — E2E through entry point: - Always sends requests through the stack's entry app (frontend) - with the intercept header. This exercises the full chain and - proves the intercepted PR app works in context. - For A→B→C→D where C is intercepted, the request enters A, - flows through B, hits the PR build of C via Telepresence, - then continues to D. The header propagates end-to-end. - - Phase 2 — Per-app tests: - Runs each app's configured test suites (Postman, Playwright, - Artillery) with the intercept header attached. For intercepted - apps this validates the PR build directly. For non-intercepted - apps this validates they still work with the header present. - - Runner logic lives in scripts/run-stack-tests-runners.sh and is mounted from ConfigMap run-stack-tests-runners so the Task does not depend on the cloned platform git-revision. - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated list of apps in topological order - name: app-list - type: string - - description: Entry-point app (frontend / root of the graph) - name: entry-app - type: string - - description: Full ordered chain from entry to leaves - name: propagation-chain - type: string - - description: Space-separated list of intercepted apps (changed in this PR) - name: build-apps - type: string - - default: "" - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: "" - description: Comma-separated test IDs from query-test-plan. Empty = run all - tests. - name: tests-to-run - type: string - - default: "" - description: Service name with no mapped regression tests. Non-empty = report - unmapped. - name: unmapped-area - type: string - - default: "" - description: Comma-separated service/app names whose tests should run. Empty - = run all. - name: apps-to-test - type: string - results: - - description: JSON summary of test results per app + e2e - name: test-summary - type: string - steps: - - computeResources: {} - image: node:22-alpine - name: run-tests - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq bash >/dev/null 2>&1 - - npm install -g newman artillery >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - APP_LIST="demo-fe release-lifecycle-demo demo-api" - ENTRY_APP="demo-fe" - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - TESTS_TO_RUN="" - UNMAPPED_AREA="" - APPS_TO_TEST="" - TEST_SOURCE="/workspace/test-source" - TEST_SUMMARY_PATH="/tekton/results/test-summary" - export STACK_JSON APP_LIST ENTRY_APP CHAIN BUILD_APPS INTERCEPT \ - DEFAULT_NS TESTS_TO_RUN UNMAPPED_AREA APPS_TO_TEST \ - TEST_SOURCE TEST_SUMMARY_PATH - - RUNNERS="/opt/tekton-dag/run-stack-tests-runners.sh" - if [ ! -f "$RUNNERS" ]; then - echo "ERROR: run-stack-tests runners ConfigMap missing: $RUNNERS" >&2 - exit 1 - fi - # shellcheck disable=SC1090 - . "$RUNNERS" - volumeMounts: - - mountPath: /opt/tekton-dag - name: runners-script - workingDir: /workspace/test-source - volumes: - - configMap: - name: run-stack-tests-runners - name: runners-script - workspaces: - - name: test-source -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:45Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: validate-original-traffic - tekton.dev/task: validate-original-traffic - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-validate-original-traffic - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13402" - uid: 44cb7b2e-2172-49ff-8295-3b83a2260049 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: entry-app - value: demo-fe - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: validate-original-traffic - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:17:33Z" - conditions: - - lastTransitionTime: "2026-09-28T03:17:33Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-validate-original-traffic-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - results: - - name: original-traffic-summary - type: string - value: | - { - "demo-fe": { - "health-check": "pass", - "http-code": "200" - }, - "release-lifecycle-demo": { - "health-check": "pass", - "http-code": "200" - }, - "demo-api": { - "health-check": "pass", - "http-code": "200" - }, - "e2e-no-header-passthrough": { - "status": "pass", - "http-code": "200" - }, - "artillery-no-header-burst": "pass", - "overall": "pass" - } - startTime: "2026-09-28T03:16:45Z" - steps: - - container: step-validate - imageID: docker.io/library/node@sha256:0a7108bf6c7bf5de370ffb1a3ed6be93d405b43ff159f681a8d18c0e2bc2e402 - name: validate - provenance: {} - terminated: - containerID: containerd://d9397c9746f9b3fb25cb7a2012a638548ac84da8e0bde7d616fff9c30de12520 - exitCode: 0 - finishedAt: "2026-09-28T03:17:32Z" - message: '[{"key":"original-traffic-summary","value":"{\n \"demo-fe\": {\n \"health-check\": - \"pass\",\n \"http-code\": \"200\"\n },\n \"release-lifecycle-demo\": - {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"demo-api\": - {\n \"health-check\": \"pass\",\n \"http-code\": \"200\"\n },\n \"e2e-no-header-passthrough\": - {\n \"status\": \"pass\",\n \"http-code\": \"200\"\n },\n \"artillery-no-header-burst\": - \"pass\",\n \"overall\": \"pass\"\n}\n","type":1}]' - reason: Completed - startedAt: "2026-09-28T03:16:50Z" - terminationReason: Completed - taskSpec: - description: | - Milestone 5 — Validates that original (non-intercepted) traffic continues to work while Telepresence intercepts are active. - Sends requests to every app in the stack WITHOUT the intercept header. These requests must reach the original deployments, not the PR pods. This proves the intercept is additive (header-based split) and does not disrupt normal service operation. - For a stack A→B→C→D where C is intercepted: - - Request WITHOUT header enters A → B → C (original) → D - - All four services respond normally from their original deployments - - The PR pod for C is never hit because no header is present - - Two checks per app: - 1. Direct health check — curl the service without headers - 2. Entry-point passthrough — request enters through the entry app - without headers, exercises the full chain via original deployments - - If Artillery is available, also runs a short load burst without headers to confirm sustained traffic handling during the intercept window. - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated ordered list of apps in the chain - name: propagation-chain - type: string - - default: "" - description: Space-separated list of intercepted apps (for reporting only) - name: build-apps - type: string - - description: Entry-point app (frontend / root of the graph) - name: entry-app - type: string - - default: staging - name: default-namespace - type: string - results: - - description: 'JSON summary: per-app health + e2e passthrough without headers' - name: original-traffic-summary - type: string - steps: - - computeResources: {} - image: node:22-alpine - name: validate - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq bash >/dev/null 2>&1 - npm install -g artillery >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - ENTRY_APP="demo-fe" - DEFAULT_NS="staging" - - echo '{}' > /tmp/orig-summary.json - OVERALL_PASS=true - - echo "============================================================" - echo " Milestone 5: Original Traffic Validation" - echo " (intercepts are ACTIVE — these requests carry NO header)" - echo "============================================================" - echo "" - echo " Intercepted apps: ${BUILD_APPS:-}" - echo " Full chain: $CHAIN" - echo " Entry point: $ENTRY_APP" - echo "" - echo " Expectation: every request WITHOUT the intercept header" - echo " reaches the ORIGINAL deployment, not the PR pod." - echo "" - - # =========================================================== - # Phase 1: Direct health check per service (no headers) - # =========================================================== - echo "############################################################" - echo " PHASE 1: Direct health check per service (no headers)" - echo "############################################################" - echo "" - - for APP in $CHAIN; do - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - URL="http://${APP}.${NS}.svc.cluster.local:${SPORT}/" - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - MARKER="" - $IS_INTERCEPTED && MARKER=" [INTERCEPTED — should still serve original on bare requests]" - - echo " $APP:${MARKER}" - echo " URL: $URL" - echo " Headers: " - - HTTP_CODE=$(curl -s -o /tmp/orig-response-${APP}.txt -w "%{http_code}" \ - --connect-timeout 10 --max-time 30 \ - "$URL" 2>/dev/null || echo "000") - - if [ "$HTTP_CODE" = "000" ]; then - echo " WARN: Service not reachable (may be expected in dry-run)" - STATUS="unreachable" - elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then - echo " PASS: HTTP $HTTP_CODE — original deployment responding" - STATUS="pass" - else - echo " FAIL: HTTP $HTTP_CODE — unexpected response" - STATUS="fail" - OVERALL_PASS=false - fi - - jq --arg a "$APP" --arg s "$STATUS" --arg c "$HTTP_CODE" \ - '. + {($a): {"health-check": $s, "http-code": $c}}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - echo "" - done - - # =========================================================== - # Phase 2: Full-chain passthrough via entry point (no headers) - # =========================================================== - echo "############################################################" - echo " PHASE 2: Full-chain passthrough (no intercept headers)" - echo "############################################################" - echo "" - - ENTRY_NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - ENTRY_SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY_APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - ENTRY_URL="http://${ENTRY_APP}.${ENTRY_NS}.svc.cluster.local:${ENTRY_SPORT}/" - - echo " Entry URL: $ENTRY_URL" - echo " Headers: (no x-dev-session, no baggage)" - echo "" - echo " This request should flow through ALL original deployments." - echo " Even intercepted apps should respond from their original pods" - echo " because no header matches the Telepresence intercept rule." - echo "" - - PASSTHROUGH_RESULT=$(curl -s \ - --connect-timeout 15 --max-time 60 \ - "$ENTRY_URL" 2>/dev/null || echo '{"error":"unreachable"}') - - echo " Response:" - echo "$PASSTHROUGH_RESULT" | jq '.' 2>/dev/null || echo " $PASSTHROUGH_RESULT" - echo "" - - PASSTHROUGH_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --connect-timeout 15 --max-time 60 \ - "$ENTRY_URL" 2>/dev/null || echo "000") - - if [ "$PASSTHROUGH_CODE" = "000" ]; then - echo " WARN: Entry point not reachable" - PASSTHROUGH_STATUS="unreachable" - elif [ "$PASSTHROUGH_CODE" -ge 200 ] && [ "$PASSTHROUGH_CODE" -lt 400 ]; then - echo " PASS: HTTP $PASSTHROUGH_CODE — full chain responding without headers" - PASSTHROUGH_STATUS="pass" - else - echo " FAIL: HTTP $PASSTHROUGH_CODE" - PASSTHROUGH_STATUS="fail" - OVERALL_PASS=false - fi - - jq --arg s "$PASSTHROUGH_STATUS" --arg c "$PASSTHROUGH_CODE" \ - '. + {"e2e-no-header-passthrough": {"status": $s, "http-code": $c}}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - # =========================================================== - # Phase 3: Artillery burst without headers - # =========================================================== - echo "" - echo "############################################################" - echo " PHASE 3: Artillery load burst (no intercept headers)" - echo "############################################################" - echo "" - echo " Short burst against entry point — no headers." - echo " Confirms sustained original-traffic handling during intercept." - echo "" - - cat > /tmp/original-traffic-artillery.yml </dev/null; then - echo " Artillery burst: PASS" - else - ARTY_EXIT=$? - if [ $ARTY_EXIT -eq 127 ]; then - echo " Artillery not available — skipping load burst (non-fatal)" - ARTILLERY_STATUS="skipped" - else - echo " Artillery burst: FAIL (exit $ARTY_EXIT)" - ARTILLERY_STATUS="fail" - OVERALL_PASS=false - fi - fi - - jq --arg s "$ARTILLERY_STATUS" \ - '. + {"artillery-no-header-burst": $s}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - # =========================================================== - # Summary - # =========================================================== - echo "" - echo "============================================================" - echo " Original Traffic Validation Summary" - echo "============================================================" - - jq --arg o "$([ "$OVERALL_PASS" = "true" ] && echo pass || echo fail)" \ - '. + {"overall": $o}' \ - /tmp/orig-summary.json > /tmp/orig-summary-tmp.json - mv /tmp/orig-summary-tmp.json /tmp/orig-summary.json - - cat /tmp/orig-summary.json | jq '.' - cat /tmp/orig-summary.json | tee /tekton/results/original-traffic-summary - - if [ "$OVERALL_PASS" = "false" ]; then - echo "" - echo "FAILED: Original traffic was disrupted while intercepts were active." - exit 1 - fi - - echo "" - echo "PASSED: Original traffic unaffected by active intercepts." -- apiVersion: tekton.dev/v1 - kind: TaskRun - metadata: - annotations: - pipeline.tekton.dev/release: fcba522 - tektondag.io/stackrun-uid: ab4b6aed-79b3-4acc-9c08-2afcdb19bce0 - creationTimestamp: "2026-09-28T03:16:45Z" - generation: 1 - labels: - app.kubernetes.io/managed-by: tekton-pipelines - app.kubernetes.io/part-of: tekton-job-standardization - app.kubernetes.io/version: 1.0.0 - tekton.dev/memberOf: tasks - tekton.dev/pipeline: stack-pr-test - tekton.dev/pipelineRun: stackrun-pr-27exw - tekton.dev/pipelineRunUID: d2f2e66b-d560-4909-b6ad-f89191524e1b - tekton.dev/pipelineTask: validate-propagation - tekton.dev/task: validate-stack-propagation - tektondag.io/stackrun: stackrun-pr-27exw - name: stackrun-pr-27exw-validate-propagation - namespace: tekton-pipelines - ownerReferences: - - apiVersion: tekton.dev/v1 - blockOwnerDeletion: true - controller: true - kind: PipelineRun - name: stackrun-pr-27exw - uid: d2f2e66b-d560-4909-b6ad-f89191524e1b - resourceVersion: "13256" - uid: 3537be13-4e47-4a45-91a9-e1685d434007 - spec: - params: - - name: stack-json - value: | - {"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - - name: propagation-chain - value: | - demo-fe release-lifecycle-demo demo-api - - name: build-apps - value: demo-fe - - name: intercept-header-value - value: x-dev-session:pr-903 - - name: deployed-pods - value: | - { - "demo-fe": "pr-demo-fe-1790565353" - } - serviceAccountName: tekton-pr-sa - taskRef: - kind: Task - name: validate-stack-propagation - timeout: 1h0m0s - status: - artifacts: {} - completionTime: "2026-09-28T03:16:51Z" - conditions: - - lastTransitionTime: "2026-09-28T03:16:51Z" - message: All Steps have completed executing - reason: Succeeded - status: "True" - type: Succeeded - podName: stackrun-pr-27exw-validate-propagation-pod - provenance: - featureFlags: - awaitSidecarReadiness: true - coschedule: disabled - enableAPIFields: beta - enableProvenanceInStatus: true - enforceNonfalsifiability: none - maxResultSize: 4096 - resultExtractionMethod: termination-message - runningInEnvWithInjectedSidecars: true - verificationNoMatchPolicy: ignore - startTime: "2026-09-28T03:16:45Z" - steps: - - container: step-validate - imageID: docker.io/library/alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 - name: validate - provenance: {} - terminated: - containerID: containerd://602973402dcb5a72a08d1cf9c3ce9a00c7d7c424f80ff394201939858f43fede - exitCode: 0 - finishedAt: "2026-09-28T03:16:50Z" - reason: Completed - startedAt: "2026-09-28T03:16:49Z" - terminationReason: Completed - taskSpec: - description: | - Fail-closed check that the original override header is transferred hop-to-hop up to the intercepted app(s). A rewritten or dropped value (e.g. pr-42 → local-debug) fails the task: intercepts only match the original session. - The header only needs to propagate from the entry point UP TO the intercepted app. Beyond the intercept, downstream calls are normal — there's no Telepresence intercept on those services to match on, so the header doesn't need to be there. - Example: A(originator) → B(forwarder) → C(terminal), D(terminal) - If B is intercepted: - - Header must reach B (A originates → B receives via Telepresence) - - B's calls to C and D are normal calls to normal deployments - - C and D do NOT need the header — no intercept to match - If C is intercepted: - - Header must reach C (A originates → B forwards → C receives) - - D is untouched - If B AND C are intercepted: - - Header must reach B AND continue to C - - B must forward because there's another intercept downstream - params: - - description: Full stack graph JSON - name: stack-json - type: string - - description: Space-separated ordered list of apps in the chain - name: propagation-chain - type: string - - default: "" - description: Space-separated list of intercepted apps - name: build-apps - type: string - - description: Header value used for intercepts (e.g. x-dev-session:pr-42) - name: intercept-header-value - type: string - - default: staging - name: default-namespace - type: string - - default: "" - description: | - JSON map app -> PR pod name from deploy-intercepts. When non-empty the - task also proves routing: a header-matched request must be served by - that PR pod and an unmatched request must not be (read from the pod's - access log through the Kubernetes API). - name: deployed-pods - type: string - steps: - - computeResources: {} - image: alpine:3.19 - name: validate - script: | - #!/bin/sh - set -e - apk add --no-cache curl jq >/dev/null 2>&1 - - STACK_JSON='{"name":"stack-one","description":"Demo 3-tier stack: Frontend (Vue) → BFF middleware (Spring Boot) → REST API persistence (Spring Boot)","propagation":{"header-name":"x-dev-session","baggage-key":"dev-session","strategy":"w3c-baggage"},"defaults":{"namespace":"staging","image-registry":"${IMAGE_REGISTRY}","service-port":"80","container-port":"8080"},"apps":[{"name":"demo-fe","repo":"jmjava/tekton-dag-vue-fe","role":"frontend","propagation-role":"originator","namespace":null,"container-port":"80","service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"npm","runtime":"vue","node-version":"22","build-command":"npm install && npm run build"},"downstream":["release-lifecycle-demo"],"tests":{"postman":"tests/postman/fe-tests.json","playwright":"tests/playwright","artillery":"tests/artillery/load-test.yml"}},{"name":"release-lifecycle-demo","repo":"jmjava/tekton-dag-spring-boot","role":"middleware","propagation-role":"forwarder","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":["demo-api"],"tests":{"postman":"tests/postman/bff-tests.json"}},{"name":"demo-api","repo":"jmjava/tekton-dag-spring-boot-gradle","role":"persistence","propagation-role":"terminal","namespace":null,"container-port":null,"service-port":null,"context-dir":".","dockerfile":"Dockerfile","build":{"tool":"maven","runtime":"spring-boot","java-version":"21","build-command":"mvn -B clean package -DskipTests"},"downstream":[],"tests":{"postman":"tests/postman/api-tests.json"}}]} - ' - CHAIN="demo-fe release-lifecycle-demo demo-api - " - BUILD_APPS="demo-fe" - INTERCEPT="x-dev-session:pr-903" - DEFAULT_NS="staging" - - HEADER_NAME=$(echo "$STACK_JSON" | jq -r '.propagation."header-name" // "x-dev-session"') - BAGGAGE_KEY=$(echo "$STACK_JSON" | jq -r '.propagation."baggage-key" // "dev-session"') - - HEADER_VAL="" - if [ -n "$INTERCEPT" ]; then - HEADER_VAL=$(echo "$INTERCEPT" | cut -d: -f2-) - fi - - COUNT=0 - for APP in $CHAIN; do COUNT=$((COUNT + 1)); done - - # Find the deepest intercepted app in the chain - # Header only needs to propagate up to this point - DEEPEST_INTERCEPT_POS=0 - POS=0 - for APP in $CHAIN; do - POS=$((POS + 1)) - for BA in $BUILD_APPS; do - if [ "$BA" = "$APP" ]; then - DEEPEST_INTERCEPT_POS=$POS - fi - done - done - - echo "=============================================" - echo " Stack Propagation Validation" - echo "=============================================" - echo " Chain: $CHAIN" - echo " Header: $HEADER_NAME = $HEADER_VAL" - echo " Baggage key: $BAGGAGE_KEY" - echo " Hop count: $COUNT" - echo " Intercepted: ${BUILD_APPS:-}" - echo " Deepest intercept: position $DEEPEST_INTERCEPT_POS of $COUNT" - echo "" - - # Show the propagation contract for each hop - echo " Propagation contract:" - HOP=0 - PAST_DEEPEST=false - for APP in $CHAIN; do - HOP=$((HOP + 1)) - PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then - PAST_DEEPEST=true - fi - - TAG="" - $IS_INTERCEPTED && TAG=" ** PR BUILD **" - - if $PAST_DEEPEST; then - echo " $HOP. $APP ($PROP_ROLE) → NORMAL call (no intercept downstream, header not required)" - else - case "$PROP_ROLE" in - originator) echo " $HOP. $APP ($PROP_ROLE)${TAG} → SETS header, sends to next hop" ;; - forwarder) - # Only needs to forward if there's another intercepted app downstream - HAS_DOWNSTREAM_INTERCEPT=false - CHECK_POS=0 - for C in $CHAIN; do - CHECK_POS=$((CHECK_POS + 1)) - if [ $CHECK_POS -gt $HOP ]; then - for BA in $BUILD_APPS; do - [ "$BA" = "$C" ] && HAS_DOWNSTREAM_INTERCEPT=true - done - fi - done - - if $IS_INTERCEPTED && ! $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, downstream calls are NORMAL (no forwarding needed)" - elif $IS_INTERCEPTED && $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header via intercept, MUST FORWARD (intercepted app downstream)" - elif $HAS_DOWNSTREAM_INTERCEPT; then - echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, MUST FORWARD (intercepted app downstream)" - else - echo " $HOP. $APP ($PROP_ROLE) → RECEIVES header, downstream calls NORMAL" - fi - ;; - terminal) echo " $HOP. $APP ($PROP_ROLE)${TAG} → RECEIVES header, END of chain" ;; - *) echo " $HOP. $APP ($PROP_ROLE)${TAG}" ;; - esac - fi - done - echo "" - - if [ "$COUNT" -le 1 ]; then - echo "Single-app stack — health check only." - ENTRY=$(echo $CHAIN | awk '{print $1}') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - URL="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}/propagation" - - echo " Health check: $URL" - HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - --connect-timeout 10 --max-time 30 \ - "$URL" 2>/dev/null || echo "000") - - if [ "$HTTP_CODE" = "000" ]; then - echo " WARN: Service not reachable (may be expected in dry-run)" - elif [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then - echo " PASS: HTTP $HTTP_CODE" - else - echo " WARN: HTTP $HTTP_CODE (non-fatal for PR validation)" - fi - exit 0 - fi - - # Multi-hop validation — enter through the originator - ENTRY=$(echo $CHAIN | awk '{print $1}') - NS=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$ENTRY" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - BASE="http://${ENTRY}.${NS}.svc.cluster.local:${SPORT}" - TRACEPARENT="00-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 32)-$(cat /dev/urandom | tr -dc 'a-f0-9' | head -c 16)-01" - - fetch_originator() { - body_file=$(mktemp) - http_code=$(curl -s -o "$body_file" -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - -H "traceparent: ${TRACEPARENT}" \ - --connect-timeout 10 --max-time 60 \ - "$1" 2>/dev/null || true) - [ -n "$http_code" ] || http_code="000" - printf '%s' "$http_code" > /tmp/originator-http-code - cat "$body_file" - rm -f "$body_file" - } - - URL="${BASE}/propagation" - echo "Sending test request to originator: $URL" - echo " Headers: ${HEADER_NAME}=${HEADER_VAL}, baggage=${BAGGAGE_KEY}=${HEADER_VAL}" - echo "" - - RESULT=$(fetch_originator "$URL") - HTTP_CODE=$(cat /tmp/originator-http-code 2>/dev/null || echo "000") - if [ "$HTTP_CODE" = "404" ] || [ "$HTTP_CODE" = "000" ] \ - || echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then - URL="${BASE}/" - echo " /propagation unavailable (HTTP $HTTP_CODE) — retrying $URL" - RESULT=$(fetch_originator "$URL") - fi - - echo "Response:" - echo "$RESULT" | jq '.' 2>/dev/null || echo "$RESULT" - echo "" - - FAILED=0 - - if echo "$RESULT" | grep -Eq '"error"[[:space:]]*:[[:space:]]*"unreachable"'; then - echo "FAIL: originator unreachable — cannot prove hop-to-hop copy" - FAILED=1 - fi - - HEADER_FOUND=false - if [ -n "$HEADER_VAL" ] && printf '%s' "$RESULT" | grep -Fq "$HEADER_VAL"; then - HEADER_FOUND=true - fi - - REWRITTEN=false - REWRITE_VALS=$(printf '%s' "$RESULT" | jq -r ' - .. | objects - | (.session // .devSession // .headerValue // empty) - | select(type=="string" and . != "") - ' 2>/dev/null || true) - if [ -n "$HEADER_VAL" ] && [ -n "$REWRITE_VALS" ]; then - for SV in $REWRITE_VALS; do - if [ "$SV" != "$HEADER_VAL" ]; then - REWRITTEN=true - echo "FAIL: original override '$HEADER_VAL' was rewritten to '$SV'" - FAILED=1 - fi - done - fi - - if [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND; then - echo "FAIL: original override '$HEADER_VAL' missing from response" - FAILED=1 - fi - - echo "Hop-by-hop verification (fail-closed):" - HOP=0 - for APP in $CHAIN; do - HOP=$((HOP + 1)) - PROP_ROLE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|."propagation-role" // "unknown"') - - IS_INTERCEPTED=false - for BA in $BUILD_APPS; do - [ "$BA" = "$APP" ] && IS_INTERCEPTED=true - done - - MARKER="" - $IS_INTERCEPTED && MARKER=" [INTERCEPTED]" - - REPO_BASE=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '.apps[]|select(.name==$a)|.repo // ""' | awk -F/ '{print $NF}') - REACHED=false - echo "$RESULT" | grep -qi "$APP" && REACHED=true - if [ -n "$REPO_BASE" ]; then - echo "$RESULT" | grep -qi "$REPO_BASE" && REACHED=true - fi - - HOP_SESSION=$(printf '%s' "$RESULT" | jq -r --arg a "$APP" ' - [.. | objects | select((.app // .name // .service // "") | ascii_downcase | contains($a | ascii_downcase))] - | map(.session // .devSession // .headerValue // empty) - | map(select(. != "")) - | first // empty - ' 2>/dev/null || true) - - HEADER_REQUIRED=true - if [ $HOP -gt $DEEPEST_INTERCEPT_POS ] && [ $DEEPEST_INTERCEPT_POS -gt 0 ]; then - HEADER_REQUIRED=false - fi - - if ! $HEADER_REQUIRED; then - echo " HOP $HOP $APP ($PROP_ROLE): OK (beyond intercept — original override not required)" - elif ! $REACHED; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — NOT REACHED (header required at this hop)" - FAILED=1 - elif [ -n "$HOP_SESSION" ] && [ -n "$HEADER_VAL" ] && [ "$HOP_SESSION" != "$HEADER_VAL" ]; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — rewritten session='$HOP_SESSION' (expected '$HEADER_VAL')" - FAILED=1 - elif [ -n "$HEADER_VAL" ] && ! $HEADER_FOUND && [ -z "$HOP_SESSION" ]; then - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: FAIL — original override not confirmed" - FAILED=1 - else - echo " HOP $HOP $APP ($PROP_ROLE)${MARKER}: PASS — REACHED session=${HOP_SESSION:-$HEADER_VAL}" - fi - done - - echo "" - if [ "$FAILED" -ne 0 ]; then - echo "FAIL: original override was not transferred hop-to-hop" - exit 1 - fi - if $HEADER_FOUND; then - echo "PASS: original override '$HEADER_VAL' transferred hop-to-hop" - else - echo "PASS: hop-to-hop verification complete" - fi - echo "" - - # ------------------------------------------------------------------ - # Routing proof (fail-closed). The /propagation echo above is served - # identically by the baseline and the PR pod, so it cannot tell which - # pod answered. Prove it from the PR pod's own access log: a request - # tagged with a unique query string and carrying the header must show - # up there; an untagged-header request with a different tag must not. - # ------------------------------------------------------------------ - DEPLOYED_PODS='{ - "demo-fe": "pr-demo-fe-1790565353" - } - ' - if [ -n "$HEADER_VAL" ] && [ -n "$BUILD_APPS" ] \ - && [ -n "$DEPLOYED_PODS" ] && [ "$DEPLOYED_PODS" != "{}" ]; then - echo "Routing proof (fail-closed): PR pod must serve matched traffic only" - SA_DIR=/var/run/secrets/kubernetes.io/serviceaccount - API="https://kubernetes.default.svc" - pod_log() { - # $1 namespace, $2 pod. Prefer the app container; fall back to the - # pod default if that container name does not exist. - out=$(curl -s --cacert "$SA_DIR/ca.crt" \ - -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ - "$API/api/v1/namespaces/$1/pods/$2/log?container=pr-component&sinceSeconds=600" || true) - if printf '%s' "$out" | grep -q '"kind":"Status"'; then - out=$(curl -s --cacert "$SA_DIR/ca.crt" \ - -H "Authorization: Bearer $(cat "$SA_DIR/token")" \ - "$API/api/v1/namespaces/$1/pods/$2/log?sinceSeconds=600" || true) - fi - printf '%s' "$out" - } - for APP in $BUILD_APPS; do - POD=$(echo "$DEPLOYED_PODS" | jq -r --arg a "$APP" '.[$a] // empty') - if [ -z "$POD" ]; then - echo " $APP: FAIL — no PR pod recorded in deployed-pods" - FAILED=1 - continue - fi - NS=$(echo "$STACK_JSON" | jq -r --arg a "$APP" --arg d "$DEFAULT_NS" \ - '(.defaults.namespace // $d) as $dn | .apps[]|select(.name==$a)|.namespace // $dn') - SPORT=$(echo "$STACK_JSON" | jq -r --arg a "$APP" \ - '(.defaults."service-port" // "80") as $dp | .apps[]|select(.name==$a)|."service-port" // $dp') - SVC="http://${APP}.${NS}.svc.cluster.local:${SPORT}" - TAG=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12) - HIT="probehit${TAG}" - MISS="probemiss${TAG}" - - HIT_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - -H "${HEADER_NAME}: ${HEADER_VAL}" \ - -H "baggage: ${BAGGAGE_KEY}=${HEADER_VAL}" \ - --connect-timeout 10 --max-time 30 \ - "${SVC}/propagation?${HIT}" 2>/dev/null || echo "000") - MISS_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ - --connect-timeout 10 --max-time 30 \ - "${SVC}/propagation?${MISS}" 2>/dev/null || echo "000") - echo " $APP -> $POD: matched request HTTP $HIT_CODE, unmatched request HTTP $MISS_CODE" - - LOG="" - ATTEMPT=0 - while [ $ATTEMPT -lt 10 ]; do - ATTEMPT=$((ATTEMPT + 1)) - LOG=$(pod_log "$NS" "$POD") - if printf '%s' "$LOG" | grep -q "$HIT"; then break; fi - sleep 2 - done - - if ! printf '%s' "$LOG" | grep -q "$HIT"; then - echo " $APP: FAIL — header-matched request never reached PR pod $POD (intercept is not routing)" - echo " --- last 20 log lines of $POD ---" - printf '%s\n' "$LOG" | tail -n 20 | sed 's/^/ /' - FAILED=1 - elif printf '%s' "$LOG" | grep -q "$MISS"; then - echo " $APP: FAIL — unmatched request also reached PR pod $POD (intercept steals all traffic)" - FAILED=1 - else - echo " $APP: PASS — PR pod $POD served the matched request and not the unmatched one" - fi - done - echo "" - if [ "$FAILED" -ne 0 ]; then - echo "FAIL: intercept routing not proven" - exit 1 - fi - echo "PASS: intercept routing proven from PR pod access logs" - echo "" - elif [ -n "$BUILD_APPS" ]; then - echo "Routing proof skipped: deployed-pods not provided" - echo "" - fi - - echo "Propagation validation complete." -kind: List -metadata: - resourceVersion: "" diff --git a/artifacts/intercept-e2e/trigger-bootstrap.json b/artifacts/intercept-e2e/trigger-bootstrap.json deleted file mode 100644 index 3e6f83d..0000000 --- a/artifacts/intercept-e2e/trigger-bootstrap.json +++ /dev/null @@ -1 +0,0 @@ -{"mode":"bootstrap","pipelinerun":"stackrun-bootstrap-bhmj5","stackrun":"stackrun-bootstrap-bhmj5","status":"created"} diff --git a/artifacts/intercept-e2e/trigger-pr.json b/artifacts/intercept-e2e/trigger-pr.json deleted file mode 100644 index 0ccef5f..0000000 --- a/artifacts/intercept-e2e/trigger-pr.json +++ /dev/null @@ -1 +0,0 @@ -{"mode":"pr","pipelinerun":"stackrun-pr-27exw","stackrun":"stackrun-pr-27exw","status":"created"} From 034467942cf854c941a51b7c5aa661146e03b50d Mon Sep 17 00:00:00 2001 From: John Menke Date: Sun, 27 Sep 2026 23:30:39 -0400 Subject: [PATCH 30/30] milestone-7: mark 'run either backend' superseded; fix link to removed Telepresence task check-markdown-links failed the --local-only regression job on ../tasks/deploy-intercept.yaml, deleted with the Telepresence removal. Co-authored-by: Cursor --- milestones/milestone-7.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/milestones/milestone-7.md b/milestones/milestone-7.md index 96ef95e..d42f85f 100644 --- a/milestones/milestone-7.md +++ b/milestones/milestone-7.md @@ -1,6 +1,8 @@ # Milestone 7: Prototype `deploy-intercept-mirrord` Tekton task (run either backend) -> **Active milestone.** Follows [milestone 6](milestone-6.md) (mirrord validated for all PR pipeline scenarios). **Delayed migration:** do not replace Telepresence yet; add mirrord as an option and support **running either** via a pipeline parameter. Default remains Telepresence so existing behavior is unchanged until you opt in to mirrord. +> **Status 2026-09-27 — superseded in part.** The "run either backend" plan below is historical. In-cluster Telepresence was removed (it had never routed a header request to a PR pod in CI; see [docs/intercept-backends.md](../docs/intercept-backends.md) for the evidence) and **mirrord is the only backend**. `intercept-backend` defaults to `mirrord` and is kept for API compatibility. The routing proof in `validate-stack-propagation` (PR-pod access log, matched + unmatched probes) is now the exit criterion for 7.1/7.2 and passes on kind. +> +> Original framing: Follows [milestone 6](milestone-6.md) (mirrord validated for all PR pipeline scenarios). **Delayed migration:** do not replace Telepresence yet; add mirrord as an option and support **running either** via a pipeline parameter. Default remains Telepresence so existing behavior is unchanged until you opt in to mirrord. ## Goal @@ -120,6 +122,7 @@ Add to `scripts/publish-build-images.sh`. ## References - [Milestone 6](milestone-6.md) — mirrord validation results (all scenarios pass) -- [tasks/deploy-intercept.yaml](../tasks/deploy-intercept.yaml) — current Telepresence-based task (to be replaced) +- `tasks/deploy-intercept.yaml` — former Telepresence-based task, removed 2026-09-27 (git history; see [docs/intercept-backends.md](../docs/intercept-backends.md)) +- [tasks/deploy-intercept-mirrord.yaml](../tasks/deploy-intercept-mirrord.yaml) — the mirrord task, now the only backend - [docs/mirrord-poc-results.md](../docs/mirrord-poc-results.md) — M5 PoC, config format, security notes - [docs/mirrord-m6-test-scenarios.md](../docs/mirrord-m6-test-scenarios.md) — validated test scenarios