0

How could I achieve this on Azure Devops Server. I need to trigger a release pipeline based on the creation of a file at specific location. Is there any extension that can monitor a file system location an trigger the pipeline. Creating a schedule to check for the existance of file on that location is not an option on this scenario for other reasons.

user2503480
  • 193
  • 3
  • 16

1 Answers1

0

The whole AzureDevops website has an underlying REST API to which you can send requests.

I would create ScheduledJob on a windows machine and check if the file was created. If yes then you can send a REST API request to trigger the pipeline like this:

PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}?api-version=5.1-preview.6

BODY:

{"status":"inProgress","scheduledDeploymentTime":null,"comment":""}

Here is the API documentation:

https://learn.microsoft.com/en-us/rest/api/azure/devops/release/releases/update%20release%20environment?view=azure-devops-rest-5.1

Repcak
  • 907
  • 1
  • 7
  • 18