mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-04 07:08:19 +00:00
* chore: Validate checksums of downloaded files in build chain Signed-off-by: jannfis <jann@mistrust.net> * Fix arm install of kustomize Signed-off-by: jannfis <jann@mistrust.net> * Add sudo package to Go builder image Signed-off-by: jannfis <jann@mistrust.net>
26 lines
No EOL
533 B
Bash
Executable file
26 lines
No EOL
533 B
Bash
Executable file
#!/bin/sh
|
|
set -ex
|
|
|
|
if test "${TARGET_FILE}" = ""; then
|
|
echo "Need to define \$TARGET_FILE" >&2
|
|
exit 1
|
|
fi
|
|
|
|
CHKSUM_FILE=$(cd "$(dirname "$0")" && pwd)/checksums/${TARGET_FILE}.sha256
|
|
|
|
cd "${DOWNLOADS}" || (
|
|
echo "Can't change directory to ${DOWNLOAD}" >&2
|
|
exit 1
|
|
)
|
|
|
|
if ! test -f "${TARGET_FILE}"; then
|
|
echo "Archive to be checked (${TARGET_FILE}) does not exist" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if ! grep -q "${TARGET_FILE}" ${CHKSUM_FILE}; then
|
|
echo "No checksum for ${TARGET_FILE} in ${CHKSUM_FILE}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
sha256sum -c ${CHKSUM_FILE} |