如何从VSTS发行摘要选项卡中检索构建附件 [英] How to retrieve build attachment from VSTS release summary tab

查看:60
本文介绍了如何从VSTS发行摘要选项卡中检索构建附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从发行摘要页面(ms.vss-releaseManagement-web.release-details-summary-tab)中检索使用(## vso [task.addattachment] value)附加的构建附件.请为实现这一目标的任何参考.

I need to retrieve a build attachment attached using (##vso[task.addattachment]value) from release summary page (ms.vss-releaseManagement-web.release-details-summary-tab). Please point me to any references to achieve this.

先谢谢了.

推荐答案

是的,您需要执行以下操作来获取此信息:

Yes, you need to do followings things to get this:

1.通过 getConfiguration():

var c = VSS.getConfiguration();
c.onReleaseChanged(function (release) {
release.artifacts.forEach(function (art) {
var buildid = art.definitionReference.version.id;
});
});

2.使用您在上一步中获得的内部版本ID通过

2.Use the build ID you get in previous step to get the detailed build information via getBuild(). And then you can get the planid from the build information.

3.使用planid通过

3.Use the planid to get the uploaded file via getPlanAttachments().

这篇关于如何从VSTS发行摘要选项卡中检索构建附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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