Skip to content

Commit 7e024be

Browse files
committed
Use sha256 instead of sha1
1 parent d936611 commit 7e024be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.buildkite/steps/packer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ fi
1717
mkdir -p "build/"
1818

1919
# Build a hash of packer files and the agent versions
20-
packer_files_sha=$(find Makefile "packer/${os}" plugins/ -type f -print0 | xargs -0 sha1sum | awk '{print $1}' | sort | sha1sum | awk '{print $1}')
21-
internal_files_sha=$(find go.mod go.sum internal/ -type f -print0 | xargs -0 sha1sum | awk '{print $1}' | sort | sha1sum | awk '{print $1}')
20+
packer_files_sha=$(find Makefile "packer/${os}" plugins/ -type f -print0 | xargs -0 sha256sum | awk '{print $1}' | sort | sha256sum | awk '{print $1}')
21+
internal_files_sha=$(find go.mod go.sum internal/ -type f -print0 | xargs -0 sha256sum | awk '{print $1}' | sort | sha256sum | awk '{print $1}')
2222
stable_agent_sha=$(curl -Lfs "https://download.buildkite.com/agent/stable/latest/${agent_binary}.sha256")
2323
unstable_agent_sha=$(curl -Lfs "https://download.buildkite.com/agent/unstable/latest/${agent_binary}.sha256")
24-
packer_hash=$(echo "$packer_files_sha" "$internal_files_sha" "$arch" "$stable_agent_sha" "$unstable_agent_sha" | sha1sum | awk '{print $1}')
24+
packer_hash=$(echo "$packer_files_sha" "$internal_files_sha" "$arch" "$stable_agent_sha" "$unstable_agent_sha" | sha256sum | awk '{print $1}')
2525

2626
echo "Packer image hash for ${os}/${arch} is ${packer_hash}"
2727
packer_file="packer-${packer_hash}-${os}-${arch}.output"

0 commit comments

Comments
 (0)