mirror of
https://github.com/google/nomulus
synced 2026-07-23 08:22:27 +00:00
Fix GCS gradle hash verification in Cloud Build (#3174)
This commit is contained in:
@@ -269,7 +269,7 @@ steps:
|
||||
if gcloud storage objects describe gs://${gcs_loc}/${gradle_bin}
|
||||
then
|
||||
local_md5=$(md5sum ${gradle_bin} | awk '{print $1}')
|
||||
remote_md5=$(gcloud storage hash -h gs://${gcs_loc}/${gradle_bin} | grep md5 | awk '{print $3}')
|
||||
remote_md5=$(gcloud storage hash --hex gs://${gcs_loc}/${gradle_bin} | grep md5 | awk '{print $2}')
|
||||
if [[ ${local_md5} != ${remote_md5} ]]
|
||||
then
|
||||
echo "ERROR: MD5 hash mismatch for ${gradle_bin}! Local (official): ${local_md5}, Remote (GCS cache): ${remote_md5}. Aborting build." >&2
|
||||
|
||||
Reference in New Issue
Block a user