On Wednesday, March 11, 2015 at 6:01:20 PM UTC+2, Saku Ytti wrote:
>
> I believe this use-case applies to custom hooks too, but my use-case is 
> modifying gitlab-shell hooks, so not exactly supported.
>
>
> I want hook for all repos, so I'm calling my own class in post-receive, 
> this works great.
>
> However post-receive is not called for 'accept merge request' events, and 
> I have one repo where this is only way it'll ever get commits. So I 
> migrated my script to 'update' hook. It continues work great for 'push' 
> events, but fails in 'merge' events. Reason it fails is, because my ruby 
> file is requiring a gem, and this gem invariably fails with 'loaderror'.
>
>
> I postulate this is because on 'push' event, ssh forks the ruby instance, 
> so it'll see all normally installed gems. But on 'merge' event we're 
> running inside gitlab ruby instance, which won't see it.
>
> I tried to workaround this, by calling my ruby script via system(), but 
> even in that case, it'll fail for LoadError on 'merge' events.
>
>
>
> Is it possible to use your own gems in custom hooks? I believe this 
> answer, once satisfied also applies to my unsupported use-case. 
>
> Thanks,
>


Maybe your issue is related to 
https://gitlab.com/gitlab-org/omnibus-gitlab/issues/406 

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/a573a159-c37a-42a8-a4b9-e1467462ff51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to