jessehouwing / azure-pipelines-tfvc-tasks

Azure Pipelines tasks for Team Foundation Version Control
https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks
MIT License
27 stars 18 forks source link

Multiple build with check-in trigger #24

Closed tomkor closed 8 years ago

tomkor commented 8 years ago

Hi again

Now I have problem with multiple build caused by check-in trigger (example with screenshot of m buld agent) microsoft_visual_studio_team_services_-_2016-03-06_17 33 23

My build definition is like this:

microsoft_visual_studio_team_services_-_2016-03-06_17 35 19

with trigger like this:

microsoft_visual_studio_team_services_-_2016-03-06_17 36 37

Build number 1606601 is my first build today. Other builds 160066.. is automaticaly created for check-in like this:

microsoft_visual_studio_team_services_-_2016-03-06_17 39 48

tomkor commented 8 years ago

Last build 160066_13 have error like this:

microsoft_visual_studio_team_services_-_2016-03-06_17 42 15

jessehouwing commented 8 years ago

What exactly is the problem you're seeing? The final screenshot shows a connection issue between the agent and VSTS, but it's in the Get Sources step, so it doesn't seem to be related to my task.

If you're trying to prevent the build from diving into a build loop, be sure to check the

  • [x] Policy Override \ Bypass CI on check in

option. Without it every checkin will fire off a new build. This is one of the dangers I warned about on the wiki's homepage, the description of the task and the tooltip of the "I Understand" checkbox. Changing files in a build can cause that same build (or another build to fire). You need to keep this in mind when setting up the tasks.

Alternatively update your CI trigger to ignore changes to the AssemblyInfo.cs. to do so click add new Filter and add

  • [x] Continuous Integration
  • [x] Batch Changes
  • Include $/Kancelaria
  • Exclude $/Kancelaria/eKancelaria/eKancelaria/properties/assemblyinfo.cs

PS: it's a better idea to switch the Index & Publish sources task so that it's after the Check-in. That way the correct version of the sources should be associated to the debug symbols.

jessehouwing commented 8 years ago

It looks like you have the Bypass CI on checkin enabled if I look at the build logs, so the second option would be a temporary workaround. I'll check with Microsoft why the NO_CI comment isn't working.

jessehouwing commented 8 years ago

It looks like the NO_CI comment I'm adding is missing an extra *, i'll push a build which adds the correct number.

jessehouwing commented 8 years ago

Pushing a new build to the gallery in a couple of minutes

https://github.com/jessehouwing/vsts-tfvc-tasks/commit/f132cbe69937b5749100e0b0015d5ca90b65d5eb

jessehouwing commented 8 years ago

Build 1.1.712 should contain the fix.

tomkor commented 8 years ago

Now everything is ok. New, only one build 160066.14

Thanks for quick reaction

Best Regards Tomasz Korczyński