build: fix field selector in startbuild
@@ -838,7 +838,7 @@ func WaitForBuildComplete(c buildclient.BuildResourceInterface, name string) err
b.Status.Phase == buildapi.BuildPhaseError
}
for {
- list, err := c.List(metav1.ListOptions{FieldSelector: fields.Set{"name": name}.AsSelector().String()})
+ list, err := c.List(metav1.ListOptions{FieldSelector: fields.Set{"metadata.name": name}.AsSelector().String()})
if err != nil {
return err
}
@@ -852,7 +852,7 @@ func WaitForBuildComplete(c buildclient.BuildResourceInterface, name string) err
}
rv := list.ResourceVersion
- w, err := c.Watch(metav1.ListOptions{FieldSelector: fields.Set{"name": name}.AsSelector().String(), ResourceVersion: rv})
+ w, err := c.Watch(metav1.ListOptions{FieldSelector: fields.Set{"metadata.name": name}.AsSelector().String(), ResourceVersion: rv})
if err != nil {
return err
}
