From a6eb8ef625b8c5547483c4295182b69e06af9d7a Mon Sep 17 00:00:00 2001 From: Mukul Sharma Date: Wed, 2 Sep 2026 18:12:37 +0530 Subject: [PATCH] Install yq on demand in updateHelmTag (missing from docker:27-cli) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build #11 failed: "yq: not found". docker:27-cli's Alpine base doesn't ship yq by default, same gap as the bash/python3 on-demand installs already in runHooks.groovy. Alpine renamed the mikefarah/yq package from `yq` to `yq-go` at v3.20 (and an unrelated Python-based tool is also sometimes packaged as plain `yq` on other distros, with incompatible syntax) — tries yq-go first, falls back to yq, rather than assume which Alpine version docker:27-cli currently ships. --- src/com/homelab/stages/updateHelmTag.groovy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/homelab/stages/updateHelmTag.groovy b/src/com/homelab/stages/updateHelmTag.groovy index 53a8f63..65e16fe 100644 --- a/src/com/homelab/stages/updateHelmTag.groovy +++ b/src/com/homelab/stages/updateHelmTag.groovy @@ -43,6 +43,14 @@ def run(Map config) { def authedUrl = "${urlParts[0]}://\${GIT_USER}:\${GIT_PASS}@${urlParts[1]}" sh """ git clone ${authedUrl} . + # docker:27-cli's Alpine base doesn't ship yq by + # default. Package name is 'yq-go' on Alpine >= 3.20, + # plain 'yq' on older Alpine (both are mikefarah/yq, + # the Go tool this -i/path-expression syntax assumes + # — a same-named 'yq' package on some distros is a + # completely different, Python-based tool). Try both + # rather than guess which Alpine base is current. + apk add --no-cache yq-go 2>/dev/null || apk add --no-cache yq yq -i '${config.image_tag_yq_path} = "${env.TAG}"' ${valuesFile} git config user.email 'jenkins-ci@homelab.local' git config user.name 'jenkins-ci'