Merge pull request #11357 from k8s-infra-cherrypick-robot/cherry-pick-11019-to-release/2.0

[release/2.0] Update install-imgcrypt to allow change install repo
This commit is contained in:
Akihiro Suda 2025-02-18 19:03:14 +09:00 committed by GitHub
commit 6b5df746e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,9 +23,10 @@ set -eu -o pipefail
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)" script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
: "${IMGCRYPT_VERSION:=$(cat "${script_dir}/imgcrypt-version")}" : "${IMGCRYPT_VERSION:=$(cat "${script_dir}/imgcrypt-version")}"
: "${IMGCRYPT_REPO:=https://github.com/containerd/imgcrypt.git}" # Default repo
TMPROOT=$(mktemp -d) TMPROOT=$(mktemp -d)
git clone https://github.com/containerd/imgcrypt.git "${TMPROOT}"/imgcrypt git clone "${IMGCRYPT_REPO}" "${TMPROOT}"/imgcrypt
pushd "${TMPROOT}"/imgcrypt pushd "${TMPROOT}"/imgcrypt
git checkout "${IMGCRYPT_VERSION}" git checkout "${IMGCRYPT_VERSION}"
make make