ci: escape awk branch field in groovy pipeline strings
This commit is contained in:
parent
15dfbb728c
commit
fbdda16f55
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -74,7 +74,7 @@ spec:
|
|||||||
script {
|
script {
|
||||||
env.FLUX_BRANCH = sh(
|
env.FLUX_BRANCH = sh(
|
||||||
returnStdout: true,
|
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()
|
).trim()
|
||||||
if (!env.FLUX_BRANCH) {
|
if (!env.FLUX_BRANCH) {
|
||||||
error('Flux branch not found in gotk-sync.yaml')
|
error('Flux branch not found in gotk-sync.yaml')
|
||||||
|
|||||||
@ -73,7 +73,7 @@ spec:
|
|||||||
script {
|
script {
|
||||||
env.FLUX_BRANCH = sh(
|
env.FLUX_BRANCH = sh(
|
||||||
returnStdout: true,
|
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()
|
).trim()
|
||||||
if (!env.FLUX_BRANCH) {
|
if (!env.FLUX_BRANCH) {
|
||||||
error('Flux branch not found in gotk-sync.yaml')
|
error('Flux branch not found in gotk-sync.yaml')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user