I'm trying to upload log files created by a 3rd party exe during a deployment and including it in the results of my deployment, on a separate tab if possible.
I tried using the publish artifact build tasks but that only works for build not release.
I tried logging tasks but ##vso[build.uploadlog]<local file path>
seems to be for builds as well since it complains about finding a container for the build.
Release management does not have a container for build artifacts, that's why you see this error message.
You can try with following task:
You can also add a powershell script task in your release definition to read the log files and output it to the console. Then you will be see the content of the log files from "Logs" tab powershell script step. And you can also click "Download all logs as zip" to download the logs.
@DonRolling, thanks for the detailed answer. In my case instead of adding a new task to compress the folder i just included that part in the powershell:
I was facing a similar problem but I also wanted to use the Artifacts in a subsequent agent phase.
Based on the previous answers I created an Extension that offers the possibility to:
The upload task is making use of the logging command as it was mentioned before. The download task then queries the Azure DevOps REST Api to download all logs collected thus far, tries to find the specified artifact and copies it to a specific place.
If anyone is interested, it can be found on the Marketplace
I hope to provide more clarity to those looking for an answer. The accepted answer does work.
I had a lot of files (browser screenshots) to add to the release logs. Here's what I did:
If you have lots of files, Archive them into a zip.
Attach the zip to the log files via powershell.
Download the logs
Unzip and enjoy!