Ensure image exist for run service

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2020-12-17 11:57:37 +01:00
parent dc211b178a
commit db73c928f3
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
requestedService.Labels = requestedService.Labels.Add(slugLabel, slug) requestedService.Labels = requestedService.Labels.Add(slugLabel, slug)
requestedService.Labels = requestedService.Labels.Add(oneoffLabel, "True") requestedService.Labels = requestedService.Labels.Add(oneoffLabel, "True")
if err := s.ensureImagesExists(ctx, project); err != nil { // all dependencies already checked, but might miss requestedService img
return err
}
if err := s.waitDependencies(ctx, project, requestedService); err != nil { if err := s.waitDependencies(ctx, project, requestedService); err != nil {
return err return err
} }