generated from buildkite-plugins/template-buildkite-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Add plugin base #1
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, this plugin is a rough draft of the end product I am aiming for, with additional functions to be added. For the time being, it adds support for acr/dockerhub/ecr/gcr but has not been tested. This will need to be tested on each provider. On next commits I will add Buildkite as a provider, as well as potentially package cloud, as it's more or less a copy and paste job with the way I've designed this to be reusable for the most-part and providing our solutions here is logical for an in-house plugin. I will move on to testing functionality to ensure the base foundations are working as expected and make changes from there to get it more in line with my vision. [WIP]
Fix plugin prefix Fix PLUGIN_PREFIX maybe wat
Fixes ``` name invalid: Missing image name. Pushes should be of the form docker push HOST-NAME/PROJECT-ID/REPOSITORY/IMAGE [ERROR]: Failed to push cache image [ERROR]: Failed to save cache to GCR ``` Also, rename gcr to gar as GCR is gone: https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr
SUP-4155 Create basic plugin structure
This community plugin will be the starting point for this new plugin's functionality, but should begin with our template. |
…dkite-plugins/docker-cache-buildkite-plugin into SUP-4155/Adding-base-plugin
refactor: remove multi-registry support in favor of single-registry calls I had initially intended for the plugin to allow multiple calls to different registries, but decided it was too convoluted and would be best for multiple calls to the plugin within a pipeline for this functionality
- Remove redundant command and post-command hooks - Consolidate caching logic into pre-command hook with Docker build support - Add support for multiple caching strategies (artifact, build-time, hybrid) - Implement complete provider architecture for ECR and GAR registries - Add configuration validation and dependency checking - Expand plugin.yml with full feature set including build args, secrets, and strategies - Remove unused PLUGIN_PREFIX variable and standardize environment variable usage - Add automatic cache key generation from dependency files - Implemented cache hit/miss logic with fallback strategies
- Will look for :latest tag when it cannot find cache key (in the case that it was auto generated) - Fixed gar.io, I think this was assumed as it's a GoDaddy parked domain and Google look to have moved to pkg.dev
- Added some comments here as had to create functions to work around some stub issues.
tomowatt
approved these changes
Jul 28, 2025
tomowatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version v1.0.0 introduces:
• Multi-provider Docker image caching supporting both Amazon ECR and Google Artifact Registry
• Different cache strategies including artifact caching for complete image reuse, build caching for layer optimization, and hybrid mode that combines both approaches
• Docker build features including BuildKit secrets support, multi-stage build targeting, custom build arguments, and flexible cache source configuration.