TFS 2015 / vNext Build - Set Build.Clean Control Variable in a build step

只愿长相守 提交于 2019-12-24 00:45:21

问题


Is it possible to set the Build.Clean control variable during a build step (Not at Queue Time), based upon the way the build is queued?

For instance, I have a build that if queued manually during the day, I want it to run Incrementally. If it runs on its schedule in the middle of the night, I want to have it do a Build.Clean, recreating the Binaries (b) folder on the build agent.

It seems like this control variable has to be set at queue time, because the build runs this operation on the Agent prior to executing any of the build steps themselves. I'm just curious if anyone else has run into this requirement before, or if it is even possible. Thank you


回答1:


No, it can only be set at queue time.

In your scenario, you can create two build definitions. One for incremental build (Disable the Clean option, Clean = False), and another enable the Clean option for middle of the night build.

Reference:

  • Control variables

  • Clean the local repo on the agent--TFS 2017 RTM, TFS 2015.4 area.



来源:https://stackoverflow.com/questions/47533521/tfs-2015-vnext-build-set-build-clean-control-variable-in-a-build-step

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