TFS Rolling Build appears to skip building sometimes - tfs

Environment: TFS 2010
I met a strange issue on the TFS 2010.
I create a rolling build, and set it should be triggered no more often than every 30 minutes.
Usually, it works fine. I can find the build was triggered several times one day.
Then there is a long vacation and after I came back, the rolling build was not triggered in the last two days.
There is nothing changed for the build definition and TFS server.
It is very strange.
Does anyone know the reason or have the same situation?
BTW, I have a little question for rolling builds. That is, Rolling builds work when there are accumulate check-ins until the prior build finishes. If 1:00 AM, a rolling build was triggered, it will finish at 1:20. At 1:10 some new code was checked in, an other build such as nightly build was triggered before 1:20. Question: Is the rolling build triggered at 1:30?

The whole point of rolling builds is so they don't build up in a queue, basically it means if anyone checks in while a build is happening it won't trigger a build.
If you set a time, eg 30 minutes, it won't ever build within 30 minutes of a previous build.
For the next build to happen you need to check in again outside of those conditions (eg 30 minutes later)

Related

Continuous Integration in Jenkins, Test Cases from 2 Builds are stacking up

I have Continuous Integration Set up in Jenkins which is Triggered every time there is Code change, However if the change is done Frequently then the Test Cases from 2 Builds are stacking up. Is there a way to Cancel/Stop the Previous Builds Test Cases from Running, and just Continue with the latest Build
Try to use the 'Quiet Period' option. This is available from the 'Advanced' section of 'Configure'.
Here, you can specify how many seconds Jenkins should wait before actually starting its task after a commit has been made. So, if you provide 30 minutes (30*60 = 1800) as the quiet period, and you have made a commit at 8PM, Jenkins would wait till 8:30 PM before starting its task. In the meantime, if you make 2-3 more commits, they will be stacked together and considered during the 8:30 PM run.
Hope this helps

How to specify build queue order on auto-triggered TFS builds

I have 2 build definitions setup in TFS (Microsoft Team Foundation Server) 2013. One build runs and deploys every time a change happens in my main branch. The other build is a rolling build, and is triggered at most ever 30 minutes upon changes in my main branch.
In the scenario where the second build hasn't been run in the last 30 minutes at the time of a code commit, both builds get triggered at the same time. I'd like for the first build to be queued first, and the rolling build to be queued second. Right now, the second build goes first, presumably because either the build definition name alphabetically comes first, or the build definition itself was created in the system first.
How is build queue order determined in this scenario, and what can be done to control this order?

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

tfs build wait since last check-in

When I check-in a file, the TFS CI trigger waits very little and starts the build. The problem is that I may have 10-30 files to check-in, and I would like the TFS to wait at least 5 minutes after my last file checked in before it starts a new CI build. In Cruise-Control I had a "modificationDelaySeconds" property where I could set the minimum amount of seconds to wait after the last check-in. How do I do this in TFS (2012)?
The closest alternative in TFS is to define Rolling Builds (also known as Batched-CI-builds).
Change the build trigger from Continuous Integration to Rolling Builds. This way, the build waits till the last build has finished; you can also configure that you do not want to build more often than every 5 minutes.

Does tfs teambuild continuous-integration always building latest sources?

We've got quite a long build time and sometimes get a small queue of CI builds waiting to build, it looks to me like CI always builds 'latest sources' and not necessarily 'repository head plus changeset at time of checkin' - is that correct? and if so there's no point in waiting for each build of my queue to complete, I might as well cancel all but the last one?
Sounds like you would prefer using Rolling builds if you want to accumulate until the previous build finishes.

Resources