Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): turn on S3 caching for all PRs #8898

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions scripts/earthly-ci
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ function wipe_non_cache_docker_state {
EARTHLY_RUN_STATS_JSON="earthly-run-stats.json"
# 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_ARGS=""

Expand All @@ -52,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
Loading