azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

[Feature Request] Artifacts: inspecting directory structure & download specifiers?

Open anlsh-msft opened this issue 5 years ago • 3 comments

The Problem

Our team is using Azure DevOps to manage our builds, and every so often needs to download artifacts from pipelines. We wanted a CLI for doing so, and some research turned up the Azure CLI.

However, it doesn't look like the CLI has all the functionality which the DevOps website does.

For one, the website can detect whether an uploaded artifact is a folder, and will allow you to navigate the tree structure to download specific parts of the artifact. To illustrate, each folder has an individual download option on the UI

devops-ui

However, from what I can tell neither the Azure CLI nor the REST API supports this functionality. The list and download commands only work with the top-level files/folders themselves, and if an artifact is a folder then there's no way to download sub directories without downloading the entire thing.

Proposed Solution

It would be very nice if we could do something like an az pipelines runs artifact tree --run-id 9999 to get output something like what GNU tree would produce. It would also be very nice to be able to download files via pattern matching, eg

az pipelines runs artifact download --run-id 9999 --outfile outfile artifact1/log.txt

at minimum and ideally things like

az pipelines runs artifact download --run-id 9999 --outfile outfile artifact1/*.txt

Hopefully I'm not missing existing functionality? And if not, would you consider adding this?

anlsh-msft avatar Aug 24 '20 20:08 anlsh-msft

any updates on this?

romoh avatar Mar 15 '24 01:03 romoh

any updates on this?

LiliDeng avatar Mar 28 '24 14:03 LiliDeng