remove docker/queue singletons; inject in main

This commit is contained in:
Alex Suraci
2014-02-25 17:10:04 -08:00
parent c0adf459f9
commit 9e1c4e60e5
6 changed files with 29 additions and 19 deletions

View File

@@ -123,6 +123,8 @@ func vet(path string) {
}
func run(path string) {
dockerClient := docker.New()
// parse the Drone yml file
s, err := script.ParseBuildFile(path)
if err != nil {
@@ -175,7 +177,7 @@ func run(path string) {
// loop through and create builders
for _, b := range builds { //script.Builds {
builder := build.New(docker.DefaultClient)
builder := build.New(dockerClient)
builder.Build = b
builder.Repo = &code
builder.Key = key