How to clean build using self-hosted agent when queuing

末鹿安然 提交于 2020-07-30 07:17:25

问题


Using a git source repo in Azure DevOps - what is the proper way to clean all directories, sources, sources directory, etc. when queuing a new build?

There is UX under Get Sources that supports this - but you can't assign your own custom variables for the values - it's a static dropdown for both Clean and Clean options fields.


回答1:


Stumbled across this docs posting, but it states Build.Clean is deprecated - but the docs aren't clear that Build.Repository.Clean is now the successor. This is what seemed to work for me:

Clean Sources Only

Note: I can confirm Build.Clean = true doesn't work anymore.

The DevOps self-hosted agent is OSS - so I was able to confirm support for this undocumented flow using Build.Repository.Clean. I don't believe there is a way to assign the clean options at queue-time though.



来源:https://stackoverflow.com/questions/55719938/how-to-clean-build-using-self-hosted-agent-when-queuing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!