MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
442 stars 155 forks source link

Implement -VSTeamEnvironment #488

Open mnieto opened 1 year ago

mnieto commented 1 year ago

Proposal

I wanted to create Add, Get, Remove, Update -VSTeamEnvironment cmdlets API documentation

I have a preview working version of Get-VSTeamEnvironment with this syntax

Get-VSTeamEnvironment [-Id] -ProjectName

Discussion

When I went to the types folder to add the Environment type, I found that already exists a type definition in vsteam_lib.Environment.ps1xml that corresponds with the Release environment type

Solved Problem

Environments are an important piece in the deploy jobs in the yaml pipelines Implementing this cmdlets opens the opportunity to implement also getting the list of deployments into an specific environment

Additional info / code snippets?

No response

jikuja commented 1 year ago

I suggest also adding support for role assignments(for environment security) to circumvent some problems(1) Azure devops has: *https://dev.azure.com/{organization}/_apis/securityroles/scopes/distributedtask.globalenvironmentreferencerole/roleassignments/resources/{something}

(1) https://developercommunity.visualstudio.com/t/Environments-Permissions-changing-not-po/872257