Skip to content

Commit

Permalink
add debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen Knoops <jeroen.knoops@philips.com>
  • Loading branch information
JeroenKnoops committed Nov 2, 2022
1 parent 2a1e448 commit d5e6c61
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion container_digest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#!/bin/bash

echo "-==============================================-"
echo "test 1234" > output.txt
echo "-==============================================-"
cat output.txt | tee output2.txt
echo "-==============================================-"
echo "output2.txt:"
cat output2.txt

test_id=$(grep "test" output2.txt | grep -o '[0-9]\+')
echo "-==============================================-"

echo "test_id: $test_id"
echo "-==============================================-"
echo "removing outputs"
rm output.txt
rm output2.txt

echo "-==============================================-"
set -e

# shellcheck disable=SC2153
Expand Down Expand Up @@ -89,8 +107,12 @@ then
echo "Sign image"

# shellcheck disable=SC2086
cosign sign ${COSIGN_KEY_ARGUMENT} "$registry_url_prefix"/"$imagename"@"${containerdigest}" | tee output.txt
cosign sign ${COSIGN_KEY_ARGUMENT} "$registry_url_prefix"/"$imagename"@"${containerdigest}" 2>/dev/null | tee output.txt
echo "-=============== show contents of output.txt"
cat output.txt
echo "-=============== end show contents of output.txt"
tlog_id=$(grep "tlog entry created with index" output.txt | grep -o '[0-9]\+')
echo "tlog_id: $tlog_id"
rm output.txt

echo "Verify signing"
Expand Down

0 comments on commit d5e6c61

Please sign in to comment.