You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon,
I've been playing with strider-gitlab plugin today and I realized that the webhook for receiveing push events is not working properly. The thing was that when I pushed a new commit to my Gitlab repository strider didn't receive the HTTP request on the webhook URL and, in consequence, any of my builds were automatically triggered.
However, after some time of research across the plugin's code I found that the endpoint that strider-gitlab is implementing is a POST endpoint located at http://yourdomain.com/yourproject/api/gitlab/webhook. Firstly, that seemed normal to me but lately I discovered that Gitlab.com is sending a GET HTTP requests instead of POST ones to the WebHook URL making my continuous integration server to produce a Page Not Found response.
My solution to the problem was to replace the following lines of webapp.js file:
// gitlab should hit this endpoint
app.anon.post('/webhook', webhooks.receiveWebhook.bind(null, context.emitter));
For the following ones:
// gitlab should hit this endpoint
app.anon.get('/webhook', function (req,res){
webhooks.receiveWebhook(context.emitter,req, res);
});
Hope that this post can help anyone else that is experimenting the same trouble.
Albert
The text was updated successfully, but these errors were encountered:
Good afternoon,
I've been playing with strider-gitlab plugin today and I realized that the webhook for receiveing push events is not working properly. The thing was that when I pushed a new commit to my Gitlab repository strider didn't receive the HTTP request on the webhook URL and, in consequence, any of my builds were automatically triggered.
However, after some time of research across the plugin's code I found that the endpoint that strider-gitlab is implementing is a POST endpoint located at http://yourdomain.com/yourproject/api/gitlab/webhook. Firstly, that seemed normal to me but lately I discovered that Gitlab.com is sending a GET HTTP requests instead of POST ones to the WebHook URL making my continuous integration server to produce a Page Not Found response.
My solution to the problem was to replace the following lines of webapp.js file:
For the following ones:
Hope that this post can help anyone else that is experimenting the same trouble.
Albert
The text was updated successfully, but these errors were encountered: