Description
Which area this feature is related to?
/area registry
Which functionality do you think we should add?
Why is this needed? Is your feature request related to a problem?
for #770
for #329
To allow for starter projects to be stored locally to an offline devfile registry and downloadable from the download-starter-project
endpoint.
Detailed description:
Currently, the download-starter-project
endpoint will download the starter project for a given devfile from the source specified by the contents of that devfile. In order for this endpoint to work in an offline environment, the user would need to fetch the resources (e.g. the starter projects) manually and package them into the image build for the complete offline registry. Therefore, the process must be able to fetch starter projects from a local path in the registry where devfiles are stored. In this issue, we would like to add the ability to allow the download-starter-project
endpoint to determine if the download is to be made from a local resource or a remote one.
Changes in this issue will effect the work being done in Issue #770.
Describe the solution you'd like
When we run GET /devfiles/<stack>/starterProjects/<starterProject>
in an offline environment, we want to fetch a pre-packaged starter project rather than fetching it from a remote source as we do by default.
Describe alternatives you've considered
- Leaving it as is would disable an offline deployment from being to provide a devfile with an accessible URL to download starter projects using tools or direct requests in such environments.
- Had considered making a location in the registry which if exists would download from that location instead, this might cause issues or complexities when updates are applied to the starter projects in the remote sources. Instead, it might be best to have the user specify a relative path under the starter project URL within the devfile to imply a local download from registry itself.
Additional context
Target Date: 06-17-2022