mirror of
https://github.com/containers/podman.git
synced 2025-11-28 17:18:58 +08:00
Add BuildArg key to quadlets
Signed-off-by: givensuman <givensuman@duck.com>
This commit is contained in:
@@ -63,6 +63,7 @@ const (
|
||||
KeyArch = "Arch"
|
||||
KeyAuthFile = "AuthFile"
|
||||
KeyAutoUpdate = "AutoUpdate"
|
||||
KeyBuildArg = "BuildArg"
|
||||
KeyCertDir = "CertDir"
|
||||
KeyCgroupsMode = "CgroupsMode"
|
||||
KeyConfigMap = "ConfigMap"
|
||||
@@ -433,6 +434,7 @@ var (
|
||||
KeyAnnotation: true,
|
||||
KeyArch: true,
|
||||
KeyAuthFile: true,
|
||||
KeyBuildArg: true,
|
||||
KeyContainersConfModule: true,
|
||||
KeyDNS: true,
|
||||
KeyDNSOption: true,
|
||||
@@ -1391,6 +1393,7 @@ func ConvertBuild(build *parser.UnitFile, unitsInfoMap map[string]*UnitInfo, isU
|
||||
lookupAndAddAllStrings(build, BuildGroup, allStringKeys, podman)
|
||||
|
||||
keyValKeys := map[string]string{
|
||||
KeyBuildArg: "--build-arg",
|
||||
KeyEnvironment: "--env",
|
||||
KeyLabel: "--label",
|
||||
KeyAnnotation: "--annotation",
|
||||
|
||||
8
test/e2e/quadlet/buildarg.build
Normal file
8
test/e2e/quadlet/buildarg.build
Normal file
@@ -0,0 +1,8 @@
|
||||
## assert-podman-args "--build-arg" "FOO=BAR"
|
||||
## assert-podman-args "--build-arg" "BIZ=BAZ"
|
||||
|
||||
[Build]
|
||||
ImageTag=image:latest
|
||||
SetWorkingDirectory=unit
|
||||
BuildArg=FOO=BAR
|
||||
BuildArg=BIZ=BAZ
|
||||
@@ -1059,6 +1059,7 @@ BOGUS=foo
|
||||
Entry("Build - Multiple Tags", "multiple-tags.build"),
|
||||
Entry("Build - Network Key host", "network.build"),
|
||||
Entry("Build - PodmanArgs", "podmanargs.build"),
|
||||
Entry("Build - BuildArg Key", "buildarg.build"),
|
||||
Entry("Build - Pull Key", "pull.build"),
|
||||
Entry("Build - Secrets", "secrets.build"),
|
||||
Entry("Build - SetWorkingDirectory is absolute path", "setworkingdirectory-is-abs.build"),
|
||||
|
||||
Reference in New Issue
Block a user