File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
1111 "time"
1212
1313 "code.google.com/p/go-uuid/uuid"
14- "github.com/coreos/go-etcd/etcd"
1514 "github.com/deis/builder/pkg"
1615 "github.com/deis/builder/pkg/log"
1716 "gopkg.in/yaml.v2"
@@ -29,13 +28,7 @@ func (e errGitShaTooShort) Error() string {
2928 return fmt .Sprintf ("git sha %s was too short" , e .sha )
3029}
3130
32- func build (conf * Config , etcdClient * etcd.Client , gitSha string ) error {
33- // TODO: replace etcd usage here with something else. See https://github.com/deis/builder/issues/81
34- builderKey , err := getBuilderKey (etcdClient )
35- if err != nil {
36- return fmt .Errorf ("couldn't get builder key %s (%s)" , builderKey , err )
37- }
38-
31+ func build (conf * Config , builderKey , gitSha string ) error {
3932 // HTTP_PREFIX="http"
4033 // REMOTE_STORAGE="0"
4134 // # if minio is in the cluster, use it. otherwise use fetcher
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ func Run(conf *Config) error {
5858 if err != nil {
5959 return err
6060 }
61+ // TODO: replace etcd usage here with something else. See https://github.com/deis/builder/issues/81
62+ builderKey , err := getBuilderKey (etcdClient )
63+ if err != nil {
64+ return fmt .Errorf ("couldn't get builder key %s (%s)" , builderKey , err )
65+ }
6166 scanner := bufio .NewScanner (os .Stdin )
6267 for scanner .Scan () {
6368 line := scanner .Text ()
@@ -69,7 +74,7 @@ func Run(conf *Config) error {
6974 if err := receive (conf , newRev ); err != nil {
7075 return err
7176 }
72- if err := build (conf , etcdClient , newRev ); err != nil {
77+ if err := build (conf , builderKey , newRev ); err != nil {
7378 return err
7479 }
7580 }
You can’t perform that action at this time.
0 commit comments