So I have ADO set up to build my solution whenever I push or merge changes into the master branch, and it generates an artifact, but the path to that artifact changes with every build. Is there any way to create a permalink which always points to the latest build artifact so I can share it with folks without having to either have them click through a bunch of links from the build list or give them a new link every time there is a new build?
To clarify: let's say I have build 1, and the URL is http://azure.com/build/1/artifact or something like that. Now I push some changes and I get build 2 at http://azure.com/build/2/artifact. So I have to update everywhere I'm linking to build 1 to share the app to link to build 2 instead. I'm looking for some sort of http://azure.com/build/latest/artifact which always points to the latest build.
Something like this?
https://dev.azure.com/{orgname}/{project}/_apis/build/latest/{pipeline-name}?api-version=5.1-preview.1
https://learn.microsoft.com/en-us/rest/api/azure/devops/build/latest/get?view=azure-devops-rest-5.1
This will get you the latest build id,
and then, https://learn.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/get%20artifact?view=azure-devops-rest-5.1
With that ID you can then get the artifact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With