paketo-buildpacks / github-config

Common repository configuration
Apache License 2.0
8 stars 12 forks source link

Builder: Setting up local registry functionality for smoke tests #963

Closed pacostas closed 4 months ago

pacostas commented 4 months ago

Merge After

Summary

This pull request adds to smoke.sh for the builders, the option to set up a local registry with crane. Specifically, if a file called options.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 smoke.sh has finished, the local registry is being killed.

This is useful for the extension, as it needs a local registry to push the builder image, which will later 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 it might be used in the future from other scripts too.

Use Cases

Tested

Checklist