mirror of
https://github.com/containers/podman.git
synced 2025-12-03 11:49:18 +08:00
Vendor in containers/(buildah, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
21
vendor/github.com/containers/buildah/pkg/cli/build.go
generated
vendored
21
vendor/github.com/containers/buildah/pkg/cli/build.go
generated
vendored
@@ -19,12 +19,12 @@ import (
|
||||
"github.com/containers/buildah/pkg/parse"
|
||||
"github.com/containers/buildah/pkg/util"
|
||||
"github.com/containers/common/pkg/auth"
|
||||
cutil "github.com/containers/common/pkg/util"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type BuildOptions struct {
|
||||
@@ -316,13 +316,6 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
iopts.NoCache = true
|
||||
}
|
||||
}
|
||||
var pullPushRetryDelay time.Duration
|
||||
pullPushRetryDelay, err = time.ParseDuration(iopts.RetryDelay)
|
||||
if err != nil {
|
||||
return options, nil, nil, fmt.Errorf("unable to parse value provided %q as --retry-delay: %w", iopts.RetryDelay, err)
|
||||
}
|
||||
// Following log line is used in integration test.
|
||||
logrus.Debugf("Setting MaxPullPushRetries to %d and PullPushRetryDelay to %v", iopts.Retry, pullPushRetryDelay)
|
||||
|
||||
if c.Flag("network").Changed && c.Flag("isolation").Changed {
|
||||
if isolation == define.IsolationChroot {
|
||||
@@ -340,7 +333,7 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
if err != nil {
|
||||
return options, nil, nil, err
|
||||
}
|
||||
if !cutil.StringInSlice(contextDir, sbomScanOption.ContextDir) {
|
||||
if !slices.Contains(sbomScanOption.ContextDir, contextDir) {
|
||||
sbomScanOption.ContextDir = append(sbomScanOption.ContextDir, contextDir)
|
||||
}
|
||||
for _, abc := range additionalBuildContext {
|
||||
@@ -405,7 +398,6 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
OutputFormat: format,
|
||||
Platforms: platforms,
|
||||
PullPolicy: pullPolicy,
|
||||
PullPushRetryDelay: pullPushRetryDelay,
|
||||
Quiet: iopts.Quiet,
|
||||
RemoveIntermediateCtrs: iopts.Rm,
|
||||
ReportWriter: reporter,
|
||||
@@ -424,6 +416,15 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) (
|
||||
UnsetEnvs: iopts.UnsetEnvs,
|
||||
UnsetLabels: iopts.UnsetLabels,
|
||||
}
|
||||
if iopts.RetryDelay != "" {
|
||||
options.PullPushRetryDelay, err = time.ParseDuration(iopts.RetryDelay)
|
||||
if err != nil {
|
||||
return options, nil, nil, fmt.Errorf("unable to parse value provided %q as --retry-delay: %w", iopts.RetryDelay, err)
|
||||
}
|
||||
// Following log line is used in integration test.
|
||||
logrus.Debugf("Setting MaxPullPushRetries to %d and PullPushRetryDelay to %v", iopts.Retry, options.PullPushRetryDelay)
|
||||
}
|
||||
|
||||
if iopts.Quiet {
|
||||
options.ReportWriter = io.Discard
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user