startautomating / psdevops Goto Github PK
View Code? Open in Web Editor NEWPowerShell Tools for DevOps
Home Page: https://psdevops.start-automating.com
License: MIT License
PowerShell Tools for DevOps
Home Page: https://psdevops.start-automating.com
License: MIT License
Would like a Set-ADOAreaPathPermissions cmdlet
Generating build steps currently does not support setting name:
or displayName:
, these seems to always be set to the name of the .ps1
file.
Add-adodashboard
has this problem:
https://github.com/StartAutomating/PSDevOps/blob/master/Add-ADODashboard.ps1#L201
Hi James,
Isn't the New-GithubAction function creating a Github Workflow instead of an Github Action?
Shouldn't this function be renamed to New-GithubWorkflow?
/Stefan
"[(?\w+)]| # A name in [] OR" in function
I like to comment my pipeline parameters when writing templates. Please consider adding support for something like this:
param (
# List of required modules to import.
[string[]] $requiredModules
)
โฉ
parameters:
# List of required modules to import.
- name: requiredModules
...
Add-ADOAreaPath does not handle nested paths correctly. Please update with fix.
Looks like an "accumulation bug". The 2nd+ item piped in complains that Get-ADOField doesn't have a -URI. -URI comes from $invokeParams, which is modified during the end block but not reset after each invocation (thus getting polluted).
*-ADOWorkItem commands should support Shared Queries
When generating a yml file for a work flow, order properties logically in terms of the code readability, e.g.
steps:
- name: InstallPester
shell: pwsh
env:
PesterMaxVersion: ${{secrets.PesterMaxVersion}}
run: |
shell and env are important metadata that give context to "run" and since run is arbitrarily long, you can easily find the other properties if they come first.
The underlying REST api uses $top and $skip, which are not exposed. Additionally, and annoyingly, the underlying API does not provide a continuation token itself.
This prevents piping the command back to itself to -Download a file.
In order to facilitate the use of Artifact Feeds as a place to store PowerShell modules, a command that can Register artifact feeds as a PSRepository would be nice.
We're looking to synchronize the work items in Azure DevOps with another system that we cannot control, and we're thinking that we can use your module to do so. I'm going to start exploring the Wiql - Query By Wiql endpoint to make that work in our organization.
I thought I'd simultaneously open this issue since I noticed that PSDevOps does not have a Get-WorkItemQueryResult cmdlet. I'm not sure if the stub I build out will be helpful but wanted to get your thoughts on the feasibility of adding this cmdlet to your module.
Are you interested in that sort of contribution? Also any hints as I start setting up a development environment?
When the HTTP Result has a blank message, this creates a less helpful error.
Try to add a team to a group. Invoke-ADORestAPI returns:
"Invoke-ADORestAPI : The remote server returned an error: (411) Length Required.
At C:\Users\user\Documents\WindowsPowerShell\Modules\PSDevOps\0.4.5\Add-ADOTeam.ps1:135 char:13
Invoke-ADORestAPI @invokeParams"
Adding an else clause into Invoke-ADORestAPI with the following line "$WebRequest.ContentLength = 0" seems to fix it.
The REST api does allow spaces.
It would be nice to be able to edit the layout of a given work item type using cmdlets.
Would like a cmdlet for creating custom work processes allowing the setting of Process Description
This would be helpful for testing.
Running Connect-ADO -Organization ayn
without credentials or PAT looks like it connected successfully. However, Get-ADOWorkItem -Organization ayn -Project PowerShell -Query 'Select [System.ID] from WorkItems'
fails with error below
Invoke-ADORestAPI : Response was HTML, Request Failed.
At C:\Users\ayan\Documents\PowerShell\Modules\psdevops\0.5.3\Get-ADOWorkItem.ps1:240 char:29
+ $queryResults = Invoke-ADORestAPI @invokeParams |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (
<!DOCTYPE h...ody>
</html>
:String) [Invoke-ADORestAPI], Exception
+ FullyQualifiedErrorId : ResultWasHTML,Invoke-ADORestAPI
...even though this is a public project and accessible online without authentication. PFB link
https://dev.azure.com/ayn/PowerShell/_workitems
When I Connect-ADO
with a PAT it works fine. Is there a way to connect anonymously like on can thru the browser, or does one need to log in even for public projects?
The request does not need body parameters. And the parameters are populated incorrectly. I was able to get it working by calling $invokeParams.Body.Remove('parameters') before the request.
Hi,
It might be good to have getting started section with an example connection and listing of certain features.
Also are there any prerequisites in terms of version of PowerShell or any other feature or dependencies on certain tool/packages.
Thanks
I would be very convenient if the module could add and remove agent pools, using commands like New-ADOAgentPool
and Remove-ADOAgentPool
.
Similarly, it would be very helpful to be able to remove agents from a pool. For example, when a self-hosted agent VM has been decommissioned. A command for that could be Remove-ADOAgent
.
Of course I don't expect you to just implement this. Everyone has a very busy schedule. It's just an idea for some new features that would certainly be useful for me. In any way, thanks and keep on doing the good work ๐
When using YML arrays in a PowerShell step you need to convert it into a array by doing, as far as I know, something like this:
$requiredModules = "${{ join(';',parameters.requiredModules) }}" -split ';' | Where-Object { $_ }
join
function... | Where-Object { $_ }
to get rid of any null
values (added if passing in []
)Currently the output generated looks something like this:
$parameters.requiredModules -split ';' -replace '^[''"]' -replace '[''"]$'
I'm having an issue tracking the picklist ID associated with a field. I am looking for a way to programmatically update picklists and finding this picklist ID given a process ID and field name would help do the trick.
Would like a new cmdlet to create and update custom work item states in custom process templates
Various endpoints of Azure DevOps require BuildID or DefinitionID but do not return this data directly.
Get-ADOBuild should be improved so that .BuildID and .DefinitionID are always carried on when possible.
It would be nice to be able to retrieve a specific pull request by ID using Get-ADORepository
. Perhaps something like this:
Get-ADORepository -PullRequest -PullRequestID 341
Hi,
I do not see Get User-Entitlement from azure devops API being support here. Can you please add them
Ref: Get-UserEntitlement
TQ
In order to see the "hidden" Wiki repo for a project, it could prove useful to have the option to -IncludeHidden for the Get-ADORepository function.
As a workaround, repo that is hidden can be accessed through the REST API:
$myUri = 'https://dev.azure.com/.../_apis/git/repositories?api-version=6.0&includehidden=true'
Invoke-ADORestAPI -Uri $myUri | Out-GridView
It appears that it is unrolling each byte. This will take a while. It would be better to directly return a byte[] before any results are unrolled.
Set-ADOPermission gives a rather raw view of a complicated API. It would be nicer if individual objects could be piped to Set-ADOPermission in order to secure them (much as Get-ADOPermission can get permissions related to a repo)
I would like to pitch the idea of implementing a Set-ADOParameter cmdlet/function.
Set-ADOParameter -Organization OrgName -Project ProjName -ApiVersion 5.1 -PersonalAccessToken "1232423421...." -BranchName "$/Financials/Trunk/Development"
It would then create new variables, that would last for the current session. We would then update the cmdlets/functions to have default values, which would be the names of the variables.
E.g.
function Get-ADOBuild
{
...
[Parameter(ValueFromPipelineByPropertyName)]
[Alias('Org')]
[string]
$Organization = $Script:PsDevOpsOrganization,
[Parameter(ValueFromPipelineByPropertyName)]
[string]
$Project = $Script:PsDevOpsProject,
[Parameter(ParameterSetName='build/builds')]
[string]
$BranchName = $Script:PsDevOpsBranchName,
[Alias('PAT')]
[string]
$PersonalAccessToken = $Script:PsDevOpsPersonalAccessToken,
[string]
$ApiVersion = $Script:PsDevOpsPersonalAccessToken,
}
Afterward calling the Get-ADOBuild cmdlet/function would be as slim as
Get-ADOBuild
If you need to override the different parameters, even after setting the parameters in the same session, you can simply override the value by using the parameters for each cmdlet/function.
I believe it would increase the user experience and make it easier for people to start using the module, because they can reduce the bloat in their console and scripts, while still having all the benefits from the module.
This function needs a parameter for the personal access token. Also, can you incorporate passing a field name to this as well, see: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/fields/get?view=azure-devops-rest-6.0
This makes this parameter set unusable.
The Release Name is currently locked to the imported module name, It would be nice if the Release Name could be customizable.
Cache occurs too early
This causes an ambiguity between parameter sets which errors out some tests.
@cjboden I'll take care of fixing this (I think your tests didn't end up running it because you wouldn't be able to see repos). If you end up adding more, make sure each new parameter set has at least one unique "key" parameter that lets PowerShell know which parameter set it could use.
Add a new Set-ADOTeamAdmin to PSDevOps. This will allow an admin group from another Project, as well as individual users, to be added as a Team Administrator
Hello PSDevOps Team,
I am Verly glad to find a module to manage Azure DevOps, I am trying to get a list of users at the Org level.
but I am hitting an error while I run the following command. I am running it in 7.2.0-preview.10
. I am successfully connected to the organization by running Connect-ADO
. and have right privileges too.
Get-ADOUser -Organization <my-org-name>
Thanks once again for your AWESOME work :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.