Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
810 views
in Technique[技术] by (71.8m points)

git - vNext build on TFS 2015 hangs on MSBuild step and produces no log files

We have recently upgraded from on-premises TFS2013 to 2015 Update1, and we have set up a VSO Build Agent.

I am now trying to set up a test (continuous integration) vNext build for a solution in our Git repository, but the builds are not running and not producing any logs.

The build properties have been set up to indicate the correct Git repo, and the following three have been added to Variables: VSO_GIT_USERNAME, VSO_GIT_PASSWORD, DNXPath. MSBuild is the only step added to the build at the present.

Showing MSBuild Step

Pushed commits result in builds being triggered as expected, but when a build is triggered, it just hangs "Waiting for console output from an agent":

Waiting for build agent

There doesn't seem to be anything wrong with the agent:

  • it is shown as running (checked in services.msc)
  • it has no SSL dependencies
  • port 9191 has been added to Inbound rules in TFS server firewall
  • the agent is running with "Project Collection Build Service" privileges
  • the agent appears green in Web access:

enter image description here

When I cancel the build and download log files, the zip file is empty.

The same happens when I queue a build manually (against a specific commit #): no build runs and no log files.

What should I do/check to either make my build progress or make it produce log files?

Can anybody suggest a way forward?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Ok, solution found! In my particular case I set up port 9191 using Firewall interface (Windows Server 2012 R2), and the inbound rule for it looked nice and active. But it lied.

When I asked a good colleague of mine, Marc, to check if the port was really ok, he ran Get-NetFirewallPortFilter in PowerShell on the TFS machine and my port was missing from the list!

The solution he suggested was to run the following PowerShell script (since Firewall was playing up):

   $port = New-Object -ComObject HNetCfg.FWOpenPort
   $port.Port = 9191
   $port.Name = 'TFS CI Port:9191'
   $port.Enabled = $true

   $fwMgr = New-Object -ComObject HNetCfg.FwMgr
   $profile = $fwMgr.LocalPolicy.CurrentProfile
   $profile.GloballyOpenPorts.Add($port)

Once this was run, an inbound rule for port 9191 appeared in Firewall inbound rules.

I then manually queued the build, and for the first time saw it fail (not hang!), and with log files at that! :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...