fix(ci): kaniko as args-list not sh -c (busybox choked on sprig expansion)

/busybox/sh -c parsed the {{=sprig.trunc(...)}} destination and errored on
the '(' -> syntax error, exit 2. Switched to Kaniko's entrypoint + a plain
YAML args list (the proven msp build-image pattern): Argo evaluates the
expression and passes it straight to Kaniko, no shell. Also pin executor
v1.23.2 (matches msp; no busybox needed).
This commit is contained in:
2026-07-21 11:11:19 +00:00
parent 6677f73a64
commit da28c049f7

View File

@@ -120,18 +120,19 @@ spec:
- { name: git-ssh-key, mountPath: /etc/git-ssh, readOnly: true }
- { name: workspace, mountPath: /workspace }
container:
image: gcr.io/kaniko-project/executor:debug
command: [/busybox/sh, -c]
image: gcr.io/kaniko-project/executor:v1.23.2
# Kaniko's own entrypoint + a YAML args LIST (the msp build-image pattern) — NOT `sh -c` with one big
# string. A shell wrapper made busybox try to parse the `{{=sprig.trunc(...)}}` expansion and choke on
# the `(` (syntax error). As a plain args list, Argo evaluates the expression and hands it straight to
# Kaniko, no shell in between.
args:
- |
/kaniko/executor \
--context=/workspace/src \
--dockerfile=/workspace/src/infra/docker/fxhnt.Dockerfile \
--destination=rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest \
--destination=rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:{{=sprig.trunc(7, workflow.parameters.commit-sha)}} \
--cache=true \
--cache-repo=rg.fr-par.scw.cloud/bizworx/cache \
--snapshot-mode=redo
- --context=/workspace/src
- --dockerfile=/workspace/src/infra/docker/fxhnt.Dockerfile
- --destination=rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest
- --destination=rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:{{=sprig.trunc(7, workflow.parameters.commit-sha)}}
- --cache=true
- --cache-repo=rg.fr-par.scw.cloud/bizworx/cache
- --snapshot-mode=redo
env:
- { name: DOCKER_CONFIG, value: /kaniko/.docker }
resources: { requests: { cpu: "1", memory: 3Gi }, limits: { cpu: "3", memory: 10Gi } }