From 957f9eca0138a5a45437312ecd5ae62c4c01912c Mon Sep 17 00:00:00 2001 From: Tim Olbrich Date: Sun, 21 Jun 2020 00:04:46 +0200 Subject: [PATCH] #2 fixed windows build --- pkg/harbourbuild/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/harbourbuild/builder.go b/pkg/harbourbuild/builder.go index 341225f..34829fb 100644 --- a/pkg/harbourbuild/builder.go +++ b/pkg/harbourbuild/builder.go @@ -74,7 +74,7 @@ func (b Builder) buildImage(job models.BuildJob) { tag := []string{b.getImageString(job.RegistryUrl, job.Repository, job.Tag)} opt := types.ImageBuildOptions{ Tags: tag, - Dockerfile: filepath.Clean(job.Dockerfile), + Dockerfile: job.Dockerfile, } resp, err := b.cli.ImageBuild(b.ctx, buildCtx, opt) @@ -180,7 +180,7 @@ func (b Builder) createBuildContext(filePath string, dockerfile string) (*os.Fil if err != nil { b.log.WithError(err).Errorf("File %s could not be added to tar", path) } - if err := tar.Add(pathToFile, file, nil); err != nil { + if err := tar.Add(filepath.ToSlash(pathToFile), file, nil); err != nil { b.log.WithError(err).Errorf("Error while adding file %s to path", path) } if err := file.Close(); err != nil {