mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Make sure a Deploy command is present in the Devfile before auto-applying components (#7093)
* Add integration test case highlighting the issue * Make sure a Deploy command is present in the Devfile before auto-applying components * Fix expected output in 'odo deploy' interactive tests
This commit is contained in:
@@ -39,6 +39,11 @@ func (o *DeployClient) Deploy(ctx context.Context) error {
|
||||
path = filepath.Dir(devfilePath)
|
||||
)
|
||||
|
||||
_, err := libdevfile.ValidateAndGetCommand(*devfileObj, "", v1alpha2.DeployCommandGroupKind)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
handler := component.NewRunHandler(
|
||||
ctx,
|
||||
o.kubeClient,
|
||||
@@ -52,7 +57,7 @@ func (o *DeployClient) Deploy(ctx context.Context) error {
|
||||
},
|
||||
)
|
||||
|
||||
err := o.buildPushAutoImageComponents(handler, *devfileObj)
|
||||
err = o.buildPushAutoImageComponents(handler, *devfileObj)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user