I have been searching and have not been able to find a solution to my issue of being able to run a task prior to the build being deleted by the retention policy of the project in VSTS. Here's my current setup:
- Build runs, uploads artifacts to Artifactory.
- The URL to the artifact is stored in the properties under build summary.
- Project retention policy runs and removes builds that meet criteria.
- Corresponding artifact in Artifactory remains.
What I want to do is, up on deletion of the build in VSTS, that somehow attach to the pre-deletion of the build and run a task to delete the corresponding artifact in Artifactory. Then continue to delete the build in VSTS.
Is this possible? Is there something I was missing when trying to search for this?