Documentation
Webhooks
You can add webhooks to both GitHub and GitLab in order to trigger bundle builds and deployments whenever you push a new commit to a nominated branch.
Builds triggered by a webhook will use the same base software and directory map as your most recent, manual bundle build.
GitHub
-
Navigate to the Project Settings page in the Servd dashboard
-
In the webhooks section, enter the branch that you would like to track with your automated builds.
-
Optionally select an environment that you'd like to automatically deploy new bundles to.
-
Make a note of the webhook URL and secret. You'll need them in a moment.
-
Open a browser tab and navigate to your Git repo on GitHub. Find the 'Settings' section and select 'Webhooks'.
-
Click 'Add Webhook'
-
Enter the webhook URL and secret from the Servd dashboard into the appropriate fields.
Set the 'Content Type' to 'application/json'.
Select 'Just the push event'
Ensure 'Active' is checked.
-
Click 'Add Webhook' and you're done! The next commit added to your nominated branch will trigger a bundle to be built in Servd.
GitLab
-
Navigate to the Project Settings page in the Servd dashboard.
-
In the webhooks section, enter the branch that you would like to track with your automated builds.
-
Optionally select an environment that you'd like to automatically deploy new bundles to.
-
Make a note of the webhook URL and secret. You'll need them in a moment.
-
Open a browser tab and navigate to your Git repo on GitLab. Find the 'Settings' section and select 'Integrations'.
-
Enter the webhook URL and secret obtained from the Servd dashboard.
Check only 'Push Events' (everything else will be ignored anyway)
-
Click 'Add Webhook' and you're done! The next commit added to your nominated branch will trigger a bundle to be built in Servd.
Bitbucket
-
Navigate to the Project Settings page in the Servd dashboard.
-
In the webhooks section, enter the branch that you would like to track with your automated builds.
-
Optionally select an environment that you'd like to automatically deploy new bundles to.
-
Copy the webhook URL. You'll need it in a moment.
-
Open a browser tab and navigate to your Git repo on Bitbucket. Find the 'Repository Settings' section and select 'Webhooks'. Click 'Add Webhook'.
-
Give the webhook a name and paste the webhook URL obtained from the Servd dashboard.
Check that 'Triggers' is set to 'Repository Push'
-
Click 'Save' and you're done! The next commit added to your nominated branch will trigger a bundle to be built in Servd.