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

Attempt to speed up PR image builds by sharing a cache #1844

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

imjasonh
Copy link
Collaborator

docker/setup-buildx-action actually provides first-class support for
the GitHub Actions cache (though experimental). This should make builds
much faster. Previous configuration wasn't properly configuring caching,
as far as I can tell.

This also takes advantage of GitHub Actions matrix support to more
concisely express the build parameters then execute the same steps on
them, which makes it clearer that the builds are all fundamentally doing
the same thing.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

NONE

docker/setup-buildx-action actually provides first-class support for
the GitHub Actions cache (though experimental). This should make builds
much faster. Previous configuration wasn't properly configuring caching,
as far as I can tell.

This also takes advantage of GitHub Actions matrix support to more
concisely express the build parameters then execute the same steps on
them, which makes it clearer that the builds are all fundamentally doing
the same thing.
@imjasonh
Copy link
Collaborator Author

imjasonh commented Dec 17, 2021

This seems to have worked in speeding up the builds, comparing attempt 1 and 2 (both successful).

The fastest image (warmer) went from 21m -> 16m. The slowest image (executor-slim, with the most platforms) went from 59m -> 52m 🐢

It's still not really clear to me why these images are built on PRs if they're not pushed, but if we're going to do it we might as well do it as quickly as we can. If there's interest in making the builds even faster I can investigate it.

@imjasonh
Copy link
Collaborator Author

cc @priyawadhwa

After this I'd love to refactor pr_release.yaml and release.yaml so they share a lot more, maybe even become the same config with conditional steps.

Copy link
Collaborator

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

lgtm!!

@imjasonh imjasonh merged commit 0fd1058 into GoogleContainerTools:master Dec 18, 2021
gcalmettes pushed a commit to gcalmettes/kaniko that referenced this pull request Dec 24, 2021
…erTools#1844)

docker/setup-buildx-action actually provides first-class support for
the GitHub Actions cache (though experimental). This should make builds
much faster. Previous configuration wasn't properly configuring caching,
as far as I can tell.

This also takes advantage of GitHub Actions matrix support to more
concisely express the build parameters then execute the same steps on
them, which makes it clearer that the builds are all fundamentally doing
the same thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants