mirror of
https://github.com/containers/podman.git
synced 2025-12-09 23:27:09 +08:00
Bump to Buildah v1.11.5
Bump to Buildah v1.11.5. Most notably changes to the podman build `--pull` functionality. `--pull=true` and `--pull=false` now work as Docker does, `--pull-never` added to supply the functionality of the old `--pull=false`. Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
3
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
3
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
@@ -27,6 +27,7 @@ import (
|
||||
const (
|
||||
PullIfMissing = buildah.PullIfMissing
|
||||
PullAlways = buildah.PullAlways
|
||||
PullIfNewer = buildah.PullIfNewer
|
||||
PullNever = buildah.PullNever
|
||||
|
||||
Gzip = archive.Gzip
|
||||
@@ -45,7 +46,7 @@ type BuildOptions struct {
|
||||
// commands.
|
||||
ContextDirectory string
|
||||
// PullPolicy controls whether or not we pull images. It should be one
|
||||
// of PullIfMissing, PullAlways, or PullNever.
|
||||
// of PullIfMissing, PullAlways, PullIfNewer, or PullNever.
|
||||
PullPolicy buildah.PullPolicy
|
||||
// Registry is a value which is prepended to the image's name, if it
|
||||
// needs to be pulled and the image name alone can not be resolved to a
|
||||
|
||||
9
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
9
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
@@ -339,6 +339,11 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) (image
|
||||
var cleanupImages []string
|
||||
cleanupStages := make(map[int]*StageExecutor)
|
||||
|
||||
stdout := b.out
|
||||
if b.quiet {
|
||||
b.out = ioutil.Discard
|
||||
}
|
||||
|
||||
cleanup := func() error {
|
||||
var lastErr error
|
||||
// Clean up any containers associated with the final container
|
||||
@@ -527,6 +532,10 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) (image
|
||||
if err = ioutil.WriteFile(b.iidfile, []byte(imageID), 0644); err != nil {
|
||||
return imageID, ref, errors.Wrapf(err, "failed to write image ID to file %q", b.iidfile)
|
||||
}
|
||||
} else {
|
||||
if _, err := stdout.Write([]byte(imageID + "\n")); err != nil {
|
||||
return imageID, ref, errors.Wrapf(err, "failed to write image ID to stdout")
|
||||
}
|
||||
}
|
||||
|
||||
return imageID, ref, nil
|
||||
|
||||
4
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
4
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
@@ -318,7 +318,7 @@ func (s *StageExecutor) digestSpecifiedContent(node *parser.Node, argValues []st
|
||||
// directory.
|
||||
contextSrc, err := securejoin.SecureJoin(contextDir, src)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "error joining %q and %q", contextDir, src)
|
||||
return "", errors.Wrapf(err, "forbidden path for %q, it is outside of the build context %q", src, contextDir)
|
||||
}
|
||||
sources = append(sources, contextSrc)
|
||||
}
|
||||
@@ -432,7 +432,7 @@ func (s *StageExecutor) Copy(excludes []string, copies ...imagebuilder.Copy) err
|
||||
// directory.
|
||||
srcSecure, err := securejoin.SecureJoin(contextDir, src)
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrapf(err, "forbidden path for %q, it is outside of the build context %q", src, contextDir)
|
||||
}
|
||||
if hadFinalPathSeparator {
|
||||
// If destination is a folder, we need to take extra care to
|
||||
|
||||
Reference in New Issue
Block a user