当前位置: 动力学知识库 > 问答 > 编程问答 >

tfs - TFS2013 Scheduled Builds: Manually triggered Builds are not being accounted for when Scheduled Build are kicked off

问题描述:

I'm having some trouble preventing a Scheduled Build from being automatically kicked off after the same build has been trigger manually and no changes are present.

Problem: The Build is scheduled to go out at 3am everyday but only if any changes have been made (the Settings option ‘Build even if nothing has changed since the previous build’ is Unchecked). The problem is that if you trigger a manual build and no changes are made afterwards, the Scheduled Build is still going to get triggered even if there are no changes. Please follow the scenario bellow for an example:

Scenario:

  • Scheduled build gets kicked off today at 3am - assembly version changes to 1.0.0.1
  • On the same day, several changes are checked-in before noon.
  • The same Build is kicked off manually at 1pm - assembly version changes to 1.0.0.2
  • No more check-ins are made after the manual build from 1pm
  • The next day at 3am the Scheduled build gets triggered which it shouldn't have (assembly version changes to 1.0.0.3) since there were no check-ins since 1pm (triggered manually).

It seems like the 1pm build is not even being considered and accounted for.

It looks like TFS is taking in count check-ins since the last “Scheduled Build” rather than “the last completed Build” (same build definition) which in this case was the manually triggered one.

So my question is: “Is there any way we can prevent TFS from triggering Scheduled build if there were no check-ins after a manual build has been kicked off?”

Currently, it looks like TFS does not have that option anywhere in the Build Definition

Thank you in advance

网友答案:

In order to do this you would need to write your own scheduler that checked the previous manual build for you. You could write a TfsJob for this or even as a a scheduled powershell that runs at the allotted time...

网友答案:

I ran into this issue today as well.

It seems this is currently "by design".

Someone else posted a suggestion to "fix" this here: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5702884--build-even-if-nothing-has-changed-since-the-previ

分享给朋友:
您可能感兴趣的文章:
随机阅读: