Skip to content

Commit

Permalink
pkg/imagebuilder: expose BuiltInBuildArgs for downstream
Browse files Browse the repository at this point in the history
Expose map BuiltInBuildArgs so downstream users like buildah can use it.

Signed-off-by: Aditya R <[email protected]>
  • Loading branch information
flouthoc committed Jun 16, 2023
1 parent bf1ff5c commit 0f679ca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dispatchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ var builtinBuildArgs = map[string]string{
"BUILDVARIANT": localspec.Variant,
}

// Exposes map of global built-in args with their respective populated values.
func GetBuiltinBuildArgs() map[string]string {
res := make(map[string]string)
for k, v := range builtinBuildArgs {
res[k] = v
}
return res
}

func init() {
if localspec.Variant != "" {
builtinBuildArgs["TARGETPLATFORM"] = builtinBuildArgs["TARGETPLATFORM"] + "/" + localspec.Variant
Expand Down

0 comments on commit 0f679ca

Please sign in to comment.