mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Allow fetching specific devfile stack version (#6429)
* Ask for stack version in the interactive mode; downloading still doesn't work as expected Signed-off-by: Parthvi Vala <pvala@redhat.com> * Download the versioned Devfile for interactive mode * Download the versioned Devfile for flag mode * Download the versioned Devfile for the alizer mode * Add support for 'latest' stack * Update init automation message with devfile-version * Mark the default version in interactive mode * Fix interactive tests Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add integration tests for odo init flag mode * Fix unit and validation tests Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add to the documentation Signed-off-by: Parthvi Vala <pvala@redhat.com> * Add information about the default version Signed-off-by: Parthvi Vala <pvala@redhat.com>
This commit is contained in:
@@ -270,7 +270,8 @@ func (o RegistryClient) retrieveDevfileDataFromRegistry(ctx context.Context, reg
|
||||
|
||||
registries := o.preferenceClient.RegistryList()
|
||||
var reg preference.Registry
|
||||
|
||||
registryOptions := segment.GetRegistryOptions(ctx)
|
||||
registryOptions.NewIndexSchema = true
|
||||
// Get the file and save it to the temporary file
|
||||
// Why do we do that?
|
||||
// 1. We need to get the file from the registry
|
||||
@@ -279,7 +280,7 @@ func (o RegistryClient) retrieveDevfileDataFromRegistry(ctx context.Context, reg
|
||||
// 4. We need to read the file from the temporary file, unmarshal it and then return the devfile data
|
||||
for _, reg = range registries {
|
||||
if reg.Name == registryName {
|
||||
err = o.PullStackFromRegistry(reg.URL, devfileName, tmpFile, segment.GetRegistryOptions(ctx))
|
||||
err = o.PullStackFromRegistry(reg.URL, devfileName, tmpFile, registryOptions)
|
||||
if err != nil {
|
||||
return api.DevfileData{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user