diff options
author | umohnani8 <umohnani@redhat.com> | 2018-08-23 14:44:38 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-23 19:11:09 +0000 |
commit | 16465007d0ea1226b63efccc98f1adc8dc279fd3 (patch) | |
tree | 3d902d4406008f9fa9cebc871ce256a95763b09d /vendor/github.com/projectatomic/buildah/imagebuildah/build.go | |
parent | 4c00dc66dfacc214d6fff845b73a4fc4226b6747 (diff) | |
download | podman-16465007d0ea1226b63efccc98f1adc8dc279fd3.tar.gz podman-16465007d0ea1226b63efccc98f1adc8dc279fd3.tar.bz2 podman-16465007d0ea1226b63efccc98f1adc8dc279fd3.zip |
Vendor in latest projectatomic/buildah
Fixes to podman build for unknown image and ADD with url
when doing --layers.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #1330
Approved by: mheon
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/imagebuildah/build.go')
-rw-r--r-- | vendor/github.com/projectatomic/buildah/imagebuildah/build.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/github.com/projectatomic/buildah/imagebuildah/build.go b/vendor/github.com/projectatomic/buildah/imagebuildah/build.go index 547b6b249..52bbe9d8c 100644 --- a/vendor/github.com/projectatomic/buildah/imagebuildah/build.go +++ b/vendor/github.com/projectatomic/buildah/imagebuildah/build.go @@ -725,7 +725,10 @@ func (b *Executor) resolveNameToImageRef() (types.ImageReference, error) { if b.output != "" { imageRef, err = alltransports.ParseImageName(b.output) if err != nil { - candidates := util.ResolveName(b.output, "", b.systemContext, b.store) + candidates, err := util.ResolveName(b.output, "", b.systemContext, b.store) + if err != nil { + return nil, errors.Wrapf(err, "error parsing target image name %q: %v", b.output) + } if len(candidates) == 0 { return nil, errors.Errorf("error parsing target image name %q", b.output) } @@ -962,6 +965,7 @@ func (b *Executor) getFilesToCopy(node *parser.Node) ([]string, error) { } if strings.HasPrefix(currNode.Value, "http://") || strings.HasPrefix(currNode.Value, "https://") { src = append(src, currNode.Value) + currNode = currNode.Next continue } matches, err := filepath.Glob(filepath.Join(b.contextDir, currNode.Value)) @@ -1143,7 +1147,7 @@ func (b *Executor) Build(ctx context.Context, stages imagebuilder.Stages) error for _, stage := range stages { stageExecutor = b.withName(stage.Name, stage.Position) if err := stageExecutor.Prepare(ctx, stage.Builder, stage.Node, ""); err != nil { - lastErr = err + return err } // Always remove the intermediate/build containers, even if the build was unsuccessful. // If building with layers, remove all intermediate/build containers if b.forceRmIntermediateCtrs |