Skip to content

Commit

Permalink
#2 fixed windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
BrobotDubstep committed Jun 20, 2020
1 parent a5a48b4 commit 957f9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/harbourbuild/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 957f9ec

Please sign in to comment.