Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build artifact retention setting being ignored

Tags:

azure-devops

I had a build be deleted from the retain policy and I want to increase the retain policy time.

I go to project settings->pipelines->settings and it says

'The artifacts and attachments retention setting is being ignored because the runs retention setting is evaluated first.'

and it won't let me change the 'days to keep artifacts and attachments'

I can't seem to find where this setting is...

I've looked under project settings -> Test -> Retention but I'm not sure that's the place.

like image 466
D T Avatar asked Dec 31 '22 12:12

D T


1 Answers

Build artifact retention setting being ignored

This behavior is by designed and is not a issue.

As we know, the artifacts and attachments are generated from the pipeline runs. If the build pipeline is deleted, the artifacts and attachments it generates will also be deleted.

That the reason why you set the value of Days to keep artifacts and attachments greater than or equal to the value of Days to keep runs, you will get that prompt:

enter image description here

When you set the value of Number of days to keep artifacts and attachments less than the value of Days to keep runs, that warning will disappear:

enter image description here

So, if you want to increase the retain policy time for Build artifact, you need increase the retain time for Days to keep runs.

it won't let me change the 'days to keep artifacts and attachments'

That because you don't have enough permissions, to change the Retention policy, you must be a member of the Project Collection Administrators Group.

Check the document Set permissions at the project- or collection-level for some more details.

Or you can ask someone in the PCA to change the Retention policy.

Hope this helps.

like image 142
Leo Liu-MSFT Avatar answered Jan 04 '23 22:01

Leo Liu-MSFT