summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime_remote.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-10 21:28:05 +0100
committerGitHub <noreply@github.com>2020-01-10 21:28:05 +0100
commite1ffac6cc73eb36640cbaf6a1a28ba44749a96d9 (patch)
tree61134dad4b2efdaa65dee6e7206e5ce20080302c /pkg/adapter/runtime_remote.go
parent6ed88e047579bd2d1eac99a6089cc617f0c4773d (diff)
parent986feef2e80cfaed7cbce0df4fd5d619bcffefd7 (diff)
downloadpodman-e1ffac6cc73eb36640cbaf6a1a28ba44749a96d9.tar.gz
podman-e1ffac6cc73eb36640cbaf6a1a28ba44749a96d9.tar.bz2
podman-e1ffac6cc73eb36640cbaf6a1a28ba44749a96d9.zip
Merge pull request #4832 from baude/apiv2tomaster
Apiv2tomaster
Diffstat (limited to 'pkg/adapter/runtime_remote.go')
-rw-r--r--pkg/adapter/runtime_remote.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go
index 9c10b31c0..c908358ff 100644
--- a/pkg/adapter/runtime_remote.go
+++ b/pkg/adapter/runtime_remote.go
@@ -507,7 +507,7 @@ func (r *LocalRuntime) Import(ctx context.Context, source, reference string, cha
return iopodman.ImportImage().Call(r.Conn, strings.TrimRight(tempFile, ":"), reference, history, changes, true)
}
-func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, options imagebuildah.BuildOptions, dockerfiles []string) error {
+func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, options imagebuildah.BuildOptions, dockerfiles []string) (string, reference.Canonical, error) {
buildOptions := iopodman.BuildOptions{
AddHosts: options.CommonBuildOpts.AddHost,
CgroupParent: options.CommonBuildOpts.CgroupParent,
@@ -552,31 +552,31 @@ func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, opti
// tar the file
outputFile, err := ioutil.TempFile("", "varlink_tar_send")
if err != nil {
- return err
+ return "", nil, err
}
defer outputFile.Close()
defer os.Remove(outputFile.Name())
// Create the tarball of the context dir to a tempfile
if err := utils.TarToFilesystem(options.ContextDirectory, outputFile); err != nil {
- return err
+ return "", nil, err
}
// Send the context dir tarball over varlink.
tempFile, err := r.SendFileOverVarlink(outputFile.Name())
if err != nil {
- return err
+ return "", nil, err
}
buildinfo.ContextDir = tempFile
reply, err := iopodman.BuildImage().Send(r.Conn, varlink.More, buildinfo)
if err != nil {
- return err
+ return "", nil, err
}
for {
responses, flags, err := reply()
if err != nil {
- return err
+ return "", nil, err
}
for _, line := range responses.Logs {
fmt.Print(line)
@@ -585,7 +585,7 @@ func (r *LocalRuntime) Build(ctx context.Context, c *cliconfig.BuildValues, opti
break
}
}
- return err
+ return "", nil, err
}
// SendFileOverVarlink sends a file over varlink in an upgraded connection