It is possible to create multiple drops in a new TFS 2015 build or in VS Team Services build. This is useful when you want to do a single build but want to have separate drops(artifacts), for different deployment purposes.
One such example is
- Artifact Drop for deployment of a website
- Artifact Drop to contain test automation dlls, and required scripts to run test automations, after successful deployment.
In this situation the deployment happens in a web hosting server and the release agent used there is not going to run the test automations. The agent running test automations will be a separate agent, configured in test client(s), administering machine.
- Drop to deploy web server
- Artifact Drop to deploy to a CRM server or to a Database Server
Same as above it could be two different release agents configured in two different machines, which does not need others build artifact.
But with the above requirement in mind, it is always advisable to build all components, in a single build to make sure the version is properly built and in sync.
Is it possible to have multiple build artifacts in a single build?
Next Challenge: Download the only required artifact to the relevant release agent.
With the out of the box functionality in TFS 2015.3 or with VS Team Services currently this is not possible. It does not allow to filter for a given artifact when downloading. Only option is skip download (no artifacts download) or download all artifacts.
How to download only required artifact?
A new extension with capability to filter for named build artifacts and download only them is created. The code is available in here. The extension “Chamindac.vsts.release.task.download-artifacts” is available in VSTS Marketplace. Usage of extension is explained in this post “VSTS Release Task – Download Artifacts – Filter for Given Artifact Name(s)”