From ee4466f2372f7b9746043f20a593a1954c857542 Mon Sep 17 00:00:00 2001 From: Yvonnick Esnault Date: Wed, 8 Jul 2020 16:51:30 +0200 Subject: [PATCH] fix(plugin/arsenal): use custom http client (#5308) Signed-off-by: Yvonnick Esnault --- contrib/integrations/arsenal/plugin-arsenal/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/integrations/arsenal/plugin-arsenal/main.go b/contrib/integrations/arsenal/plugin-arsenal/main.go index c040e64438..e1089da043 100644 --- a/contrib/integrations/arsenal/plugin-arsenal/main.go +++ b/contrib/integrations/arsenal/plugin-arsenal/main.go @@ -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" ) @@ -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))