Run external script

Hi, it’s possible to run an external GitLab script server side when a user make an operation (like push) on his git project?

Thanks for your help!

I can see 3 different solutions :

  1. use git hooks, you don’t even need gitlab in the loop to do so
  2. during your build do something like ssh $USERNAME@$HOST ‘bash $SCRIPT_PATH’
  3. use gitlab webhooks in your project settings, create a quick and dirty service in the host machine that is suppose to execute the operation and let gitlab trigger the webhook for you, just make sure your service is always active (using supervisor for instance)
1 Like