diff --git a/.scripts/get_manifest_digest.sh b/.scripts/get_manifest_digest.sh deleted file mode 100755 index 38712264f..000000000 --- a/.scripts/get_manifest_digest.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# Get a manifest digest. Example inputs: -# - docker.stackable.tech/stackable/hello-world:0.0.1-SNAPSHOT-stackable0.0.0-dev -# - docker.stackable.tech/stackable/hello-world:0.0.1-SNAPSHOT-stackable0.0.0-dev-amd64 -set -euo pipefail - -# Note: `docker manifest push` currently outputs the same hash, but `manifest` -# is experimental and the STDOUT is more likely to change than the structured -# output. -docker buildx imagetools inspect --format '{{println .Manifest.Digest}}' "$1" diff --git a/.scripts/get_repo_digest.sh b/.scripts/get_repo_digest.sh deleted file mode 100755 index 74a26d53a..000000000 --- a/.scripts/get_repo_digest.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -# The script outputs the image manifest uri with the SHA256 digest, for example: -# oci.stackable.tech/sdp/hello-world@sha256:917f800259ef4915f976e93987b752fd64debf347568610d7f685d20220fc88a -set -euo pipefail - -# There is only one input to this script, which contains the entire image -# manifest uri, like: oci.stackable.tech/sdp/hello-world:0.0.1-SNAPSHOT-stackable0.0.0-dev-arm64 -IMAGE_MANIFEST_URI="$1" - -# Here, we cut off the image manifest tag to get the image repository uri, for -# example: oci.stackable.tech/sdp/hello-world -IMAGE_REPOSITORY_URI="$(echo "$IMAGE_MANIFEST_URI" | cut -d : -f 1)" - -IMAGE_REPO_DIGEST=$( - docker inspect "$IMAGE_MANIFEST_URI" --format json | \ - jq -r \ - --arg IMAGE_REPOSITORY_URI "$IMAGE_REPOSITORY_URI" \ - --arg IMAGE_MANIFEST_URI "$IMAGE_MANIFEST_URI" \ - ' - map(select(.RepoTags[] | contains($IMAGE_MANIFEST_URI)))[0] - | .RepoDigests[] - | select(. | startswith($IMAGE_REPOSITORY_URI)) - ' -) - -# Ensure IMAGE_REPO_DIGEST is not empty -if [[ -z "$IMAGE_REPO_DIGEST" ]]; then - >&2 echo "Repo Digest is empty, but is required for signing" - exit 1 -fi - -echo "$IMAGE_REPO_DIGEST"