Add debugging
This commit is contained in:
parent
c3ad7aa711
commit
291b230662
|
@ -55,6 +55,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do;
|
||||||
"kubernetes.io/ssh-auth")
|
"kubernetes.io/ssh-auth")
|
||||||
keyfile=$(mktemp)
|
keyfile=$(mktemp)
|
||||||
jq -r ".data.\"ssh-privatekey\"" <<< $sourceSecret | base64 -d > $keyfile
|
jq -r ".data.\"ssh-privatekey\"" <<< $sourceSecret | base64 -d > $keyfile
|
||||||
|
cat $keyfile
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "UNSUPPORTED buildConfig sourceSecret TYPE"
|
echo "UNSUPPORTED buildConfig sourceSecret TYPE"
|
||||||
|
@ -62,6 +63,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do;
|
||||||
esac
|
esac
|
||||||
echo $GIT_TOKEN
|
echo $GIT_TOKEN
|
||||||
echo "$name = $gituri:$gitref"
|
echo "$name = $gituri:$gitref"
|
||||||
|
GIT_ASKPASS="$(pwd)/git_askpass.sh" GIT_SSH_COMMAND="ssh -i $keyfile -o IdentitiesOnly=yes" GIT_TOKEN="$GIT_TOKEN" git ls-remote -h "$gituri" "refs/heads/$gitref"
|
||||||
ref=$(GIT_ASKPASS=$(pwd)/git_askpass.sh GIT_SSH_COMMAND="ssh -i $keyfile -o IdentitiesOnly=yes" GIT_TOKEN="$GIT_TOKEN" git ls-remote -h "$gituri" "refs/heads/$gitref" | cut -f1)
|
ref=$(GIT_ASKPASS=$(pwd)/git_askpass.sh GIT_SSH_COMMAND="ssh -i $keyfile -o IdentitiesOnly=yes" GIT_TOKEN="$GIT_TOKEN" git ls-remote -h "$gituri" "refs/heads/$gitref" | cut -f1)
|
||||||
if [[ -v keyfile && -f $keyfile ]]; then
|
if [[ -v keyfile && -f $keyfile ]]; then
|
||||||
rm -f $keyfile #cleanup
|
rm -f $keyfile #cleanup
|
||||||
|
|
Loading…
Reference in New Issue