Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
CRW-653 need --tls-verify=false to bypass... (#435)
Browse files Browse the repository at this point in the history
* CRW-653 need --tls-verify=false to bypass SSL/TLD Cert validation errors

Change-Id: Ibcb5d1236e77cbe31e9aca06454e056ff73aa2dd
Signed-off-by: nickboldt <nboldt@redhat.com>

* Update write_image_digests.sh
  • Loading branch information
nickboldt committed Mar 31, 2020
1 parent e8fa212 commit 9ba0141
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/scripts/write_image_digests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ LOG_FILE="/tmp/image_digests.log"

function handle_error() {
the_image="$1"
echo " Could not read image metadata through skopeo inspect; skip $the_image"
# NOTE: need --tls-verify=false to bypass SSL/TLD Cert validation errors - https://github.com/nmasse-itix/OpenShift-Examples/blob/master/Using-Skopeo/README.md#ssltls-issues
echo " Could not read image metadata through skopeo --tls-verify=false inspect; skip $the_image"
echo -n " Reason: "
sed 's|^| |g' $LOG_FILE
}

readarray -d '' metas < <(find "$1" -name 'meta.yaml' -print0)
for image in $(yq -r '.spec | .containers[]?,.initContainers[]? | .image' "${metas[@]}" | sort | uniq); do
digest="$(skopeo inspect "docker://${image}" 2>"$LOG_FILE" | jq -r '.Digest')"
digest="$(skopeo --tls-verify=false inspect "docker://${image}" 2>"$LOG_FILE" | jq -r '.Digest')"
if [[ ${digest} ]]; then
echo " $digest # ${image}"
else
Expand Down

0 comments on commit 9ba0141

Please sign in to comment.