Reputation: 81
We have deleted a pipeline accidentally, we need to recover it but how?
Thanks for your help
Upvotes: 7
Views: 12628
Reputation: 822
Azure DevOps services gives an out of the box solution for this now.
Simply go to the pipelines overview and click on the 3 dots, click on the view deleted pipelines and recover the pipeline.
Upvotes: 8
Reputation: 35194
As far as I know, this is achievable. But you need to use Rest API to restore the deleted build pipeline.
Here is the Rest API:
PATCH https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}?deleted=false&api-version=5.1
It could restore the deleted build definition and build history.
Here is my restored pipeline:
Upvotes: 3
Reputation: 4045
Per the very explicit warning message, this is not something that can be recovered. At best if you were using the YAML, then you probably will still have your pipeline configuration in the repo. But you have probably lost the build history and associated artifacts.
Upvotes: 2