From 32b52332c611adea257c4ca83cc4abb2dca9d007 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 5 Mar 2026 01:52:02 +0100 Subject: [PATCH] fix(ci): pass commits-json as env var to avoid shell escaping The sensor passes GitLab commit data containing single quotes in commit messages (e.g. Merge branch 'feature-name'). When embedded directly in the shell script via Argo template substitution, this breaks the shell syntax. Pass as a container env var instead. Co-Authored-By: Claude Opus 4.6 --- infra/k8s/argo/ci-pipeline-template.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infra/k8s/argo/ci-pipeline-template.yaml b/infra/k8s/argo/ci-pipeline-template.yaml index bd6291bd7..d13cb4722 100644 --- a/infra/k8s/argo/ci-pipeline-template.yaml +++ b/infra/k8s/argo/ci-pipeline-template.yaml @@ -210,6 +210,9 @@ spec: container: image: rg.fr-par.scw.cloud/foxhunt-ci/foxhunt-runtime:latest command: ["/bin/sh", "-c"] + env: + - name: COMMITS_JSON + value: "{{workflow.parameters.commits-json}}" resources: requests: cpu: 100m @@ -224,7 +227,7 @@ spec: #!/bin/sh set -e - COMMITS_JSON='{{workflow.parameters.commits-json}}' + # COMMITS_JSON is passed as env var to avoid shell escaping issues # Extract all changed file paths from commits array if command -v jq >/dev/null 2>&1; then