I have two tasks at end of my build pipeline
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: false
archiveType: '7z'
sevenZipCompression: 'ultra'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).7z'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.StagingDirectory)'
publishLocation: 'filepath'
fileSharePath: 'D:\Builds\some-folder'
What I need do or change here to make agents deleting artifacts when I delete specific build run? Or just remove published files with retention policy?
I am using Azure DevOps with 5 self-hosted agents on this same machine.
Update: To be clear retention policy is set but artifacts not being deleted from self-hosting machine.