changes.
| QuickBuild integrates with Azure Devops via the Azure repository. This repository has all features of a normal Git repository, but add the ability to build against pull requests, and update the status based on build result for commits or pull requests. |
| |
| h2. Build against Pull Requests |
| |
| If you want to build against pull request, username field and password field are required. The password can also use a personal access token instead. To generate personal access token, please see [this page|https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page]. |
| |
| If the personal access token is used, the token should at least include {{code read}} scope. |
| |
| You can filter the pull requests by adding the parameters you want: |
| |
| | !pull-request-settings.png! |
| | !pull-request-setting.png! |
| |
| Now, QuickBuild can build against the pull request branch {{refs/pull/*/merge}}. |
| |
| h2. Azure Devops Webhook |
| |
| QuickBuild can trigger build via Azure Devops web hooks. |
| |
| h3. Configure QuickBuild Side |
| |
| h4. Add anonymous group |
| As the webhook is triggered without authentication, anonymous group should be added and it should have the permission to use RESTful API. |
| |
| h4. Add webhook settings |
| To add integration at QuickBuild side, please go to configuration settings page and then choose Webhook -> Azure Devops from right side menu: |
| |
| !webhook-menu.png! |
| |
| |
| Then, you can add the settings: |
| * *Trigger User* the user to trigger the build |
| * *Webhook Secret* the secret should be the same as what you defined in Azure authorization header |
| * *Trigger Condition* the trigger condition in Groovy scripts, when the result is true, build will be triggered, otherwise, the build will not be triggered. You can use variable _delivery_ to access the data from GitHub like _delivery.ref_, _delivery.pusher.name_. See more details on [https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops]. You can also use the parameter specified in webhook URL as below section. |
| * *Trigger Build Variables* define the variables to trigger the builds so you can use those variables in the steps later. |
| |
| |
| h3. Configure Azure Side |
| |
| To enable the webhook, first you need go to Azure Devops web hook settings page to configure the QuickBuild side related information: |
| |
| !azure-webhook.png! |
| |
| *Important* you need add Authorization header if you specify the secret at QuickBuild side. The header looks like below (replace the *my-scret-code* to your actual secret token): |
| |
| {code} |
| Authorization: Basic my-secret-code |
| {code} |
| |
| |
| If you want to use some custom parameters, you can add them to your webhook url like below: |
| |
| http://your.quickbuild.com/rest/webhook/webhook/14?target=android |
| |
| Then, later you can use target parameter in your trigger condition. |
| |