INNER CODE UNIT · Go
New
updatecli/updatecli · pkg/core/config/main.go:322
func New(option Option, manifestDefaults ManifestOptions, pipelineIDFilters []string, pipelineLabels map[string]string) (configs []Config, err error) {
_, basename := filepath.Split(option.ManifestFile)
// We need to be sure to generate a file checksum before we inject
// templates values as in some situation those values changes for each run
fileChecksum, err := FileChecksum(option.ManifestFile)
if err != nil {
return nil, err
}
readFile := func(path string) ([]byte, error) {
// Load updatecli manifest no matter the file extension
f, err := os.Open(path)
if err != nil {
return nil, err
}
return io.ReadAll(f)