0
votes

I am attempting to download a build artifact using Download Build Artifacts (Preview).

For the most part this Task is working and I am able to select which Project, Build definition and Build (e.g. 20180208.1) in the Edit Build Definition.

I would like to specify the Build as a variable however I can't seem to get it working.

I have created a variable BuildId with the value 20180208.1 Then trying to reference it within the task as $(BuildId). When I run it the build fails and the error logs show the following

2018-02-08T22:53:31.3627241Z ##[error]Build with id 20180208 not found

Note that the error is missing the .1 from the end of the value. BuildId

Any and all help is very much appreciated :-D
Thanks

1

1 Answers

1
votes

The value "20180208.1" is the build number for the build and it is just the display value in the drop-down list. The actual selected value should be build id. If you enable the Fiddler trace and then refresh the drop-down list, you'll get this:

{"result":["{ \"Value\" : \"2274\", \"DisplayValue\" : \"20180212.1\" }"],"statusCode":"ok","errorMessage":""}

So you need to set the value of the variable to Build ID rather than Build Number. In my example, set the variable to "2274" instead of "20180212.1".