Add option to collect artifacts in TFS/VSTS extension deployment task
When triggering a deployment from a build system (TFS, VSTS, or other), it may desirable to collect artifacts produced by the deployment (via New-OctopusArtifact) back to the triggering build. For example, when executing integration tests during a deployment triggered from a TFS build, I would like to copy the test results back to the triggering build for publishing within TFS.
The above can currently be done after the deployment has completed. However, it is challenging to ensure that the correct artifacts are collected since the deployment ID needs to be inferred rather than being well-known as it is within the "Deploy Octopus Release" task. (Also, this needs to be done from an extension in TFS/VSTS rather than a PowerShell task in order to have access to the registered service endpoints.) Other approaches such as pushing from Octopus to the build system or using a drop folder approach are certainly feasible, but they have their own challenges, and they involve additional infrastructure and/or credential management burdens.
Allowing copying of artifacts to a local folder in the TFS/VSTS extension deployment task would avoid the above problems and allow information produced during the deployment to be more easily integrated into the build results.