Skip to content

Commit

Permalink
s3 upload on every PR - otherwise cache will cause misses
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed Sep 30, 2024
1 parent 3e65d8d commit aaa15ed
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions scripts/earthly-ci
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ function wipe_non_cache_docker_state {
sudo service docker restart
}

# Run earthly with our necesary secrets initialized
# AWS credentials can be blank, however we will not use the S3 cache at all if so.
if [ "$(git rev-parse --abbrev-ref HEAD)" = master ] || [ "$(git rev-parse --abbrev-ref HEAD)" = *build-cache* ] ; then
# We upload to S3 on master. Meant for CI on master.
S3_BUILD_CACHE_UPLOAD=true
else
# Don't upload to S3 on pull request branches (for now, at least)
S3_BUILD_CACHE_UPLOAD=false
fi

EARTHLY_RUN_STATS_JSON="earthly-run-stats.json"
EARTHLY_ARGS=""

Expand All @@ -55,7 +45,7 @@ function run_earthly() {
--secret AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
--secret AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
--secret S3_BUILD_CACHE_MINIO_URL="" \
--secret S3_BUILD_CACHE_UPLOAD="$S3_BUILD_CACHE_UPLOAD" \
--secret S3_BUILD_CACHE_UPLOAD="true" \
--secret S3_BUILD_CACHE_DOWNLOAD="true" \
--secret AZTEC_BOT_COMMENTER_GITHUB_TOKEN=${AZTEC_BOT_GITHUB_TOKEN:-} \
$EARTHLY_ARGS \
Expand Down

0 comments on commit aaa15ed

Please sign in to comment.