How to retrieve build attachment from VSTS release summary tab

試著忘記壹切 提交于 2019-12-25 16:43:49

问题


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.

Thanks in advance.


回答1:


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

1.Get the related build id of the release via getConfiguration():

var c = VSS.getConfiguration();
c.onReleaseChanged(function (release) {
release.artifacts.forEach(function (art) {
var buildid = art.definitionReference.version.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.Use the planid to get the uploaded file via getPlanAttachments().



来源:https://stackoverflow.com/questions/39351807/how-to-retrieve-build-attachment-from-vsts-release-summary-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!