loadUnresolvedFile loads a single compose file with interpolation and environment resolution skipped, so callers can inspect raw user-provided values. Used by both checkEnvironmentVariables and composeFileAsByteReader.
(ctx context.Context, project *types.Project, filePath string)
| 617 | // environment resolution skipped, so callers can inspect raw user-provided |
| 618 | // values. Used by both checkEnvironmentVariables and composeFileAsByteReader. |
| 619 | func loadUnresolvedFile(ctx context.Context, project *types.Project, filePath string) (*types.Project, error) { |
| 620 | return loader.LoadWithContext(ctx, types.ConfigDetails{ |
| 621 | WorkingDir: project.WorkingDir, |
| 622 | Environment: project.Environment, |
| 623 | ConfigFiles: []types.ConfigFile{{Filename: filePath}}, |
| 624 | }, func(options *loader.Options) { |
| 625 | options.SkipValidation = true |
| 626 | options.SkipExtends = true |
| 627 | options.SkipConsistencyCheck = true |
| 628 | options.ResolvePaths = true |
| 629 | // SkipInclude mirrors processFile: include directives stay symbolic in |
| 630 | // the published artifact, so included content must not be inspected |
| 631 | // here either (otherwise we'd flag literals that never ship). |
| 632 | options.SkipInclude = true |
| 633 | options.SkipInterpolation = true |
| 634 | options.SkipResolveEnvironment = true |
| 635 | options.Profiles = project.Profiles |
| 636 | }) |
| 637 | } |
| 638 | |
| 639 | func envFileLayers(files map[string]string) []v1.Descriptor { |
| 640 | var layers []v1.Descriptor |
no outgoing calls
no test coverage detected