Create a custom URL

Create a custom URL to allow communication between your Git host and Code Manager.

Code Manager supports webhooks for GitHub, Bitbucket Server (formerly Stash), Bitbucket, GitLab (Push events only), and Team Foundation Server (TFS).

If you want to use a GitHub webhook with the Puppet signed cert, you must disable SSL verification.

The custom webhook URL must use these elements:

Element Description Example
Name Your primary server's DNS name puppet.example.com
Port The port used by Code Manager 8170
Endpoint The Code Manager webhook endpoint /code-manager/v1/webhook/
Parameters Required and optional Code Manager webhook query parameters type=github&token=<TOKEN>

The minimum possible valid webhook URL format is:

https://<NAME>:<PORT>/code-manager/v1/webhook?type=<TYPE>

The token parameter is required unless you disabled authenticate_webhook. With the token parameter, the valid URL format is:

https://<NAME>:<PORT>/code-manager/v1/webhook?type=<TYPE>&token=<TOKEN>

If your source configuration requires the prefix parameter, the valid URL format is:

https://<NAME>:<PORT>/code-manager/v1/webhook?type=<TYPE>&prefix=<PREFIX>&token=<TOKEN>

For example, the following URLs are for a GitHub webhook and a Bitbucket Server webhook:

https://puppet.example.com:8170/code-manager/v1/webhook?type=github&token=<TOKEN>
https://puppet.example.com:8170/code-manager/v1/webhook?type=bitbucket-server&prefix=dev&token=<TOKEN>

After you Set up the Code Manager webhook on your Git host, you can use this URL to call the POST /v1/webhook endpoint.