问题
I am using the download artifact plugin in VSTS to get the specific artifact of different build def using the current build definition.I am unable to download the artifact to my local agent (I installed private agent).
Error below is throwing:
[12-01-2018 PM 01:30] Shwetha Rattihalli: 2018-01-11T07:23:53.7178634Z ##[section]Starting: Download Build Artifacts 2018-01-11T07:23:53.7385942Z ============================================================================== 2018-01-11T07:23:53.7386234Z Task : Download Build Artifacts 2018-01-11T07:23:53.7386451Z Description : Download Build Artifacts 2018-01-11T07:23:53.7386670Z Version : 0.127.5 2018-01-11T07:23:53.7386874Z Author : Microsoft Corporation 2018-01-11T07:23:53.7387214Z Help : 2018-01-11T07:23:53.7387484Z ============================================================================== 2018-01-11T07:23:55.4791903Z ##[error]Build with id NaN not found for build definition id 6 2018-01-11T07:23:55.4807213Z ##[section]Finishing: Download Build Artifacts
!
回答1:
For the Download Build Artifacts task, you need to specify the build manually since the task has no such settings to "get Latest artifacts" for now. And you can also follow up the issue Download Build Artifacts (Preview) not able to get latest build of a specific build definition.
If you want to get the latest build artifacts for a build definition, you can use the Fetch Build Artifacts task instead.
This task can get the latest build artifacts from the specified build definition:
Note: you should Enable Allow scripts to access OAuth token in your agent phase.
来源:https://stackoverflow.com/questions/48221922/download-build-artifacts-in-vsts-not-able-to-get-latest-build-of-a-specific-buil