ci: escape awk branch field in groovy pipeline strings

This commit is contained in:
Brad Stein 2026-04-10 17:17:51 -03:00
parent 15dfbb728c
commit fbdda16f55
2 changed files with 2 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -74,7 +74,7 @@ spec:
script {
env.FLUX_BRANCH = sh(
returnStdout: true,
script: "awk '/branch:/{print $2; exit}' clusters/atlas/flux-system/gotk-sync.yaml"
script: "awk '/branch:/{print \\$2; exit}' clusters/atlas/flux-system/gotk-sync.yaml"
).trim()
if (!env.FLUX_BRANCH) {
error('Flux branch not found in gotk-sync.yaml')

View File

@ -73,7 +73,7 @@ spec:
script {
env.FLUX_BRANCH = sh(
returnStdout: true,
script: "awk '/branch:/{print $2; exit}' clusters/atlas/flux-system/gotk-sync.yaml"
script: "awk '/branch:/{print \\$2; exit}' clusters/atlas/flux-system/gotk-sync.yaml"
).trim()
if (!env.FLUX_BRANCH) {
error('Flux branch not found in gotk-sync.yaml')