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"
31
31
32
32
# Download cache from S3
33
33
echo " 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
35
35
CACHED_FILES=$( find " $CACHE_DIR " -type f 2> /dev/null | wc -l)
36
36
echo " Cache restored successfully ($CACHED_FILES files)"
37
-
37
+
38
38
if [ " $CACHED_FILES " -gt 0 ]; then
39
39
echo " Sample cached artifacts:"
40
40
find " $CACHE_DIR " -type f 2> /dev/null | head -3
41
41
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
+
42
52
else
43
53
echo " No existing cache found or failed to restore (this is normal for first run)"
44
54
fi
Original file line number Diff line number Diff line change 67
67
echo " Saving cache to S3 bucket: $BUCKET (prefix: $PREFIX , region: $REGION )"
68
68
echo " Uploading $ARTIFACT_COUNT files"
69
69
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
71
71
echo " Cache saved successfully"
72
72
else
73
73
echo " Warning: Failed to save cache (this won't fail the build)"
You can’t perform that action at this time.
0 commit comments