docker run -d -E MATTERMOST_WEBHOOK_URL=http://mattermost/hooks/hook-id jeshan/mattermost-integration-gitlab
Connect your project to your GitLab account for outgoing webhooks
Log in to your GitLab account and open the project from which you want to receive updates and to which you have administrator access. From the settings menu of the project, click on Webhooks. In the URL field enter http://<your-mattermost-integration-URL>/new_event (notice extra new_event URL argument). On this address the integration service will be receiving the events from your GitLab project. Make sure your URL has a leading http:// or https://.
On the same page, under Trigger select the events you want to receive, Push events, Comment events, Issue events, Merge Request events for instance.
(Recommended but optional): Encrypt your connection from GitLab to your project by selecting Enable SSL verification. If this option is not available and you're not familiar with how to set it up, contact your GitLab System Administrator for help.
Click Add Webhook and check that your new webhook entry is added to the Webhooks section below the button.
Leave this page open as we'll come back to it to test that everything is working.
If your GitLab project is in active development, return to the Settings > Web Hooks page of your GitLab project and click Test Hook to send a test message about one of your recent updates from your GitLab project to Mattermost. You should see a notification on the Gitlab page that the hook was successfully executed. In Mattermost, go to the channel which you specified when creating the URL for your incoming webhook and make sure that the message delivered successfully.
If your GitLab project is new, try creating a test issue and then verify that the issue is posted to Mattermost.
Remove the export PUSH_TRIGGER=True line from your ~/.bash_profile and source it again source ~/.bash_profile. This was used for testing only, and is better left turned off for production