forked from toolshed/abra
fix: teach app version command to read new versions
This commit is contained in:
@ -93,6 +93,19 @@ func GetAllDeployedServices(contextName string) StackStatus {
|
||||
return StackStatus{services, nil}
|
||||
}
|
||||
|
||||
// GetDeployedServicesByName filters services by name
|
||||
func GetDeployedServicesByName(ctx context.Context, cl *dockerclient.Client, stackName, serviceName string) StackStatus {
|
||||
filters := filters.NewArgs()
|
||||
filters.Add("name", fmt.Sprintf("%s_%s", stackName, serviceName))
|
||||
|
||||
services, err := cl.ServiceList(ctx, types.ServiceListOptions{Filters: filters})
|
||||
if err != nil {
|
||||
return StackStatus{[]swarm.Service{}, err}
|
||||
}
|
||||
|
||||
return StackStatus{services, nil}
|
||||
}
|
||||
|
||||
// IsDeployed chekcks whether an appp is deployed or not.
|
||||
func IsDeployed(ctx context.Context, cl *dockerclient.Client, stackName string) (bool, string, error) {
|
||||
version := ""
|
||||
|
Reference in New Issue
Block a user