diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-27 06:37:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 06:37:19 -0400 |
commit | a72b2402c9569028abbff2364f4f40f4728e5688 (patch) | |
tree | ef975a49b5004b68c27889b9e7d5653b6fbd9a3d /pkg/api | |
parent | bdcf453118115b5999183e0f4cf48f5e82cda12f (diff) | |
parent | 66a56ce05a577913a66c3d3f98c47cbe6cb4a3c0 (diff) | |
download | podman-a72b2402c9569028abbff2364f4f40f4728e5688.tar.gz podman-a72b2402c9569028abbff2364f4f40f4728e5688.tar.bz2 podman-a72b2402c9569028abbff2364f4f40f4728e5688.zip |
Merge pull request #14320 from flouthoc/build-honor-squash-and-layers
build: allow using `cache` explicitly with `--squash-all` using `--layers`
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/compat/images_build.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index ba6764e91..f47aa523e 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -80,6 +80,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { CgroupParent string `schema:"cgroupparent"` // nolint Compression uint64 `schema:"compression"` ConfigureNetwork string `schema:"networkmode"` + CPPFlags string `schema:"cppflags"` CpuPeriod uint64 `schema:"cpuperiod"` // nolint CpuQuota int64 `schema:"cpuquota"` // nolint CpuSetCpus string `schema:"cpusetcpus"` // nolint @@ -399,6 +400,15 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { } } + // convert cppflags formats + var cppflags = []string{} + if _, found := r.URL.Query()["cppflags"]; found { + if err := json.Unmarshal([]byte(query.CPPFlags), &cppflags); err != nil { + utils.BadRequest(w, "cppflags", query.CPPFlags, err) + return + } + } + // convert nsoptions formats nsoptions := buildah.NamespaceOptions{} if _, found := r.URL.Query()["nsoptions"]; found { @@ -555,6 +565,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { AddCapabilities: addCaps, AdditionalTags: additionalTags, Annotations: annotations, + CPPFlags: cppflags, Args: buildArgs, AllPlatforms: query.AllPlatforms, CommonBuildOpts: &buildah.CommonBuildOptions{ |