Stream sha256#1137
Open
meghan-bailey wants to merge 21 commits into
Open
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
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.
This pull request refactors and streamlines the image deployment and certification logic, particularly for plugin images. The main changes include moving deployment logic into a reusable function, improving SHA256 validation and deployment flow, and cleaning up unnecessary imports and code. These updates make the deployment process more modular, maintainable, and secure.
Deployment and Certification Logic Refactoring:
trcplgtoolbase.gois now extracted into a newdeployImagefunction inecrcommon.go, making the deployment process reusable and easier to maintain. This function handles directory creation, placeholder replacement, file writing, and optional expansion or archival of deployed artifacts. [1] [2]azrcr.go: the code now checks SHA256 hashes before deployment, and only deploys if certification passes and thecodebundledeployPtrflag is set. The logic for reading and hashing tar/gzip image layers is rewritten for clarity and correctness. [1] [2]Configuration and Parameter Handling:
codebundledeployPtrflag is added topluginToolConfigto control whether code bundles should be deployed, supporting the new deployment logic and providing finer-grained control over deployment operations.Code Cleanup and Import Management:
encoding/hex,time, andmemprotectoptsare removed fromtrcplgtoolbase.go, and necessary imports are added toazrcr.goandecrcommon.goto support the new logic. [1] [2] [3] [4]These changes collectively improve the reliability and maintainability of the image deployment and certification workflow for plugins.