Question: How to create a GitLab webhook and how to create a secret_token for that webhook in Spinnaker. Is there any way to create one?


Answer: Yes, you can configure GitLab Webhook as mentioned below:

  • Steps to configure GitLab Webhook:
  • Navigate to the Settings page of a repository
  • Choose the Integrations menu and fill out the fields:
    • URL: http://<Public-IP>:8084/webhooks/webhook/gitlab
    • The Payload URL should be $ENDPOINT/webhooks/webhook/gitlab
    • We need Spinnaker’s API running on an endpoint that is publicly reachable. This is required to allow GitLab’s webhooks to reach Spinnaker.
    • If you are unsure of what your Spinnaker API endpoint is, check the value of services.gate.baseUrl in ~/.hal/$DEPLOYMENT/staging/spinnaker.yml. The value of $DEPLOYMENT is typically default.
    • Secret Token: Spinnaker validates the source of the requests with the Secret Token
  • Select Trigger options like, ‘Push events’, ‘Tag Push events’, etc.
  • Check/Uncheck ‘Enable SSL verification’ according to Spinnaker server SSL configuration

Image Reference for URL: