Forestry supports syncing with static sites stored in Azure DevOps repos.
Currently, in order to use Azure DevOps as a source provider, you must use Manual Setup to set up the repository connection.
To set up a site whose code is hosted on Azure DevOps, click the Add Site button on your dashboard, and select Azure DevOps as a source provider. You will notice that the Quick Setup via OAuth toggle automatically switches off, because Quick Setup is not available for Azure DevOps repos.
Setting the Repo Location
After you click Next, you will be prompted to enter the repository URL, the branch you wish to import, and (if you are importing a Jekyll or Hugo site,) the config path. The repository URL should be the SSH URL, not the HTTPS URL.
Completing the Connection
After you enter your repo information and click Next, you will be taken to the repository settings screen on your site dashboard. This screen will give you access to the information that needs to be added to your git provider’s settings.
Setting the Public Key
To add a new key to Azure DevOps, navigate to
$USERNAME is your username in Azure DevOps.
Click Add to add a new key. You can use the Description field to add an identifier for this key so you will know what it’s being used for later on. In the Key Data field, paste in the public key provided by Forestry. Click the Save button to save this key.
After setting up the key, navigate back to the site settings in Forestry and click Re-import from azuredevops. If the key has been set up correctly, this will initiate an import of your site to Forestry.
Setting up the Webhook
To add a webhook to your Azure DevOps Repository, navigate to
$PROJECT for the name of the Azure DevOps organization and project you want to add hooks for. This will take you to the Service Hooks area of the project settings.
Click on Create Subscription, select Web Hooks from the available services, and then click Next.
Here you will configure the type of webhook to send. Select Code pushed for the trigger, and select the repository and branch that corresponds to your site in Forestry. Under Pushed by a member of group, use the default selection of [Any]. Click Next to continue configuring the webhook.
On this last configuration screen, paste in the Webhook URL from your site’s settings page in Forestry and ensure the Resource Version is set to 1.0. No further changes are necessary on this screen, so you can click Finish To create the webhook.
Caught a mistake or want to contribute to the docs? Edit this page on Github!