Ejemplo n.º 1
0
// DeleteBuild removes any record of the build by removing it and all of the tasks that
// are a part of it from the database.
func DeleteBuild(id string) error {
	err := RemoveAllTasks(bson.M{TaskBuildIdKey: id})
	if err != nil && err != mgo.ErrNotFound {
		return err
	}
	return build.Remove(id)
}
Ejemplo n.º 2
0
// DeleteBuild removes any record of the build by removing it and all of the tasks that
// are a part of it from the database.
func DeleteBuild(id string) error {
	err := task.RemoveAllWithBuild(id)
	if err != nil && err != mgo.ErrNotFound {
		return err
	}
	return build.Remove(id)
}