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

🏗 Cache .git directory in CircleCI builds #35322

Merged
merged 6 commits into from Jul 27, 2021

Conversation

danielrozenberg
Copy link
Member

@danielrozenberg danielrozenberg commented Jul 20, 2021

As described in https://circleci.com/docs/2.0/caching/?section=pipelines#source-caching

Credits used and workflow duration are barely affected, but the upsides are:

  • quicker restarts for flaky jobs (~10-15 seconds shorter due to having the git repository pre-cached)
  • no longer need to curl the maybe_gracefully_halt.sh file
  • being better citizens of the net by reducing the number of times we fetch the entire repo from GitHub 😃

Duration _ Credits Used

Raw data: https://docs.google.com/spreadsheets/d/1R_rihHtAbf56eAj1dUvABjakyrDFy29Y6Vce2_dWG-A/edit

@danielrozenberg danielrozenberg force-pushed the circleci-cache-git branch 15 times, most recently from e3a828f to e9a32b4 Compare July 26, 2021 16:04
@danielrozenberg danielrozenberg marked this pull request as ready for review July 26, 2021 17:54
@amp-owners-bot
Copy link

Hey @rsimha! These files were changed:

.circleci/config.yml

Copy link
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a couple nits.

.circleci/config.yml Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
@danielrozenberg danielrozenberg enabled auto-merge (squash) July 27, 2021 14:56
@danielrozenberg danielrozenberg merged commit 04b03b7 into ampproject:main Jul 27, 2021
@danielrozenberg danielrozenberg deleted the circleci-cache-git branch July 27, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants