(ctx context.Context, project *types.Project, options api.BuildOptions)
| 33 | ) |
| 34 | |
| 35 | func (s *composeService) Build(ctx context.Context, project *types.Project, options api.BuildOptions) error { |
| 36 | err := options.Apply(project) |
| 37 | if err != nil { |
| 38 | return err |
| 39 | } |
| 40 | return Run(ctx, func(ctx context.Context) error { |
| 41 | return tracing.SpanWrapFunc("project/build", tracing.ProjectOptions(ctx, project), |
| 42 | func(ctx context.Context) error { |
| 43 | builtImages, err := s.build(ctx, project, options, nil) |
| 44 | if err == nil && len(builtImages) == 0 { |
| 45 | logrus.Warn("No services to build") |
| 46 | } |
| 47 | return err |
| 48 | })(ctx) |
| 49 | }, "build", s.events) |
| 50 | } |
| 51 | |
| 52 | func (s *composeService) build(ctx context.Context, project *types.Project, options api.BuildOptions, localImages map[string]api.ImageSummary) (map[string]string, error) { |
| 53 | imageIDs := map[string]string{} |
nothing calls this directly
no test coverage detected