mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
vendor: bump to buildah ca578b290144 and use new cache API
Bump to buildah ca578b290144 and use new `cacheTo` and `cacheFrom` API. [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
11
vendor/github.com/containers/buildah/pkg/cli/build.go
generated
vendored
11
vendor/github.com/containers/buildah/pkg/cli/build.go
generated
vendored
@@ -8,7 +8,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -301,18 +300,18 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
iopts.Quiet = true
|
||||
}
|
||||
}
|
||||
var cacheTo reference.Named
|
||||
var cacheFrom reference.Named
|
||||
var cacheTo []reference.Named
|
||||
var cacheFrom []reference.Named
|
||||
cacheTo = nil
|
||||
cacheFrom = nil
|
||||
if c.Flag("cache-to").Changed {
|
||||
cacheTo, err = parse.RepoNameToNamedReference(iopts.CacheTo)
|
||||
cacheTo, err = parse.RepoNamesToNamedReferences(iopts.CacheTo)
|
||||
if err != nil {
|
||||
return options, nil, nil, fmt.Errorf("unable to parse value provided `%s` to --cache-to: %w", iopts.CacheTo, err)
|
||||
}
|
||||
}
|
||||
if c.Flag("cache-from").Changed {
|
||||
cacheFrom, err = parse.RepoNameToNamedReference(iopts.CacheFrom)
|
||||
cacheFrom, err = parse.RepoNamesToNamedReferences(iopts.CacheFrom)
|
||||
if err != nil {
|
||||
return options, nil, nil, fmt.Errorf("unable to parse value provided `%s` to --cache-from: %w", iopts.CacheTo, err)
|
||||
}
|
||||
@@ -423,7 +422,7 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
UnsetEnvs: iopts.UnsetEnvs,
|
||||
}
|
||||
if iopts.Quiet {
|
||||
options.ReportWriter = ioutil.Discard
|
||||
options.ReportWriter = io.Discard
|
||||
}
|
||||
return options, containerfiles, removeAll, nil
|
||||
}
|
||||
|
||||
8
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
8
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
@@ -53,8 +53,8 @@ type BudResults struct {
|
||||
Authfile string
|
||||
BuildArg []string
|
||||
BuildContext []string
|
||||
CacheFrom string
|
||||
CacheTo string
|
||||
CacheFrom []string
|
||||
CacheTo []string
|
||||
CacheTTL string
|
||||
CertDir string
|
||||
Compress bool
|
||||
@@ -202,8 +202,8 @@ func GetBudFlags(flags *BudResults) pflag.FlagSet {
|
||||
fs.StringArrayVar(&flags.OCIHooksDir, "hooks-dir", []string{}, "set the OCI hooks directory path (may be set multiple times)")
|
||||
fs.StringArrayVar(&flags.BuildArg, "build-arg", []string{}, "`argument=value` to supply to the builder")
|
||||
fs.StringArrayVar(&flags.BuildContext, "build-context", []string{}, "`argument=value` to supply additional build context to the builder")
|
||||
fs.StringVar(&flags.CacheFrom, "cache-from", "", "remote repository to utilise as potential cache source.")
|
||||
fs.StringVar(&flags.CacheTo, "cache-to", "", "remote repository to utilise as potential cache destination.")
|
||||
fs.StringArrayVar(&flags.CacheFrom, "cache-from", []string{}, "remote repository list to utilise as potential cache source.")
|
||||
fs.StringArrayVar(&flags.CacheTo, "cache-to", []string{}, "remote repository list to utilise as potential cache destination.")
|
||||
fs.StringVar(&flags.CacheTTL, "cache-ttl", "", "only consider cache images under specified duration.")
|
||||
fs.StringVar(&flags.CertDir, "cert-dir", "", "use certificates at the specified path to access the registry")
|
||||
fs.BoolVar(&flags.Compress, "compress", false, "this is a legacy option, which has no effect on the image")
|
||||
|
||||
Reference in New Issue
Block a user