This pull request adds to test.sh the option to set up a local registry with crane. Specifically if a file called integration.json exists and it has an attribute called "setup_local_registy": true in it, then, the test.sh script will spawn a local registry on a random available port and export the registry url to an env variable called REGISTRY_URL to make it available for any program that might need to use it. After test.sh has finished, the local registry is being killed.
This is useful for two reasons:
For the extension, it needs a local registry to push the builder image which later on will be used to build the app.
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)
Update tools actions for stacks, have been tested here: https://github.com/pacostas/github-config/actions/runs/9661661536 (On the test, it does not create a PR as my repo does not have proper configuration, although the create-pr functionality has not been changed therefore, it is not necessary to test it.)
Use Cases
Extension needing a local registry to push the builder while running acceptance tests.
Checklist
[x] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[x] I have added an integration test, if necessary.
[x] I have reviewed the styleguide for guidance on my code quality.
[x] I'm happy with the commit history on this PR (I have rebased/squashed as needed).
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