mirror of
https://github.com/containers/podman.git
synced 2025-11-29 09:37:38 +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"
|
KeyArch = "Arch"
|
||||||
KeyAuthFile = "AuthFile"
|
KeyAuthFile = "AuthFile"
|
||||||
KeyAutoUpdate = "AutoUpdate"
|
KeyAutoUpdate = "AutoUpdate"
|
||||||
|
KeyBuildArg = "BuildArg"
|
||||||
KeyCertDir = "CertDir"
|
KeyCertDir = "CertDir"
|
||||||
KeyCgroupsMode = "CgroupsMode"
|
KeyCgroupsMode = "CgroupsMode"
|
||||||
KeyConfigMap = "ConfigMap"
|
KeyConfigMap = "ConfigMap"
|
||||||
@@ -433,6 +434,7 @@ var (
|
|||||||
KeyAnnotation: true,
|
KeyAnnotation: true,
|
||||||
KeyArch: true,
|
KeyArch: true,
|
||||||
KeyAuthFile: true,
|
KeyAuthFile: true,
|
||||||
|
KeyBuildArg: true,
|
||||||
KeyContainersConfModule: true,
|
KeyContainersConfModule: true,
|
||||||
KeyDNS: true,
|
KeyDNS: true,
|
||||||
KeyDNSOption: true,
|
KeyDNSOption: true,
|
||||||
@@ -1391,6 +1393,7 @@ func ConvertBuild(build *parser.UnitFile, unitsInfoMap map[string]*UnitInfo, isU
|
|||||||
lookupAndAddAllStrings(build, BuildGroup, allStringKeys, podman)
|
lookupAndAddAllStrings(build, BuildGroup, allStringKeys, podman)
|
||||||
|
|
||||||
keyValKeys := map[string]string{
|
keyValKeys := map[string]string{
|
||||||
|
KeyBuildArg: "--build-arg",
|
||||||
KeyEnvironment: "--env",
|
KeyEnvironment: "--env",
|
||||||
KeyLabel: "--label",
|
KeyLabel: "--label",
|
||||||
KeyAnnotation: "--annotation",
|
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 - Multiple Tags", "multiple-tags.build"),
|
||||||
Entry("Build - Network Key host", "network.build"),
|
Entry("Build - Network Key host", "network.build"),
|
||||||
Entry("Build - PodmanArgs", "podmanargs.build"),
|
Entry("Build - PodmanArgs", "podmanargs.build"),
|
||||||
|
Entry("Build - BuildArg Key", "buildarg.build"),
|
||||||
Entry("Build - Pull Key", "pull.build"),
|
Entry("Build - Pull Key", "pull.build"),
|
||||||
Entry("Build - Secrets", "secrets.build"),
|
Entry("Build - Secrets", "secrets.build"),
|
||||||
Entry("Build - SetWorkingDirectory is absolute path", "setworkingdirectory-is-abs.build"),
|
Entry("Build - SetWorkingDirectory is absolute path", "setworkingdirectory-is-abs.build"),
|
||||||
|
|||||||
Reference in New Issue
Block a user