From 510de19c4149d5b93d4b34748078333c407bd9bf Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Fri, 30 Aug 2024 15:11:29 +0200 Subject: [PATCH] Check in forward event --- jenkins/webhook-proxy/main.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jenkins/webhook-proxy/main.go b/jenkins/webhook-proxy/main.go index 9af54380f..49615bc4b 100644 --- a/jenkins/webhook-proxy/main.go +++ b/jenkins/webhook-proxy/main.go @@ -593,6 +593,10 @@ func (c *ocClient) Forward(e *Event, triggerSecret string) (int, []byte, error) e.Pipeline, triggerSecret, ) + + c.CheckJenkinsAvailability(e) + c.CheckDocGenAvailability(e) + log.Println(e.RequestID, "Forwarding to", url) p := struct { @@ -626,9 +630,6 @@ func (c *ocClient) CreateOrUpdatePipeline(exists bool, tmpl *template.Template, return 500, err } - c.CheckJenkinsAvailability(e) - c.CheckDocGenAvailability(e) - url := fmt.Sprintf( "%s/namespaces/%s/buildconfigs", c.OpenShiftAPIBaseURL, @@ -670,9 +671,6 @@ func (c *ocClient) DeletePipeline(e *Event) error { e.Pipeline, ) - c.CheckJenkinsAvailability(e) - c.CheckDocGenAvailability(e) - req, _ := http.NewRequest( "DELETE", url,