From 5c8a61c846e834795e7c03d9cb08fa577252fbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Thu, 12 Oct 2023 08:39:29 +0200 Subject: [PATCH] Download uploaders for aws and codecov for the correct platform The machine arm executor was able to run the x86_64 code, while the docker one is not. --- tools/circle-upload-codecov.sh | 10 +++++++--- tools/circleci-upload-to-s3.sh | 4 +--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/circle-upload-codecov.sh b/tools/circle-upload-codecov.sh index 90cd2fe3876..49ef48e583c 100755 --- a/tools/circle-upload-codecov.sh +++ b/tools/circle-upload-codecov.sh @@ -2,11 +2,15 @@ set -eo pipefail +PLATFORM=`uname -m` +[ $PLATFORM == "x86_64" ] && PLATFORM=linux +BASE_URL="https://uploader.codecov.io/latest/$PLATFORM" + # Source: https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import -curl -Os https://uploader.codecov.io/latest/linux/codecov -curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM -curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig +curl -Os "$BASE_URL/codecov" +curl -Os "$BASE_URL/codecov.SHA256SUM" +curl -Os "$BASE_URL/codecov.SHA256SUM.sig" gpgv codecov.SHA256SUM.sig codecov.SHA256SUM shasum -a 256 -c codecov.SHA256SUM diff --git a/tools/circleci-upload-to-s3.sh b/tools/circleci-upload-to-s3.sh index 54db7e39890..40f60e7d580 100755 --- a/tools/circleci-upload-to-s3.sh +++ b/tools/circleci-upload-to-s3.sh @@ -14,8 +14,6 @@ fi echo "Uploading test results to s3" echo $(s3_url ${CT_REPORTS}) - - FILE_COUNT=$(find "${CT_REPORTS}" -type f | wc -l) echo "Uploading $FILE_COUNT files" ls $CT_REPORTS @@ -23,7 +21,7 @@ ls $CT_REPORTS if which aws ; then echo "aws tool ready" else - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + curl "https://awscli.amazonaws.com/awscli-exe-linux-`uname -m`.zip" -o "awscliv2.zip" unzip -q awscliv2.zip sudo ./aws/install fi