Azure / Azure/azure-cli

Add support for downloading a specific part/path of a pipeline artifact

Open
#29,877 3 comments 2 reactions 0 assignees View on GitHub
act-platform-engineering-squad Auto-Assign customer-reported DevOps Pipelines Service Attention Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
```
$ az pipelines runs artifact download
```

**Is your feature request related to a problem? Please describe.**
Let's consider an artifact published under a pipeline. The artifact, say `Foo`, contains multiple versions of `Foo` which are targeted to different OS flavors. I'm trying to download a specific platform version of `Foo`, say `Foo-windows-x64`, from the pipeline using the aforementioned command. But there's no way for me to do this since the only argument the command seems to accept is the artifact name (`Foo` in this case). I'd like to avoid downloading the whole thing since it's large (~500MB vs 87MB for the actual portion I need).

**Describe the solution you'd like**
I can download just the relevant part on the ADO portal. See image below.
![image](https://github.com/user-attachments/assets/cb3992e0-8683-4ca3-bb13-af96952006bb)

So I assume this is technically feasible and just a matter of adding another argument to the above command which would specify a particular path I want to download. e.g.,
```
$ az pipelines runs artifact download --org my-org --project my-proj --run-id 1234 --artifact-name `Foo` --sub-path ".\Foo-windows-x64"
```

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.