Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

az pipelines run set parameters #19732

Open MartinGolding515 opened 3 years ago

MartinGolding515 commented 3 years ago

I have 2 yaml pipelines in different repos within the same project and cannot trigger one from the other as per the documentation.

I've tried changing default branches (which isn't a viable long-term solution) and published artifacts (which isnt required as it uses helm repo). The only way I could do it it to call 'az pipelines run' from the upstream branch. I can use resources:pipelines in the downstream pipeline to create an 'associated pipelines' reference in the upstream branch. However, the reference is created in the previously upstream run, not the current run which calls 'az pipelines run'.

I am hoping to use resources:pipelines:version to ensure the current build is referenced but this does not accept variables from az pipelines run. It is suggested that it will accept parameters so I would like to use that.

The Azure DevOps Services REST API supports parameters but I would prefer to use az cli: https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run-pipeline?view=azure-devops-rest-6.0

Please add support for setting parameters in az pipelines run command.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

Issue Details
I have 2 yaml pipelines in different repos within the same project and cannot trigger one from the other as per the documentation. I've tried changing default branches (which isn't a viable long-term solution) and published artifacts (which isnt required as it uses helm repo). The only way I could do it it to call 'az pipelines run' from the upstream branch. I can use resources:pipelines in the downstream pipeline to create an 'associated pipelines' reference in the upstream branch. However, the reference is created in the previously upstream run, not the current run which calls 'az pipelines run'. I am hoping to use resources:pipelines:version to ensure the current build is referenced but this does not accept variables from az pipelines run. It is suggested that it will accept parameters so I would like to use that. The Azure DevOps Services REST API supports parameters but I would prefer to use az cli: https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run-pipeline?view=azure-devops-rest-6.0 Please add support for setting parameters in az pipelines run command. --- #### Document Details ⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.* * ID: 66f0311f-8316-ea52-6171-9eb14b9f7bc7 * Version Independent ID: e79f2bc9-543d-9a14-a08c-911d037e108a * Content: [az pipelines](https://docs.microsoft.com/en-us/cli/azure/pipelines?view=azure-cli-latest) * Content Source: [latest/docs-ref-autogen/pipelines.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/pipelines.yml) * GitHub Login: @rloutlaw * Microsoft Alias: **routlaw**
Author: MartinGolding515
Assignees: -
Labels: `Service Attention`, `customer-reported`, `DevOps`, `Pipelines`
Milestone: -
yonzhan commented 3 years ago

route to service team