Azure / Azure/azure-cli

Support setting parameters through the "az pipelines run" CLI command

Open
#17,300 6 comments 4 reactions 0 assignees View on GitHub
act-platform-engineering-squad DevOps Pipelines Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**

My main blocker right now, is that the `pipelines` extension for the Azure CLI doesn't have an argument for setting the pipeline's parameters. You can set variables with the `--variables` switch, but not parameters.

For example, I can run the following command:

az pipelines run --id `[pipeline_id]` --variables "var1=value1"

It's fine, if the pipeline only uses [variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-variables-in-pipeline) during its execution. However, our pipelines make use of [parameters](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#parameters) and they require to be set in order for the pipeline to succeed. I'm thus looking for something like this:

az pipelines run --id `[pipeline_id]` --parameters "param1=value1"

**Describe the solution you'd like**

I'd like to have an additional `--parameters` argument for setting the parameters. Or any other way to do that through the `pipelines` extension.

**Describe alternatives you've considered**

I've tried passing parameters through the `--variables` argument, but that didn't work.

A possible workaround is setting the default value of a parameter to a pipeline's variable, but that's far from ideal and I'm not sure if it covers all use cases.

**Additional context**

N/A

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.