您如何将文件作为发行版的一部分发布回VSTS发行管理? [英] How do you publish files back to VSTS Release Management as part of a release?

查看:103
本文介绍了您如何将文件作为发行版的一部分发布回VSTS发行管理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在部署过程中上载由第三方exe创建的日志文件,并将其包含在部署结果中,如果可能,请在单独的选项卡上.

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.

我尝试了记录任务,但是##vso[build.uploadlog]<local file path>似乎也用于构建,因为它抱怨要为构建找到容器.

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:

Write-host "##vso[task.uploadfile]<filename>"

查看和下载与发行版关联的附件

View and download attachments associated with releases

您是否要在以下情况上上传其他日志或诊断信息或图像? 在发布中运行任务?此功能使用户可以上传 部署期间的其他文件.要上传新文件,请使用 在脚本中执行以下代理命令:

Would you like to upload additional logs or diagnostics or images when running tasks in a release? This feature enables users to upload additional files during deployments. To upload a new file, use the following agent command in your script:

写入主机"## vso [task.uploadfile]"

Write-host "##vso[task.uploadfile]"

然后该文件可作为发布日志的一部分使用.当你 下载与该发行版关联的所有日志,您将能够 也可以检索此文件.

The file is then available as part of the release logs. When you download all the logs associated with the release, you will be able to retrieve this file as well.

还可以在发行版定义中添加powershell脚本任务,以读取日志文件并将其输出到控制台.然后,您将从日志"选项卡的powershell脚本步骤中看到日志文件的内容.您还可以单击将所有日志下载为zip"以下载日志.

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.

这篇关于您如何将文件作为发行版的一部分发布回VSTS发行管理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆