- Getting Started
- Code Review
- Platforms
- CI integrations
- Web Projects
- Developer Tools
- Get Notified
- API
Azure DevOps is an integrated code management and CI/CD platform. Screenshotbot completely integrates with both repositories and pipelines on Azure DevOps. In this document, we'll assume you're using Azure Pipelines to run your CI jobs.You can also use DevOps and run CI pipelines on other CI frameworks, or vice-versa.
Screenshotbot does not need access to read your Azure repositories. Azure has a granular permission model, and we only request permission to update Pull Request Statuses. Commit graphs will be computed during the CI jobs.
Before we can configure Screenshotbot, you need a Personal Access Token from Azure DevOps. Make sure you give the token an expiration in the distant future. At time of writing, Azure does not let you create a token that does not expire: instead, choose a Custom Defined expiration, and pick the furthest date possible.
For scope, the only scope we need is the "Status" scope under "Code", as shown below.
Copy the Personal Access Token, we'll use it in the next step.
On Screenshotbot, go to the Settings page, and then click Azure DevOps. Paste the Personal Access Token here, and click Save. In most cases you can leave the server name as is.
Now all that's left to do is to make sure your Pipeline calls into Screenshotbot.
Azure Pipelines by default uses shallow git clones. (This means the entire Git tree is not available.) The Screenshotbot CLI tool requires that the Git tree be available. We use this to compute which commit to generate a base run from.
You can disable shallow clones as follows in your azure-pipeline.yml:
- checkout: self persistCredentials: true fetchDepth: 0
The fetchDepth disables shallow clones, and persistCredentials allows us to fetch the main branch when running on Pull Requests. You can see an example of this here
At this point, you can use our extensive integrations to upload screenshots to Screenshotbot. For example if you're just uploading a directory of pre-generated images it will look like:
- displayName: 'Upload screenshots' script: | curl https://cdn.screenshotbot.io/recorder.sh | sh ~/screenshotbot/recorder \ --directory screenshots \ --channel my-screenshot-channel
But we also provide various integrations for Android, iOS and web.
On a Pull Request, if there are any changes we'll add a failing build status.
Clicking the failure, will take you to Screenshotbot where you can review the changes, and finally Accept or Reject them.
Accepting the changes will turn your build green, rejecting it will keep it red. In both cases, we'll update the build status to show who reviewed your changes.
Sign up or contact us.