escape periods in secret ids
This commit is contained in:
parent
d42a310d51
commit
8dbc5150f7
@ -64,11 +64,12 @@ def readSecret (Map config) {
|
|||||||
serverUrl: config.kubeURL,
|
serverUrl: config.kubeURL,
|
||||||
namespace: config.namespace
|
namespace: config.namespace
|
||||||
]) {
|
]) {
|
||||||
|
def safeSecretID = config.secretID.replaceAll(/\./, "\.")
|
||||||
def output = sh(
|
def output = sh(
|
||||||
returnStdout: true,
|
returnStdout: true,
|
||||||
script: """#Read Secret
|
script: """#Read Secret
|
||||||
set +x
|
set +x
|
||||||
kubectl get secret "${config.secret}" -o jsonpath={".data.${config.secretID}"} | base64 -d
|
kubectl get secret "${config.secret}" -o jsonpath={".data.${safeSecretID}"} | base64 -d
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
return output
|
return output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user