Skip to content

Commit

Permalink
fix(plugin/arsenal): use custom http client (#5308)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault committed Jul 8, 2020
1 parent 4c8a0ff commit ee4466f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrib/integrations/arsenal/plugin-arsenal/main.go
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"

"github.com/ovh/cds/sdk"
"github.com/ovh/cds/sdk/cdsclient"
"github.com/ovh/cds/sdk/grpcplugin/integrationplugin"
"github.com/ovh/cds/sdk/interpolate"
)
Expand Down Expand Up @@ -106,9 +107,7 @@ func (e *arsenalDeploymentPlugin) Deploy(ctx context.Context, q *integrationplug
return fail("Error: unable to interpolate data: %v. Please check you integration configuration\n", err)
}

httpClient := &http.Client{
Timeout: 60 * time.Second,
}
httpClient := cdsclient.NewHTTPClient(60*time.Second, false)

// Prepare the request
req, err := http.NewRequest(http.MethodPost, arsenalHost+"/deploy", strings.NewReader(deployData))
Expand Down

0 comments on commit ee4466f

Please sign in to comment.