Setting up local registry functionality #955
Merged
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.
Summary
This pull request adds to
test.sh
the option to set up a local registry with crane. Specifically if a file calledintegration.json
exists and it has an attribute called"setup_local_registy": true
in it, then, thetest.sh
script will spawn a local registry on a random available port and export the registry url to an env variable calledREGISTRY_URL
to make it available for any program that might need to use it. Aftertest.sh
has finished, the local registry is being killed.This is useful for two reasons:
The current implementation of creating a local registry has been copied over from the jammy-tiny-stack repo, with the only difference being that the create registry functionality has been moved to a commonplace, the to tools.sh file, as in the near future, it will be used by two scripts, the test.sh (which is currently used by the extension) and the receipts.sh (when the mutli-arch has been implemented for the stacks)
Testing
Use Cases
Checklist