77 "strings"
88
99 "github.com/deis/builder/pkg/gitreceive/storage"
10+ "github.com/deis/builder/pkg/sys"
1011 "github.com/deis/pkg/log"
1112
1213 builderconf "github.com/deis/builder/pkg/conf"
@@ -22,15 +23,15 @@ func readLine(line string) (string, string, string, error) {
2223 return spl [0 ], spl [1 ], spl [2 ], nil
2324}
2425
25- func Run (conf * Config ) error {
26+ func Run (conf * Config , fs sys. FS , env sys. Env ) error {
2627 log .Debug ("Running git hook" )
2728
2829 builderKey , err := builderconf .GetBuilderKey ()
2930 if err != nil {
3031 return err
3132 }
3233
33- s3Client , err := storage .GetClient (conf .StorageRegion )
34+ s3Client , err := storage .GetClient (conf .StorageRegion , fs , env )
3435 if err != nil {
3536 return fmt .Errorf ("configuring S3 client (%s)" , err )
3637 }
@@ -56,7 +57,7 @@ func Run(conf *Config) error {
5657 }
5758 // if we're processing a receive-pack on an existing repo, run a build
5859 if strings .HasPrefix (conf .SSHOriginalCommand , "git-receive-pack" ) {
59- if err := build (conf , s3Client , kubeClient , builderKey , newRev ); err != nil {
60+ if err := build (conf , s3Client , kubeClient , env , fs , builderKey , newRev ); err != nil {
6061 return err
6162 }
6263 }
0 commit comments