Azure / azure-cli

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

[pipelines/environments] Ability to automatically create and configure resources #23181

Open jack1902 opened 2 years ago

jack1902 commented 2 years ago

Related command

az pipelines environments resources add/delete/get --env-id ??? - ability to carry out the actions specified on the API (appears to only be visible on 6.0, I can't find the documentation around 7.*

https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/kubernetes?view=azure-devops-rest-6.0

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

relates to: https://github.com/Azure/azure-cli/issues/23180

Deployment jobs are great, but creating the environments and resources that back them is really tedious when using kubernetes resource which map to namespaces (I have a lot of namespaces and I really hate clicking on a UI)

Describe the solution you'd like

Ability to create resources within an environment using serviceConnections (can provide an ID if that works)

Describe alternatives you've considered

Use an alternative platform. I moved away from releases within Azure DevOps as this was very UI driven and really error prone between chart updates and values needing to be passed in (especially secrets). Using deployment jobs has enabled developer to set variables inside variable groups which map to environments and allow things to be done via Pull Requests for increased visibility.

Additional context

I can't seem to locate the API documentation around this for v7, but it exists for v6 which has a raised github issue since March (not entirely sure the linked github repo from the API documentation website is maintained?) https://github.com/MicrosoftDocs/vsts-rest-api-specs/issues/526

yonzhan commented 2 years ago

route to CXP team

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 environments resources add/delete/get --env-id ???` - ability to carry out the actions specified on the API (appears to only be visible on 6.0, I can't find the documentation around 7.* https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/kubernetes?view=azure-devops-rest-6.0 **Is your feature request related to a problem? Please describe.** relates to: https://github.com/Azure/azure-cli/issues/23180 Deployment jobs are great, but creating the environments and resources that back them is really tedious when using kubernetes resource which map to namespaces (I have a lot of namespaces and I really hate clicking on a UI) **Describe the solution you'd like** Ability to create resources within an environment using serviceConnections (can provide an ID if that works) **Describe alternatives you've considered** Use an alternative platform. I moved away from `releases` within Azure DevOps as this was very UI driven and really error prone between chart updates and values needing to be passed in (especially secrets). Using deployment jobs has enabled developer to set variables inside variable groups which map to environments and allow things to be done via Pull Requests for increased visibility. **Additional context** I can't seem to locate the API documentation around this for v7, but it exists for v6 which has a raised github issue since March (not entirely sure the linked github repo from the API documentation website is maintained?) https://github.com/MicrosoftDocs/vsts-rest-api-specs/issues/526
Author: jack1902
Assignees: -
Labels: `Service Attention`, `customer-reported`, `DevOps`, `Pipelines`, `Auto-Assign`
Milestone: -
navba-MSFT commented 2 years ago

Adding Service team to look into this issue.

@v-anvashist, @V-hmusukula Could you please look into this ask and provide an update once you get a chance ?

v-anvashist commented 2 years ago

@jack1902 We have checked the docs and currently we don't have any command support for az pipelines environment.

Below is the doc support for az pipelines

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

jack1902 commented 1 year ago

I'm aware no command exists currently, but considering a bunch of API' are exposed which the console hit, it seems useful to empower CLI users to use the azure cli to create environments and resources within. I believed this issue raised to be more of a "feature request" rather than a question of whether the CLI currently supported it