0

我想从 bat 文件中禁用/启用构建控制器(或构建代理)。我想这样做,以便我们可以每天晚上安排构建,然后在代码冻结期间禁用它们。“TFPT builddefinition /enabled:false”很接近……但这仅用于克隆构建定义。如果没有,有没有办法从 bat 文件中禁用签入?然后我将编辑我的 Build Def 并取消选中“即使自上次构建以来没有任何变化也构建”框。谢谢

4

1 回答 1

1

You can create a Rest call to the private and undocumented TFS API, but you should know what you are doing.

Or you can use a scheduled tasks to control your agent service installation on your build server.

But there are better ways to control your sources and releases.

It seems like the problem is your TFS project setup. For example, use "GIT Hub Flow" with “Pull Requests” and no one can change the master without a approved PR.

The developers can he developers can work and you don’t need plan a “Code Freezes" or "removing permissions" or stuff like this.

I also wouldn´t stop the deployments for the dev and test systems.

If you want to avoid that anybody creates a release to a special set of environment (Stag and Prod) set an approvers to control the release process.

The understanding Git-Hub-Flow site

"GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly." GIT Hub

https://guides.github.com/introduction/flow/

于 2017-05-26T21:38:48.220 回答