{{- $Root := . }} {{- $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }} {{- range $path, $content := $ImagesBuildFiles }} {{- $ctx := dict }} {{- $_ := set $ctx "ImageName" ($path | split "/")._1 }} {{- $_ := set $ctx "ModuleName" "cluster-map" }} {{- $_ := set $ctx "ImagePath" (printf "/images/%s" $ctx.ImageName) }} {{- $_ := set $ctx "ModuleDir" "/" }} {{- $_ := set $ctx "ProjectName" (list $ctx.ModuleName $ctx.ImageName | join "/") }} {{- $_ := set $ctx "Commit" $Root.Commit }} --- {{- $_ := set $ctx "Files" $Root.Files }} {{ tpl $content $ctx }} {{- end }}