@@ -10,9 +10,11 @@ import (
1010 "strings"
1111 "time"
1212
13+ "github.com/aws/aws-sdk-go/aws"
1314 "github.com/aws/aws-sdk-go/service/s3"
1415 "github.com/deis/builder/pkg"
1516 "github.com/deis/builder/pkg/gitreceive/log"
17+ "github.com/deis/builder/pkg/gitreceive/storage"
1618 "github.com/pborman/uuid"
1719 "gopkg.in/yaml.v2"
1820)
@@ -71,11 +73,11 @@ func build(conf *Config, s3Client *s3.S3, builderKey, gitSha string) error {
7173 tmpDir := os .TempDir ()
7274
7375 tarObjKey := fmt .Sprintf ("home/%s/tar" , slugName )
74- tarURL := fmt .Sprintf ("%s://%s:%s/ git/%s" , storage . schema (), storage . host (), storage . port () , tarObjKey )
76+ tarURL := fmt .Sprintf ("%s/ git/%s" , * s3Client . Config . Endpoint , tarObjKey )
7577
7678 // this is where workflow tells slugrunner to download the slug from, so we have to tell slugbuilder to upload it to here
7779 pushObjKey := fmt .Sprintf ("home/%s/push" , fmt .Sprintf ("%s:git-%s" , appName , gitSha ))
78- pushURL := fmt .Sprintf ("%s://%s:%s/%s " , storage . schema (), storage . host (), storage . port () , pushObjKey )
80+ pushURL := fmt .Sprintf ("%s/%s " , * s3Client . Config . Endpoint , pushObjKey )
7981
8082 // Get the application config from the controller, so we can check for a custom buildpack URL
8183 appConf , err := getAppConfig (conf , builderKey , conf .Username , appName )
@@ -171,7 +173,7 @@ func build(conf *Config, s3Client *s3.S3, builderKey, gitSha string) error {
171173 }
172174
173175 bucketName := "git"
174- if _ , err := s3Client .CreateBucket (& s3.CreateBucketInput {Bucket : aws .String (bucketName )}); bucketCreateErr != nil {
176+ if _ , err := s3Client .CreateBucket (& s3.CreateBucketInput {Bucket : aws .String (bucketName )}); err != nil {
175177 log .Warn ("create bucket error: %+v" , err )
176178 }
177179
0 commit comments