Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Performance: caching on branches by promoting latest image #57

Merged
merged 4 commits into from
Sep 15, 2020

Conversation

skovhus
Copy link
Contributor

@skovhus skovhus commented Sep 14, 2020

Resolves #55

On CI this speeds up the build from 8 minute to 2 minutes when you create a new branch without any changes.

Changes

  • Promote/reusing latest image matching the dependency hash
  • Found a bug where the git branch conversion to docker tags didn't work (trailing numbers in branch names)
  • Avoid tagging branches with "latest" (instead of two branches A and B both modifying the latest image, we now only have latest image on the main branch)

ks/ci-speed3 was detected as ks-ci-speed

Since Git 2.22, "git branch --show-current" should be the way to go.
This avoids cache breaking as all branches will not all push the "latests" image.
@skovhus skovhus merged commit 514810c into master Sep 15, 2020
@skovhus skovhus deleted the ks/branch-caching branch September 15, 2020 08:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skipping builds based on dependencies doesn't work on first run
2 participants