File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,24 @@ echo "Ensuring cache directory exists: $CACHE_DIR"
3131
3232# Download cache from S3
3333echo " Restoring cache from S3 bucket: $BUCKET (prefix: $PREFIX , region: $REGION )"
34- if aws s3 sync " s3://$BUCKET /$PREFIX " " $CACHE_DIR " --region " $REGION " ; then
34+ if aws s3 sync " s3://$BUCKET /$PREFIX " " $CACHE_DIR " --region " $REGION " --only-show-errors ; then
3535 CACHED_FILES=$( find " $CACHE_DIR " -type f 2> /dev/null | wc -l)
3636 echo " Cache restored successfully ($CACHED_FILES files)"
37-
37+
3838 if [ " $CACHED_FILES " -gt 0 ]; then
3939 echo " Sample cached artifacts:"
4040 find " $CACHE_DIR " -type f 2> /dev/null | head -3
4141 fi
42+
43+ # This step is necessary for filesystems where noexec is enabled
44+ echo " Setting permissions for cached artifacts (provider files)"
45+ if find " $CACHE_DIR " -type f -name ' terraform-provider-*' \
46+ -exec chmod +x {} \; ; then
47+ echo " ✅ All provider binaries marked executable."
48+ else
49+ echo " ❌ Failed to set exec bit on one or more providers." >&2
50+ fi
51+
4252else
4353 echo " No existing cache found or failed to restore (this is normal for first run)"
4454fi
Original file line number Diff line number Diff line change 6767echo " Saving cache to S3 bucket: $BUCKET (prefix: $PREFIX , region: $REGION )"
6868echo " Uploading $ARTIFACT_COUNT files"
6969
70- if aws s3 sync " $CACHE_DIR " " s3://$BUCKET /$PREFIX " --region " $REGION " ; then
70+ if aws s3 sync " $CACHE_DIR " " s3://$BUCKET /$PREFIX " --region " $REGION " --only-show-errors ; then
7171 echo " Cache saved successfully"
7272else
7373 echo " Warning: Failed to save cache (this won't fail the build)"
You can’t perform that action at this time.
0 commit comments