Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

Please add Azure DevOps Pipeline Release Status CLI #23304

Open dilippanwar1 opened 2 years ago

dilippanwar1 commented 2 years ago

Related command az pipelines release

Is your feature request related to a problem? Please describe. am triggering a release through az pipelines release create CLI and I want to poll for the release status. This will help in updating the release status at remote

Describe the solution you'd like az pipelines build list --status <accepted values: all, cancelling, completed, inProgress, none, notStarted, postponed> or az pipelines runs list which is already have a way to check the running build status. In a similar way, there must be an arguement to track the release status.

Describe alternatives you've considered There is no direct way of doing it but for now, I can do it with below commands
az pipelines release definition show --id <release pipeline id> --query environments[0].currentRelease.url -o tsv Above cmd will give Job URL like https://vsrm.dev.azure.com/<org>/<project_id>/_apis/Release/releases/<release_number> To access the above URL, we need to authenticate with az devops PAT auth=$(echo -n "pat:<PAT>" | base64) wget "https://vsrm.dev.azure.com/<org>/<project_id>/_apis/Release/releases/<release_number>" --header "Authorization: Basic $auth" -q -O - | jq -r .environments[].status

Additional context Not Applicable

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.

Issue Details
**Related command** az pipelines release **Is your feature request related to a problem? Please describe.** am triggering a release through az pipelines release create CLI and I want to poll for the release status. This will help in updating the release status at remote **Describe the solution you'd like** az pipelines build list --status or az pipelines runs list which is already have a way to check the running build status. In a similar way, there must be an arguement to track the release status. **Describe alternatives you've considered** There is no full proof alternative. As of now, I have to put a sleep for couple of mins and then I have to assume that release has been completed with success code **Additional context** Not Applicable
Author: dilippanwar1
Assignees: -
Labels: `Service Attention`, `customer-reported`, `DevOps`, `Pipelines`, `Auto-Assign`
Milestone: -
navba-MSFT commented 2 years ago

Removing CXp attention and adding Service team to look into this issue.

@v-anvashist, @V-hmusukula Could you please look into this and provide an update ?

yonzhan commented 2 years ago

route to service team

sunnybhambhani commented 2 years ago

+1, much needed.

v-anvashist commented 2 years ago

@sunnybhambhani We are consuming API's in CLI service and not able to find this feature support in API doc of az pipelines release

https://docs.microsoft.com/en-us/cli/azure/pipelines/release/definition?view=azure-cli-latest

Do we have any API doc on this feature please let us know?