We are using Azure DevOps Server 2022.1 on-premises.
We have pipelines publishing build artifacts to a file share with "Publish build artifacts v1" task.
When we delete such a pipeline, it's artifacts remain in the file share, taking up disk space.
Additional info:
- The automatic retention is working as expected and the artifacts are removed from the file share according to the rules.
- When we delete a single run manually (after removing all retention leases), the artifacts are deleted immediately.
- When we remove retention leases from runs of a pipeline and then delete the pipeline - the artifacts are not removed.
- We tried to wait several days to see whether the artifacts are removed at some later stage, but the artifacts remain in the file share and are not deleted.
The pipeline deletion dialog has a note "Deletion includes all builds and associated artifacts". According to this, I would expect all artifacts to be deleted on pipeline deletion.
What may be the issue? Why the artifacts are not being removed on pipeline deletion (regardless of the retention status)?
This is because the build pipeline is NOT permanently deleted actually. You can still find it in the
Deleted Pipelines
and restore it.If you want to completely delete the build, you can use retention policy. Or you can delete every build runs then delete the build, so that every artifact will be deleted.