Skip to content

Commit

Permalink
Fix Origin code to incorporate changes in STI
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Feb 19, 2015
1 parent 5859737 commit aa60c83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/build/builder/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/fsouza/go-dockerclient"
"github.com/openshift/origin/pkg/build/api"
"github.com/openshift/source-to-image/pkg/sti/git"
"github.com/openshift/source-to-image/pkg/sti/tar"
"github.com/openshift/source-to-image/pkg/git"
"github.com/openshift/source-to-image/pkg/tar"
)

// urlCheckTimeout is the timeout used to check the source URL
Expand Down Expand Up @@ -43,8 +43,8 @@ func NewDockerBuilder(dockerClient DockerClient, authCfg docker.AuthConfiguratio
authPresent: authPresent,
auth: authCfg,
build: build,
git: git.NewGit(),
tar: tar.NewTar(),
git: git.New(),
tar: tar.New(),
urlTimeout: urlCheckTimeout,
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/builder/dockerutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"

"github.com/fsouza/go-dockerclient"
"github.com/openshift/source-to-image/pkg/sti/tar"
"github.com/openshift/source-to-image/pkg/tar"
)

// DockerClient is an interface to the Docker client that contains
Expand Down
8 changes: 4 additions & 4 deletions pkg/build/builder/sti.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package builder
import (
"github.com/fsouza/go-dockerclient"
"github.com/golang/glog"
"github.com/openshift/source-to-image/pkg/sti"
stiapi "github.com/openshift/source-to-image/pkg/sti/api"
stiapi "github.com/openshift/source-to-image/pkg/api"
sti "github.com/openshift/source-to-image/pkg/build/strategies"

"github.com/openshift/origin/pkg/build/api"
)
Expand Down Expand Up @@ -48,12 +48,12 @@ func (s *STIBuilder) Build() error {
request.Ref = s.build.Parameters.Source.Git.Ref
}
glog.V(2).Infof("Creating a new STI builder with build request: %#v\n", request)
builder, err := sti.NewBuilder(request)
builder, err := sti.GetStrategy(request)
if err != nil {
return err
}
defer removeImage(s.dockerClient, tag)
if _, err = builder.Build(); err != nil {
if _, err = builder.Build(request); err != nil {
return err
}
if len(s.build.Parameters.Output.DockerImageReference) != 0 {
Expand Down

0 comments on commit aa60c83

Please sign in to comment.