Correct error with incompatible option used.

This commit is contained in:
William Young 2022-09-02 19:07:23 +02:00
parent 8a487bc2a4
commit 508dddb089
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do;
sourceSecretType=$(jq -r ".type" <<< $sourceSecret)
case $sourceSecretType in
"kubernetes.io/basic-auth")
GIT_TOKEN=$(jq -r '.data.password' <<< $sourceSecret | base64 -D)
GIT_TOKEN=$(jq -r '.data.password' <<< $sourceSecret | base64 -d)
gitUsername=$(jq -r '.data.username' <<< $sourceSecret)
if [[ "$gitUsername" != "" ]]; then
IFS=":" read -r gitProtocol gitUriFragment <<< $gituri
@ -54,7 +54,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do;
;;
"kubernetes.io/ssh-auth")
keyfile=$(mktemp)
jq -r ".data.\"ssh-privatekey\"" <<< $sourceSecret | base64 -D > $keyfile
jq -r ".data.\"ssh-privatekey\"" <<< $sourceSecret | base64 -d > $keyfile
;;
*)
echo "UNSUPPORTED buildConfig sourceSecret TYPE"