Automatically place drop in source control folder - VSO BuildAsk Question

问题:

I am building my solution in Visual Studio Online Build, the default 'steps' are build/test/index+publish/publish build artifacts. I want the build to be placed in a folder in my source control (rootfolder/builds). However, I don't see an option to enter an output-path anywhere.

EDIT: I see that next to 'timeline' on the build screen there is the option to view the 'Artifacts', but, I want to see/copy the drop to my TFS online project folder like '$myproject/mybranch/builds/'

回答1:


The option to store the build drop on the TFS server is no longer supported. It was introduced as a temporary measure in 2012 and replaced with server drops in 2013.

Server drops are stored in an unversioned store in TFS/VSO and does not incur the overhead of versioning.

In TFS 2015 this transitioned to the new Artifacts repository. All build output is stored on the server and is accessible in the web, and through an API.

回答2:


The way things stand right now, this is not possible. You have two options to drop your build outputs

  1. Team Foundation Server
  2. UNC file share if you use a on-prem agent.

See the Artifact Type argument on Publish build artifacts.

回答3:


I it is possible with a custom powershell task. I have recently created a powershell build task that could "check-in" your drop artifacts into a folder like $myproject/mybranch/builds.

Have a look : https://github.com/skuvnar/visual-studio-team-services-scripts.

Although its possible, I would suggest against it - could lead to all sorts of trouble with the builds.

标签: msbuild vsts tfsbuild vsts-build
© 2014 TuiCode, Inc.