@@ -20,17 +20,18 @@ import (
2020 "reflect"
2121
2222 devfilev1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
23+ "github.com/devfile/library/v2/pkg/devfile/parser/data"
2324 "github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
2425)
2526
2627// GetDeployComponents gets the default deploy command associated components
27- func GetDeployComponents (devfileObj DevfileObj ) (map [string ]string , error ) {
28+ func GetDeployComponents (devfileData data. DevfileData ) (map [string ]string , error ) {
2829 deployCommandFilter := common.DevfileOptions {
2930 CommandOptions : common.CommandOptions {
3031 CommandGroupKind : devfilev1 .DeployCommandGroupKind ,
3132 },
3233 }
33- deployCommands , err := devfileObj . Data .GetCommands (deployCommandFilter )
34+ deployCommands , err := devfileData .GetCommands (deployCommandFilter )
3435 if err != nil {
3536 return nil , err
3637 }
@@ -57,7 +58,7 @@ func GetDeployComponents(devfileObj DevfileObj) (map[string]string, error) {
5758 CommandType : devfilev1 .ApplyCommandType ,
5859 },
5960 }
60- applyCommands , err := devfileObj . Data .GetCommands (applyCommandFilter )
61+ applyCommands , err := devfileData .GetCommands (applyCommandFilter )
6162 if err != nil {
6263 return nil , err
6364 }
@@ -77,14 +78,14 @@ func GetDeployComponents(devfileObj DevfileObj) (map[string]string, error) {
7778}
7879
7980// GetImageBuildComponent gets the image build component from the deploy associated components
80- func GetImageBuildComponent (devfileObj DevfileObj , deployAssociatedComponents map [string ]string ) (devfilev1.Component , error ) {
81+ func GetImageBuildComponent (devfileData data. DevfileData , deployAssociatedComponents map [string ]string ) (devfilev1.Component , error ) {
8182 imageComponentFilter := common.DevfileOptions {
8283 ComponentOptions : common.ComponentOptions {
8384 ComponentType : devfilev1 .ImageComponentType ,
8485 },
8586 }
8687
87- imageComponents , err := devfileObj . Data .GetComponents (imageComponentFilter )
88+ imageComponents , err := devfileData .GetComponents (imageComponentFilter )
8889 if err != nil {
8990 return devfilev1.Component {}, err
9091 }
0 commit comments