diff --git a/AzureDevOpsPowerShell/Public/Api/Build/GeneralSettings/Set-AzDOProjectSetting.ps1 b/AzureDevOpsPowerShell/Public/Api/Build/GeneralSettings/Set-AzDOProjectSetting.ps1 index caf106d8..d20bc3b3 100644 --- a/AzureDevOpsPowerShell/Public/Api/Build/GeneralSettings/Set-AzDOProjectSetting.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Build/GeneralSettings/Set-AzDOProjectSetting.ps1 @@ -7,7 +7,6 @@ function Set-AzDoProjectSetting { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = "Project01" EnforceJobAuthScope = $true EnforceJobAuthScopeForReleases = $true diff --git a/AzureDevOpsPowerShell/Public/Api/Core/Projects/Get-AzDoProject.ps1 b/AzureDevOpsPowerShell/Public/Api/Core/Projects/Get-AzDoProject.ps1 index 4bbb3868..d45897ed 100644 --- a/AzureDevOpsPowerShell/Public/Api/Core/Projects/Get-AzDoProject.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Core/Projects/Get-AzDoProject.ps1 @@ -7,7 +7,6 @@ function Get-AzDoProject { .EXAMPLE $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" } Get-AzDoProject @params @@ -16,7 +15,6 @@ function Get-AzDoProject { .EXAMPLE $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = 'Project1' } Get-AzDoProject @params @@ -26,7 +24,6 @@ function Get-AzDoProject { .EXAMPLE $params = @{ collectionuri = "https://dev.azure.com/contoso" - PAT = "***" } $somedifferentobject = [PSCustomObject]@{ ProjectName = 'Project1' @@ -38,7 +35,6 @@ function Get-AzDoProject { .EXAMPLE $params = @{ collectionuri = "https://dev.azure.com/contoso" - PAT = "***" } @( 'Project1', diff --git a/AzureDevOpsPowerShell/Public/Api/Core/Projects/Remove-AzDoProject.ps1 b/AzureDevOpsPowerShell/Public/Api/Core/Projects/Remove-AzDoProject.ps1 index 6b78c5ac..535385c5 100644 --- a/AzureDevOpsPowerShell/Public/Api/Core/Projects/Remove-AzDoProject.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Core/Projects/Remove-AzDoProject.ps1 @@ -5,15 +5,15 @@ function Remove-AzDoProject { .DESCRIPTION Function to create an Azure DevOps project .EXAMPLE - New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" + New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" This example creates a new private Azure DevOps project .EXAMPLE - New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" -Visibility 'public' + New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Visibility 'public' This example creates a new public Azure DevOps project .EXAMPLE - @("MyProject1","Myproject2") | New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" + @("MyProject1","Myproject2") | New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" This example creates two new Azure DevOps projects using the pipeline. diff --git a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Add-AzDoVariableGroupVariable.ps1 b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Add-AzDoVariableGroupVariable.ps1 index 1293b5bd..861b070f 100644 --- a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Add-AzDoVariableGroupVariable.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Add-AzDoVariableGroupVariable.ps1 @@ -9,7 +9,6 @@ function Add-AzDoVariableGroupVariable { $splat = @{ CollectionUri = 'https://dev.azure.com/ChristianPiet0452/' ProjectName = 'Ditproject' - PAT = '*******************' VariableGroupName = @('Group1', 'Group2') Variables = @{ test = @{ diff --git a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Get-AzDoVariableGroup.ps1 b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Get-AzDoVariableGroup.ps1 index 05e6b296..56a54078 100644 --- a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Get-AzDoVariableGroup.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Get-AzDoVariableGroup.ps1 @@ -8,7 +8,6 @@ function Get-AzDoVariableGroup { .EXAMPLE $params = @{ Collectionuri = 'https://dev.azure.com/weareinspark/' - PAT = '*******************' ProjectName = 'Project 1' VariableGroupName = 'VariableGroup1','VariableGroup2' } diff --git a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/New-AzDoVariableGroup.ps1 b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/New-AzDoVariableGroup.ps1 index f21f93a6..be185dce 100644 --- a/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/New-AzDoVariableGroup.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/New-AzDoVariableGroup.ps1 @@ -8,7 +8,6 @@ function New-AzDoVariableGroup { .EXAMPLE $params = @{ Collectionuri = 'https://dev.azure.com/weareinspark/' - PAT = '*******************' ProjectName = 'Project 1' VariableGroupName = 'VariableGroup1' Variables = @{ test = @{ value = 'test' } } diff --git a/AzureDevOpsPowerShell/Public/Api/Environments/Environments/Get-AzDoEnvironment.ps1 b/AzureDevOpsPowerShell/Public/Api/Environments/Environments/Get-AzDoEnvironment.ps1 index 37295013..2ab01a6d 100644 --- a/AzureDevOpsPowerShell/Public/Api/Environments/Environments/Get-AzDoEnvironment.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Environments/Environments/Get-AzDoEnvironment.ps1 @@ -7,7 +7,6 @@ function Get-AzDoEnvironment { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Policy 1" RepoName = "Repo 1" ProjectName = "Project 1" diff --git a/AzureDevOpsPowerShell/Public/Api/Environments/Environments/New-AzDoEnvironment.ps1 b/AzureDevOpsPowerShell/Public/Api/Environments/Environments/New-AzDoEnvironment.ps1 index 02afc847..1c809c5e 100644 --- a/AzureDevOpsPowerShell/Public/Api/Environments/Environments/New-AzDoEnvironment.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Environments/Environments/New-AzDoEnvironment.ps1 @@ -7,7 +7,6 @@ function New-AzDoEnvironment { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Policy 1" RepoName = "Repo 1" ProjectName = "Project 1" diff --git a/AzureDevOpsPowerShell/Public/Api/Git/Pushes/Add-FilesToRepo.ps1 b/AzureDevOpsPowerShell/Public/Api/Git/Pushes/Add-FilesToRepo.ps1 index cc68c490..c9652ddc 100644 --- a/AzureDevOpsPowerShell/Public/Api/Git/Pushes/Add-FilesToRepo.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Git/Pushes/Add-FilesToRepo.ps1 @@ -7,7 +7,6 @@ function Add-FilesToRepo { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Repo 1" ProjectName = "Project 1" } diff --git a/AzureDevOpsPowerShell/Public/Api/Git/Repositories/Get-AzDoRepo.ps1 b/AzureDevOpsPowerShell/Public/Api/Git/Repositories/Get-AzDoRepo.ps1 index 13a2bd8c..e56cdee2 100644 --- a/AzureDevOpsPowerShell/Public/Api/Git/Repositories/Get-AzDoRepo.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Git/Repositories/Get-AzDoRepo.ps1 @@ -7,7 +7,6 @@ function Get-AzDoRepo { .EXAMPLE $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = "Project 1" Name "Repo 1" } @@ -17,7 +16,6 @@ function Get-AzDoRepo { .EXAMPLE $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = "Project 1" Name "Repo 1" } @@ -27,7 +25,6 @@ function Get-AzDoRepo { .EXAMPLE $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name "Repo 1" } get-AzDoProject -pat $pat -CollectionUri $collectionuri | Get-AzDoRepo -PAT $PAT diff --git a/AzureDevOpsPowerShell/Public/Api/Git/Repositories/New-AzDoRepo.ps1 b/AzureDevOpsPowerShell/Public/Api/Git/Repositories/New-AzDoRepo.ps1 index 0e775260..b6e30d63 100644 --- a/AzureDevOpsPowerShell/Public/Api/Git/Repositories/New-AzDoRepo.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Git/Repositories/New-AzDoRepo.ps1 @@ -7,7 +7,6 @@ function New-AzDoRepo { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Repo 1" ProjectName = "Project 1" } @@ -15,7 +14,6 @@ function New-AzDoRepo { This example creates a new Azure DevOps repo with splatting parameters .EXAMPLE - $env:SYSTEM_ACCESSTOKEN = '***' 'test', 'test2' | New-AzDoRepo -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" This example creates a new Azure DevOps repo for each in pipeline diff --git a/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/Get-AzDoPipeline.ps1 b/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/Get-AzDoPipeline.ps1 index c6570f12..5f772e25 100644 --- a/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/Get-AzDoPipeline.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/Get-AzDoPipeline.ps1 @@ -7,7 +7,6 @@ function Get-AzDoPipeline { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Policy 1" RepoName = "Repo 1" ProjectName = "Project 1" diff --git a/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/New-AzDoPipeline.ps1 b/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/New-AzDoPipeline.ps1 index 35622e3e..610de1bf 100644 --- a/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/New-AzDoPipeline.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Pipelines/Pipelines/New-AzDoPipeline.ps1 @@ -7,7 +7,6 @@ function New-AzDoPipeline { .EXAMPLE $newAzDoPipelineSplat = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" PipelineName = "Pipeline 1" RepoName = "Repo 1" ProjectName = "Project 1" diff --git a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyBuildValidation.ps1 b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyBuildValidation.ps1 index f64879e4..1fa61362 100644 --- a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyBuildValidation.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyBuildValidation.ps1 @@ -7,7 +7,6 @@ function Set-AzDoBranchPolicyBuildValidation { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" Name = "Policy 1" RepoName = "Repo 1" ProjectName = "Project 1" diff --git a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyCommentResolution.ps1 b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyCommentResolution.ps1 index 590c4bfa..354c2350 100644 --- a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyCommentResolution.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyCommentResolution.ps1 @@ -7,7 +7,6 @@ function Set-AzDoBranchPolicyCommentResolution { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" RepoName = "Repo 1" ProjectName = "Project 1" } diff --git a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMergeStrategy.ps1 b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMergeStrategy.ps1 index a3cf18d8..379f866e 100644 --- a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMergeStrategy.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMergeStrategy.ps1 @@ -7,7 +7,6 @@ function Set-AzDoBranchPolicyMergeStrategy { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" RepoName = "Repo 1" ProjectName = "Project 1" } diff --git a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMinimalApproval.ps1 b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMinimalApproval.ps1 index 4e210a45..4bdaa9de 100644 --- a/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMinimalApproval.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/Policy/Configuration/Set-AzDoBranchPolicyMinimalApproval.ps1 @@ -7,7 +7,6 @@ function Set-AzDoBranchPolicyMinimalApproval { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" RepoName = "Repo 1" ProjectName = "Project 1" } diff --git a/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpointproxy/Test-AzDoServiceConnection.ps1 b/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpointproxy/Test-AzDoServiceConnection.ps1 index f6e0c84e..7290f7ef 100644 --- a/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpointproxy/Test-AzDoServiceConnection.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpointproxy/Test-AzDoServiceConnection.ps1 @@ -7,7 +7,6 @@ function Test-AzDoServiceConnection { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = "Project 1" SubscriptionId = "00000-00000-00000-00000-00000" SubscriptionName = "Subscription 1" diff --git a/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpoints/New-AzDoServiceConnection.ps1 b/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpoints/New-AzDoServiceConnection.ps1 index 6a945a3d..5bd164ff 100644 --- a/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpoints/New-AzDoServiceConnection.ps1 +++ b/AzureDevOpsPowerShell/Public/Api/ServiceEndpoints/Endpoints/New-AzDoServiceConnection.ps1 @@ -7,7 +7,6 @@ function New-AzDoServiceConnection { .EXAMPLE $params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" ProjectName = "Project 1" SubscriptionId = "00000-00000-00000-00000-00000" SubscriptionName = "Subscription 1" diff --git a/README.md b/README.md index 66cedb9e..6209376a 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,19 @@ ## Overview -Automate tasks in Azure DevOps and Azure AD. Works on Windows Linux and MacOS. +Automate tasks in Azure DevOps. Works on Windows, Linux and MacOS. There are a few good open-source projects already going on this topic (Like VS-Team), +but we believe that this project in more user-friendly. ## Installation ```powershell +# PowerShell 7.3 and below +Install-Module -Name AzureDevOpsPowerShellAPI -Scope CurrentUser -Install-Module -Name AzureDevOpsPowerShellAPI -Scope CurrentUser -Repository InSpark -Credential $InSparkAzureDevopsArtifacts - +# PowerShell 7.4 and up +Install-PSresource -Name AzureDevOpsPowerShellAPI -Scope CurrentUser ``` -For more information on how to setup access to our repository, please checkout [our guide](https://weareinspark.github.io/AzureDevOpsPowerShellAPI/about_InstallingModule/). The [source documentation on installation can also be found here](https://github.com/WeAreInSpark/AzureDevOpsPowerShellAPI/blob/main/docs/en-US/about_InstallingModule.md). - ## Basic Usage ### List all Azure DevOps projects @@ -37,7 +38,6 @@ For more information on how to setup access to our repository, please checkout [ ```powershell $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" } Get-AzDoProject @params ``` @@ -45,7 +45,7 @@ Get-AzDoProject @params ### Create an Azure DevOps Project ```powershell -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" +New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" ``` ## Contributing diff --git a/docs/en-US/.pages b/docs/en-US/.pages index 80fea8ad..740c78a0 100644 --- a/docs/en-US/.pages +++ b/docs/en-US/.pages @@ -1,7 +1,7 @@ nav: - Home: - index.md - - ...| about*.md + - ...| About*.md - Modules: - Approvals And Checks: - Check Configurations: @@ -23,9 +23,6 @@ nav: - Add-FilesToRepo.md - Repositories: - ... | *AzDoRepo.md - - Graph: - - Groups: - - Set-AzDoTeamMember.md - Pipelines: - Pipelines: - ... | *AzDoPipeline.md diff --git a/docs/en-US/About_Authentication.md b/docs/en-US/About_Authentication.md new file mode 100644 index 00000000..0f039c2f --- /dev/null +++ b/docs/en-US/About_Authentication.md @@ -0,0 +1,37 @@ +# Authentication + +## Users + +When you use the module locally you only have to log in to your Azure tenant with 'Azure PowerShell'. +The module will then fetch a Access token with `Get-AzAccessToken`. + +```powershell +Connect-AzAccount + +Get-AzDoProject -CollectionUri = "https://dev.azure.com/contoso" +``` + +## Azure resources + +When using the module in for example an Automation Account or an Azure Function you can use the Managed Identity to +give access to the azure DevOps resources. The module can again use the access token to access the resources. + +```powershell +Connect-AzAccount -Identity + +Get-AzDoProject -CollectionUri = "https://dev.azure.com/contoso" +``` + +## Azure DevOps + +When you use Azure DevOps you can use of the Azure DevOps token to authenticate to Azure. Do not forget to disable the protection setting. You can find the docmentation [here](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/access-tokens?view=azure-devops&tabs=yaml#protect-access-to-repositories-in-yaml-pipelines) + +```yaml +steps: + - powershell: | + Set-AzdoPat -Pat "$env:SYSTEM_ACCESSTOKEN" + + Get-AzDoProject -CollectionUri = "https://dev.azure.com/contoso" + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) +``` diff --git a/docs/en-US/Add-AzDoPipelineBranchControl.md b/docs/en-US/Add-AzDoPipelineBranchControl.md deleted file mode 100644 index 2e9a70dc..00000000 --- a/docs/en-US/Add-AzDoPipelineBranchControl.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Add-AzDoPipelineBranchControl - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -Add-AzDoPipelineBranchControl [-CollectionUri] [-ProjectName] [[-PolicyName] ] - [-ResourceType] [-ResourceName] [[-AllowUnknownStatusBranches] ] - [[-AllowedBranches] ] [[-EnsureProtectionOfBranch] ] [[-Timeout] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -``` - -Set-AzDoBranchPolicyBuildValidation @params - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PolicyName -Name of the Build Validation policy. -Default is the name of the Build Definition - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: Branch Control -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceType -The type of Azure DevOps resource to be protected by a build validation policy - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceName -Name of the resource to be protected by a build validation policy - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowUnknownStatusBranches -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowedBranches -Setup an allow list of branches from which a pipeline must be run to access this resource - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: Refs/head/main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnsureProtectionOfBranch -Setup a requirement of branch protection policies for the branch from which a pipeline will be run to access this resource - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Timeout -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: 1440 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### Id = $_.id -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Add-AzDoVariableGroupVariable.md b/docs/en-US/Add-AzDoVariableGroupVariable.md deleted file mode 100644 index eeaee7f0..00000000 --- a/docs/en-US/Add-AzDoVariableGroupVariable.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Add-AzDoVariableGroupVariable - -## SYNOPSIS -This script adds variables to variable groups in a given project. - -## SYNTAX - -``` -Add-AzDoVariableGroupVariable [-CollectionUri] [-ProjectName] [-VariableGroupName] - [-Variables] [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -This script adds variables to variable groups in a given project. -When used in a pipeline, you can use the pre defined CollectionUri, ProjectName and AccessToken (PAT) variables. - -## EXAMPLES - -### EXAMPLE 1 -``` -$splat = @{ - CollectionUri = 'https://dev.azure.com/ChristianPiet0452/' - ProjectName = 'Ditproject' - PAT = '*******************' - VariableGroupName = @('Group1', 'Group2') - Variables = @{ - test = @{ - value = 'test' - } - kaas = @{ - value = 'kaas' - } - } -} -``` - -Add-AzDoVariableGroupVariable @splat - -This example creates a new Variable Group with a variable "test = test". - -### EXAMPLE 2 -``` -$splat = @{ - CollectionUri = 'https://dev.azure.com/ChristianPiet0452/' - ProjectName = 'Ditproject' - VariableGroupName = @('Group1', 'Group2') -} -Get-AzDoVariableGroup @splat | Add-AzDoVariableGroupVariable -Variables @{ test = @{ value = 'test' } } -``` - -This example creates a few new Variable Groups with a variable "test = test". - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the variable group has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -VariableGroupName -Name of the variable group - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Variables -Variable names and values - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSObject -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Add-FilesToRepo.md b/docs/en-US/Add-FilesToRepo.md deleted file mode 100644 index 5e917c0a..00000000 --- a/docs/en-US/Add-FilesToRepo.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Add-FilesToRepo - -## SYNOPSIS -Upload path to a repo in Azure DevOps. - -## SYNTAX - -``` -Add-FilesToRepo [-CollectionUri] [-RepoName] [-ProjectName] [-Path] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Upload path to a repo in Azure DevOps. - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Repo 1" - ProjectName = "Project 1" -} -New-AzDoRepo @params -``` - -This example creates a new Azure DevOps repo with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -'test', 'test2' | New-AzDoRepo -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -``` - -This example creates a new Azure DevOps repo for each in pipeline - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the new repository - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project where the new repository has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Path -Name of the project where the new repository has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $res.name -### RepoId = $res.id -### RepoURL = $res.url -### WebUrl = $res.webUrl -### HttpsUrl = $res.remoteUrl -### SshUrl = $res.sshUrl -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Clear-AzDoAuthHeader.md b/docs/en-US/Clear-AzDoAuthHeader.md deleted file mode 100644 index 5ac492a2..00000000 --- a/docs/en-US/Clear-AzDoAuthHeader.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Clear-AzDoAuthHeader - -## SYNOPSIS -{{ Fill in the Synopsis }} - -## SYNTAX - -``` -Clear-AzDoAuthHeader [] -``` - -## DESCRIPTION -{{ Fill in the Description }} - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None - -## OUTPUTS - -### System.Object -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoBranchPolicy.md b/docs/en-US/Get-AzDoBranchPolicy.md deleted file mode 100644 index 91deef43..00000000 --- a/docs/en-US/Get-AzDoBranchPolicy.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoBranchPolicy - -## SYNOPSIS -A short one-line action-based description, e.g. -'Tests if a function is valid' - -## SYNTAX - -``` -Get-AzDoBranchPolicy [-CollectionUri] [-ProjectName] [[-PolicyName] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -A longer description of the function, its purpose, common use cases, etc. - -## EXAMPLES - -### EXAMPLE 1 -``` -Test-MyTestFunction -Verbose -Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines -``` - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project containing the branch policy - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PolicyName -Name of the Branch Policy - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### System.Collections.ArrayList -## NOTES -Information or caveats about the function e.g. -'This function is not supported in Linux' - -## RELATED LINKS - -[Specify a URI to a help page, this will show when Get-Help -Online is used.]() - diff --git a/docs/en-US/Get-AzDoBranchPolicyType.md b/docs/en-US/Get-AzDoBranchPolicyType.md deleted file mode 100644 index d5a0502d..00000000 --- a/docs/en-US/Get-AzDoBranchPolicyType.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoBranchPolicyType - -## SYNOPSIS -A short one-line action-based description, e.g. -'Tests if a function is valid' - -## SYNTAX - -``` -Get-AzDoBranchPolicyType [-CollectionUri] [-ProjectName] [[-PolicyType] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -A longer description of the function, its purpose, common use cases, etc. - -## EXAMPLES - -### EXAMPLE 1 -``` -Test-MyTestFunction -Verbose -Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines -``` - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the get the branch policy from - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PolicyType -Type of branch policy - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES -Information or caveats about the function e.g. -'This function is not supported in Linux' - -## RELATED LINKS - -[Specify a URI to a help page, this will show when Get-Help -Online is used.]() - diff --git a/docs/en-US/Get-AzDoEnvironment.md b/docs/en-US/Get-AzDoEnvironment.md deleted file mode 100644 index 9acf83d0..00000000 --- a/docs/en-US/Get-AzDoEnvironment.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoEnvironment - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -Get-AzDoEnvironment [-CollectionUri] [-ProjectName] [[-EnvironmentName] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -Set-AzDoBranchPolicyBuildValidation @params -``` - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EnvironmentName -Name of the Build Validation policy. Default is the name of the Build Definition - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### Id = $result.id -### Url = $result.url -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoPipeline.md b/docs/en-US/Get-AzDoPipeline.md deleted file mode 100644 index a7ccf59d..00000000 --- a/docs/en-US/Get-AzDoPipeline.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoPipeline - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -Get-AzDoPipeline [-CollectionUri] [-ProjectName] [[-PipelineName] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -Set-AzDoBranchPolicyBuildValidation @params -``` - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PipelineName -Name of the Build Validation policy. -Default is the name of the Build Definition - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### Id = $result.id -### Url = $result.url -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoProject.md b/docs/en-US/Get-AzDoProject.md deleted file mode 100644 index 05f89024..00000000 --- a/docs/en-US/Get-AzDoProject.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoProject - -## SYNOPSIS -Gets information about projects in Azure DevOps. - -## SYNTAX - -``` -Get-AzDoProject [-CollectionUri] [[-ProjectName] ] [-ProgressAction ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Gets information about all the projects in Azure DevOps. - -## EXAMPLES - -### EXAMPLE 1 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" -} -Get-AzDoProject @params -``` - -This example will List all the projects contained in the collection ('https://dev.azure.com/contoso'). - -### EXAMPLE 2 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = 'Project1' -} -Get-AzDoProject @params -``` - -This example will get the details of 'Project1' contained in the collection ('https://dev.azure.com/contoso'). - -### EXAMPLE 3 -``` -$params = @{ - collectionuri = "https://dev.azure.com/contoso" - PAT = "***" -} -$somedifferentobject = [PSCustomObject]@{ - ProjectName = 'Project1' -} -$somedifferentobject | Get-AzDoProject @params -``` - -This example will get the details of 'Project1' contained in the collection ('https://dev.azure.com/contoso'). - -### EXAMPLE 4 -``` -$params = @{ - collectionuri = "https://dev.azure.com/contoso" - PAT = "***" -} -@( - 'Project1', - 'Project2' -) | Get-AzDoProject @params -``` - -This example will get the details of 'Project1' contained in the collection ('https://dev.azure.com/contoso'). - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the Repos are contained - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSObject with repo(s). -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoRepo.md b/docs/en-US/Get-AzDoRepo.md deleted file mode 100644 index 1b81ad07..00000000 --- a/docs/en-US/Get-AzDoRepo.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoRepo - -## SYNOPSIS -Gets information about a repo in Azure DevOps. - -## SYNTAX - -``` -Get-AzDoRepo [-CollectionUri] [-ProjectName] [[-RepoName] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Gets information about 1 repo if the parameter $Name is filled in. -Otherwise it will list all the repo's. - -## EXAMPLES - -### EXAMPLE 1 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - Name "Repo 1" -} -Get-AzDoRepo -CollectionUri = "https://dev.azure.com/contoso" -PAT = "***" -ProjectName = "Project 1" -``` - -This example will list all the repo's contained in 'Project 1'. - -### EXAMPLE 2 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - Name "Repo 1" -} -Get-AzDoRepo -CollectionUri = "https://dev.azure.com/contoso" -PAT = "***" -ProjectName = "Project 1" -Name "Repo 1" -``` - -This example will fetch information about the repo with the name 'Repo 1'. - -### EXAMPLE 3 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name "Repo 1" -} -get-AzDoProject -pat $pat -CollectionUri $collectionuri | Get-AzDoRepo -PAT $PAT -``` - -This example will fetch information about the repo with the name 'Repo 1'. - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the Repos are contained - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repo to get information about - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSObject with repo(s). -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoServiceConnection.md b/docs/en-US/Get-AzDoServiceConnection.md deleted file mode 100644 index 238109a3..00000000 --- a/docs/en-US/Get-AzDoServiceConnection.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoServiceConnection - -## SYNOPSIS -Gets information about a repo in Azure DevOps. - -## SYNTAX - -``` -Get-AzDoServiceConnection [-CollectionUri] [-ProjectName] - [[-ServiceConnectionName] ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Gets information about 1 repo if the parameter $Name is filled in. -Otherwise it will list all the repo's. - -## EXAMPLES - -### EXAMPLE 1 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - Name "Repo 1" -} -Get-AzDoRepo -CollectionUri = "https://dev.azure.com/contoso" -PAT = "***" -ProjectName = "Project 1" -``` - -This example will list all the repo's contained in 'Project 1'. - -### EXAMPLE 2 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - Name "Repo 1" -} -Get-AzDoRepo -CollectionUri = "https://dev.azure.com/contoso" -PAT = "***" -ProjectName = "Project 1" -Name "Repo 1" -``` - -This example will fetch information about the repo with the name 'Repo 1'. - -### EXAMPLE 3 -``` -$Params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name "Repo 1" -} -get-AzDoProject -pat $pat -CollectionUri $collectionuri | Get-AzDoRepo -PAT $PAT -``` - -This example will fetch information about the repo with the name 'Repo 1'. - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the Repos are contained - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ServiceConnectionName -Name of the Repo to get information about - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSObject with repo(s). -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Get-AzDoVariableGroup.md b/docs/en-US/Get-AzDoVariableGroup.md deleted file mode 100644 index eaa69634..00000000 --- a/docs/en-US/Get-AzDoVariableGroup.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Get-AzDoVariableGroup - -## SYNOPSIS -This script gets a variable group details in a given project. - -## SYNTAX - -``` -Get-AzDoVariableGroup [-CollectionUri] [-ProjectName] [[-VariableGroupName] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -This script gets a variable groups a given project. -When used in a pipeline, you can use the pre defined CollectionUri, ProjectName and AccessToken (PAT) variables. - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - Collectionuri = 'https://dev.azure.com/weareinspark/' - PAT = '*******************' - ProjectName = 'Project 1' - VariableGroupName = 'VariableGroup1','VariableGroup2' -} -Get-AzDoVariableGroup @params -``` - -This example gets Variable Groups 'VariableGroup1' and 'VariableGroup2' . - -### EXAMPLE 2 -``` -$params = @{ - Collectionuri = 'https://dev.azure.com/weareinspark/' - PAT = '*******************' - ProjectName = 'Project 1' -} -Get-AzDoVariableGroup @params -``` - -This example gets all variable groups the user has access to within a project. - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the variable group has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -VariableGroupName -Name of the variable group - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSObject -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoEnvironment.md b/docs/en-US/New-AzDoEnvironment.md deleted file mode 100644 index e94f8b53..00000000 --- a/docs/en-US/New-AzDoEnvironment.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoEnvironment - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -New-AzDoEnvironment [-CollectionUri] [-ProjectName] [[-EnvironmentName] ] - [[-Description] ] [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -Set-AzDoBranchPolicyBuildValidation @params -``` - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnvironmentName -Name of the Build Validation policy. Default is the name of the Build Definition - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Description -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### Id = $result.id -### Url = $result.url -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoPipeline.md b/docs/en-US/New-AzDoPipeline.md deleted file mode 100644 index 33d00c79..00000000 --- a/docs/en-US/New-AzDoPipeline.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoPipeline - -## SYNOPSIS -Creates an Azure Pipeline - -## SYNTAX - -``` -New-AzDoPipeline [-CollectionUri] [-ProjectName] [-PipelineName] - [-RepoName] [[-Path] ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Creates an Azure Pipeline in a given Azure Project based on a repo - -## EXAMPLES - -### EXAMPLE 1 -``` -$newAzDoPipelineSplat = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - PipelineName = "Pipeline 1" - RepoName = "Repo 1" - ProjectName = "Project 1" -} -New-AzDoPipeline @newAzDoPipelineSplat -``` - -This example creates a new Azure Pipeline using the PowerShell pipeline - -### EXAMPLE 2 -``` -Get-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT $PAT | - Get-AzDoRepo -RepoName 'Repo 1' -PAT $PAT | - New-AzDoPipeline -PipelineName "Pipeline 1" -PAT $PAT -``` - -This example creates a new Azure Pipeline - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PipelineName -Name of the Pipeline - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repository containing the YAML-sourcecode - -```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Path -Path of the YAML-sourcecode in the Repository - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: /main.yaml -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSobject. An object containing the name, the folder and the URI of the pipeline -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoProject.md b/docs/en-US/New-AzDoProject.md deleted file mode 100644 index 973f9c89..00000000 --- a/docs/en-US/New-AzDoProject.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoProject - -## SYNOPSIS -Function to create an Azure DevOps project - -## SYNTAX - -``` -New-AzDoProject [-CollectionUri] [-ProjectName] [[-Description] ] - [[-SourceControlType] ] [[-Visibility] ] [-ProgressAction ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Function to create an Azure DevOps project - -## EXAMPLES - -### EXAMPLE 1 -``` -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" -``` - -This example creates a new private Azure DevOps project - -### EXAMPLE 2 -``` -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" -Visibility 'public' -``` - -This example creates a new public Azure DevOps project - -### EXAMPLE 3 -``` -@("MyProject1","Myproject2") | New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -``` - -This example creates two new Azure DevOps projects using the pipeline. - -### EXAMPLE 4 -``` -[pscustomobject]@{ - ProjectName = 'Project 1' - Visibility = 'public' - Description = 'This is the best project' -}, -[pscustomobject]@{ - ProjectName = 'Project 1' - Description = 'This is the best project' -} | New-AzDoProject -PAT $PAT -CollectionUri $CollectionUri -``` - -This example creates two new Azure DevOps projects using the pipeline. - -## PARAMETERS - -### -CollectionUri -Collection URI. -e.g. -https://dev.azure.com/contoso. -Azure Pipelines has a predefined variable for this. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project. -Length -- Must not be a system reserved name. -- Must not be one of the hidden segments used for IIS request filtering like App_Browsers, App_code, App_Data, App_GlobalResources, App_LocalResources, App_Themes, App_WebResources, bin, or web.config. -- Must not contain any Unicode control characters or surrogate characters. -- Must not contain the following printable characters: \ / : * ? -" \< \> | ; # $ * { } , + = \[ \]. -- Must not start with an underscore _. -- Must not start or end with a period .. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Description -Description of the project - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceControlType -Type of source control. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: GIT -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Visibility -Visibility of the project (private or public). - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: Private -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoRepo.md b/docs/en-US/New-AzDoRepo.md deleted file mode 100644 index 774e16ae..00000000 --- a/docs/en-US/New-AzDoRepo.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoRepo - -## SYNOPSIS -Creates a repo in Azure DevOps. - -## SYNTAX - -``` -New-AzDoRepo [-CollectionUri] [-RepoName] [-ProjectName] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a repo in Azure DevOps. - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Repo 1" - ProjectName = "Project 1" -} -New-AzDoRepo @params -``` - -This example creates a new Azure DevOps repo with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -'test', 'test2' | New-AzDoRepo -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -``` - -This example creates a new Azure DevOps repo for each in pipeline - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the new repository - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project where the new repository has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $res.name -### RepoId = $res.id -### RepoURL = $res.url -### WebUrl = $res.webUrl -### HttpsUrl = $res.remoteUrl -### SshUrl = $res.sshUrl -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoServiceConnection.md b/docs/en-US/New-AzDoServiceConnection.md deleted file mode 100644 index 6c0ebb62..00000000 --- a/docs/en-US/New-AzDoServiceConnection.md +++ /dev/null @@ -1,449 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoServiceConnection - -## SYNOPSIS -Function to create a service connection in Azure DevOps - -## SYNTAX - -### WorkloadIdentityFederation -``` -New-AzDoServiceConnection -CollectionUri -ProjectName -ServiceConnectionName - [-Description ] [-Force] [-AsDraft] [-ScopeLevel ] [-AuthenticationType ] - [-TenantId ] [-ServiceprincipalId ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -### ServiceprincipalCertificate -``` -New-AzDoServiceConnection -CollectionUri -ProjectName -ServiceConnectionName - [-Description ] [-Force] -ScopeLevel [-AuthenticationType ] -TenantId - -ServiceprincipalId [-KeyVaultName ] [-CertName ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -### ServiceprincipalSecret -``` -New-AzDoServiceConnection -CollectionUri -ProjectName -ServiceConnectionName - [-Description ] [-Force] -ScopeLevel [-AuthenticationType ] -TenantId - -ServiceprincipalId [-ServiceprincipalSecret ] [-ProgressAction ] [-WhatIf] - [-Confirm] [] -``` - -### Subscription -``` -New-AzDoServiceConnection -CollectionUri -ProjectName -ServiceConnectionName - [-Description ] [-Force] [-AuthenticationType ] -SubscriptionId - -SubscriptionName [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -### ManagementGroup -``` -New-AzDoServiceConnection -CollectionUri -ProjectName -ServiceConnectionName - [-Description ] [-Force] [-AuthenticationType ] -ManagementGroupId - -ManagementGroupName [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Function to create a service connection in Azure DevOps - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - SubscriptionId = "00000-00000-00000-00000-00000" - SubscriptionName = "Subscription 1" - Tenantid = "11111-11111-11111-11111-11111" - Serviceprincipalid = "1c03163f-7e4e-4fab-8b41-6f040a8361b9" - KeyVaultName = "kv01" - CertName = "Cert01" - AuthenticationType = "spnCertificate" - ProjectID = "1f31cb4d-5a69-419f-86f0-ee3a8ed9ced2" - Name = "Project 1" -} -New-AzDoServiceConnection @params -``` - -This example creates a new Azure DevOps service connection with a Certificate from a KeyVault in Azure. - -### EXAMPLE 2 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - ProjectName = "Project 1" - ServiceConnectionName = "ServiceConnection1" - Description = 'Service connection for Azure Resource Manager' - SubscriptionId = "00000-00000-00000-00000-00000" - SubscriptionName = "Subscription 1" - TenantId = 'aee976c7-a678-4b4b-884a-cc6cfccad0f9' - Serviceprincipalid = "1c03163f-7e4e-4fab-8b41-6f040a8361b9" - AuthenticationType = 'WorkloadIdentityFederation' - AsDraft = $true - Force = $true -} -New-AzDoServiceConnection @params -``` - -This example creates a new Azure DevOps service connection with WorkloadIdentityFederation as authentication type. - -## PARAMETERS - -### -CollectionUri -Collection Uri. -e.g. -https://dev.azure.com/contoso. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServiceConnectionName -Name of the service connection. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Description to add to the service connection. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force -Parameter help description - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -AsDraft -Create the service connection as draft (useful when creating a WorkloadIdentityFederation based service connection). - -```yaml -Type: SwitchParameter -Parameter Sets: WorkloadIdentityFederation -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ScopeLevel -Scope level (Subscription or ManagementGroup). - -```yaml -Type: String -Parameter Sets: WorkloadIdentityFederation -Aliases: - -Required: False -Position: Named -Default value: Subscription -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -```yaml -Type: String -Parameter Sets: ServiceprincipalCertificate, ServiceprincipalSecret -Aliases: - -Required: True -Position: Named -Default value: Subscription -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -AuthenticationType -AuthenticationType (spnSecret or spnCertificate). - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: WorkloadIdentityFederation -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -SubscriptionId -ID of the subscriptionn. - -```yaml -Type: String -Parameter Sets: Subscription -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -SubscriptionName -Name of the subscription. - -```yaml -Type: String -Parameter Sets: Subscription -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ManagementGroupId -ID of the Management group. - -```yaml -Type: String -Parameter Sets: ManagementGroup -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ManagementGroupName -Name of the Management group. - -```yaml -Type: String -Parameter Sets: ManagementGroup -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId -ID of the tenant. - -```yaml -Type: String -Parameter Sets: WorkloadIdentityFederation -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -```yaml -Type: String -Parameter Sets: ServiceprincipalCertificate, ServiceprincipalSecret -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ServiceprincipalId -Client ID of the app registration. - -```yaml -Type: String -Parameter Sets: WorkloadIdentityFederation -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -```yaml -Type: String -Parameter Sets: ServiceprincipalCertificate, ServiceprincipalSecret -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ServiceprincipalSecret -App secret of the app registation. - -```yaml -Type: String -Parameter Sets: ServiceprincipalSecret -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -KeyVaultName -KeyVault name where the certificate is stored. - -```yaml -Type: String -Parameter Sets: ServiceprincipalCertificate -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -CertName -Name of the certificate - -```yaml -Type: String -Parameter Sets: ServiceprincipalCertificate -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/New-AzDoVariableGroup.md b/docs/en-US/New-AzDoVariableGroup.md deleted file mode 100644 index 679f3916..00000000 --- a/docs/en-US/New-AzDoVariableGroup.md +++ /dev/null @@ -1,193 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# New-AzDoVariableGroup - -## SYNOPSIS -This script creates a variable group with at least 1 variable in a given project. - -## SYNTAX - -``` -New-AzDoVariableGroup [-CollectionUri] [-ProjectName] [-VariableGroupName] - [-Variables] [[-Description] ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -This script creates a variable group with at least 1 variable in a given project. -When used in a pipeline, you can use the pre defined CollectionUri, ProjectName and AccessToken (PAT) variables. - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - Collectionuri = 'https://dev.azure.com/weareinspark/' - PAT = '*******************' - ProjectName = 'Project 1' - VariableGroupName = 'VariableGroup1' - Variables = @{ test = @{ value = 'test' } } - Description = 'This is a test' -} -New-AzDoVariableGroup @params -``` - -This example creates a new Variable Group with a variable "test = test". - -### EXAMPLE 2 -``` -$params = @{ - Collectionuri = 'https://dev.azure.com/ChristianPiet0452/' - ProjectName = 'Ditproject' - Variables = @{ test = @{ value = 'test' } } - Description = 'This is a test' - PAT = $PAT -} -@( - 'dev-group' - 'acc-group' - 'prd-group' -) | New-AzDoVariableGroup @params -``` - -This example creates a few new Variable Groups with a variable "test = test". - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectName -Project where the variable group has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -VariableGroupName -Name of the variable group - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Variables -Variable names and values - -```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Description of the variable group - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSobject -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Remove-AzDoProject.md b/docs/en-US/Remove-AzDoProject.md deleted file mode 100644 index ca73634b..00000000 --- a/docs/en-US/Remove-AzDoProject.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Remove-AzDoProject - -## SYNOPSIS -Function to create an Azure DevOps project - -## SYNTAX - -``` -Remove-AzDoProject [-CollectionUri] [-ProjectName] [-ProgressAction ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Function to create an Azure DevOps project - -## EXAMPLES - -### EXAMPLE 1 -``` -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" -``` - -This example creates a new private Azure DevOps project - -### EXAMPLE 2 -``` -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" -Visibility 'public' -``` - -This example creates a new public Azure DevOps project - -### EXAMPLE 3 -``` -@("MyProject1","Myproject2") | New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -``` - -This example creates two new Azure DevOps projects using the pipeline. - -### EXAMPLE 4 -``` -[pscustomobject]@{ - ProjectName = 'Project 1' - Visibility = 'public' - Description = 'This is the best project' -}, -[pscustomobject]@{ - ProjectName = 'Project 1' - Description = 'This is the best project' -} | New-AzDoProject -PAT $PAT -CollectionUri $CollectionUri -``` - -This example creates two new Azure DevOps projects using the pipeline. - -## PARAMETERS - -### -CollectionUri -Collection URI. -e.g. -https://dev.azure.com/contoso. -Azure Pipelines has a predefined variable for this. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoBranchPolicyBuildValidation.md b/docs/en-US/Set-AzDoBranchPolicyBuildValidation.md deleted file mode 100644 index dfbd61a3..00000000 --- a/docs/en-US/Set-AzDoBranchPolicyBuildValidation.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoBranchPolicyBuildValidation - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -Set-AzDoBranchPolicyBuildValidation [-CollectionUri] [-ProjectName] [-RepoName] - [[-Branch] ] [[-Required] ] [-Id] [[-Name] ] [[-FilenamePatterns] ] - [[-validDuration] ] [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -Set-AzDoBranchPolicyBuildValidation @params -``` - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repository containing the YAML-sourcecode - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Branch -Branch to create the policy on - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: Main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Required -{{ Fill Required Description }} - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id -Id of the Build Definition (Pipeline) - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: 6 -Default value: 0 -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Name -Name of the Build Validation policy. -Default is the name of the Build Definition - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -FilenamePatterns -Filename patterns to include in the Build Validation policy. -Default is all files - -```yaml -Type: Array -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -validDuration -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: 720 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### Id = $result.id -### Url = $result.url -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoBranchPolicyCommentResolution.md b/docs/en-US/Set-AzDoBranchPolicyCommentResolution.md deleted file mode 100644 index 78e710b8..00000000 --- a/docs/en-US/Set-AzDoBranchPolicyCommentResolution.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoBranchPolicyCommentResolution - -## SYNOPSIS -Creates a Comment resolution policy on a branch - -## SYNTAX - -``` -Set-AzDoBranchPolicyCommentResolution [-CollectionUri] [-ProjectName] [-RepoName] - [[-Branch] ] [[-Required] ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Creates a Comment resolution policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - RepoName = "Repo 1" - ProjectName = "Project 1" -} -Set-AzDoBranchPolicyCommentResolution @params -``` - -This example creates a 'Comment resolution' policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -'repo1', 'repo2' | Set-AzDoBranchPolicyCommentResolution -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -PAT "***" -``` - -This example creates a 'Comment resolution' policy on the main branch of repo1 and repo2 - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repository containing the YAML-sourcecode - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Branch -Branch to create the policy on - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: Main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Required -Block pull requests until the comments are resolved - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### id = $res.id -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoBranchPolicyMergeStrategy.md b/docs/en-US/Set-AzDoBranchPolicyMergeStrategy.md deleted file mode 100644 index 4e273401..00000000 --- a/docs/en-US/Set-AzDoBranchPolicyMergeStrategy.md +++ /dev/null @@ -1,234 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoBranchPolicyMergeStrategy - -## SYNOPSIS -Creates a Merge strategy policy on a branch - -## SYNTAX - -``` -Set-AzDoBranchPolicyMergeStrategy [-CollectionUri] [-ProjectName] [-RepoName] - [[-Branch] ] [[-AllowSquash] ] [[-AllowNoFastForward] ] [[-AllowRebase] ] - [[-AllowRebaseMerge] ] [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Merge strategy policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - RepoName = "Repo 1" - ProjectName = "Project 1" -} -Set-AzDoBranchPolicyMergeStrategy @params -``` - -This example creates a 'Require a merge strategy' policy with splatting parameters - -### EXAMPLE 2 -``` -'repo1', 'repo2' | -Set-AzDoBranchPolicyMergeStrategy -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -PAT "***" -``` - -This example creates a 'Require a merge strategy' policy on the main branch of repo1 and repo2 - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repository containing the YAML-sourcecode - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Branch -Branch to create the policy on - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: Main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowSquash -Allow squash merge - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowNoFastForward -Allow no fast forward merge - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowRebase -Allow rebase merge - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowRebaseMerge -Allow rebase merge message - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### id = $res.id -### allowSquash = $res.settings.allowSquash -### allowNoFastForward = $res.settings.allowNoFastForward -### allowRebase = $res.settings.allowRebase -### allowRebaseMerge = $res.settings.allowRebaseMerge -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoBranchPolicyMinimalApproval.md b/docs/en-US/Set-AzDoBranchPolicyMinimalApproval.md deleted file mode 100644 index f9c88c48..00000000 --- a/docs/en-US/Set-AzDoBranchPolicyMinimalApproval.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoBranchPolicyMinimalApproval - -## SYNOPSIS -Creates a Minimal approval policy on a branch - -## SYNTAX - -``` -Set-AzDoBranchPolicyMinimalApproval [-CollectionUri] [-ProjectName] [-RepoName] - [[-branch] ] [[-minimumApproverCount] ] [[-creatorVoteCounts] ] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates a Minimal approval policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - RepoName = "Repo 1" - ProjectName = "Project 1" -} -Set-AzDoBranchPolicyMinimalApproval @params -``` - -This example creates a new Azure Pipeline using the PowerShell pipeline - -### EXAMPLE 2 -``` -'repo1', 'repo2' | -Set-AzDoBranchPolicyMinimalApproval -CollectionUri $CollectionUri -ProjectName $ProjectName -PAT "***" -``` - -This example creates a 'Minimum number of reviewers' policy on the main branch of repo1 and repo2 - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RepoName -Name of the Repository containing the YAML-sourcecode - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -branch -Branch to create the policy on - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: Main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -minimumApproverCount -Block pull requests until the comments are resolved - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: 2 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -creatorVoteCounts -Block self approval - -```yaml -Type: Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### id = $res.id -### minimumApproverCount = $res.settings.minimumApproverCount -### creatorVoteCounts = $res.settings.creatorVoteCounts -### allowDownvotes = $res.settings.allowDownvotes -### resetOnSourcePush = $res.settings.resetOnSourcePush -### requireVoteOnLastIteration = $res.settings.requireVoteOnLastIteration -### resetRejectionsOnSourcePush = $res.settings.resetRejectionsOnSourcePush -### blockLastPusherVote = $res.settings.blockLastPusherVote -### requireVoteOnEachIteration = $res.settings.requireVoteOnEachIteration -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoPipelineBranchControl.md b/docs/en-US/Set-AzDoPipelineBranchControl.md deleted file mode 100644 index 28249b21..00000000 --- a/docs/en-US/Set-AzDoPipelineBranchControl.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -external help file: AzureDevOpsPowerShellAPI-help.xml -Module Name: AzureDevOpsPowerShellAPI -online version: -schema: 2.0.0 ---- - -# Set-AzDoPipelineBranchControl - -## SYNOPSIS -Creates a Build Validation policy on a branch - -## SYNTAX - -``` -Set-AzDoPipelineBranchControl [-CollectionUri] [-ProjectName] [[-PAT] ] - [[-Name] ] [-ResourceType] [-ResourceName] [[-AllowUnknownStatusBranches] ] - [[-AllowedBranches] ] [[-EnsureProtectionOfBranch] ] [[-Timeout] ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Creates a Build Validation policy on a branch - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - Name = "Policy 1" - RepoName = "Repo 1" - ProjectName = "Project 1" - Id = 1 -} -Set-AzDoBranchPolicyBuildValidation @params -``` - -This example creates a policy with splatting parameters - -### EXAMPLE 2 -``` -$env:SYSTEM_ACCESSTOKEN = '***' -New-AzDoPipeline -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" -Name "Pipeline 1" -RepoName "Repo 1" -Path "main.yml" -| Set-AzDoBranchPolicyBuildValidation -``` - -This example creates a new Azure Pipeline and sets this pipeline as Build Validation policy on the main branch - -## PARAMETERS - -### -CollectionUri -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProjectName -Project where the pipeline will be created. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PAT -PAT to authentice with the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Name of the Build Validation policy. -Default is the name of the Build Definition - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: Branch Control -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceType -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceName -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowUnknownStatusBranches -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowedBranches -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: Refs/head/main -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnsureProtectionOfBranch -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: True -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Timeout -Valid duration of the Build Validation policy. -Default is 720 minutes - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 10 -Default value: 1440 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### [PSCustomObject]@{ -### CollectionUri = $CollectionUri -### ProjectName = $ProjectName -### RepoName = $RepoName -### Id = $result.id -### Url = $result.url -### } -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoProjectSetting.md b/docs/en-US/Set-AzDoProjectSetting.md deleted file mode 100644 index 54425ee8..00000000 --- a/docs/en-US/Set-AzDoProjectSetting.md +++ /dev/null @@ -1,423 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoProjectSetting - -## SYNOPSIS -Sets the project settings for the given project. - -## SYNTAX - -``` -Set-AzDoProjectSetting [-CollectionUri] [-ProjectName] [-BuildsEnabledForForks] - [-DisableClassicBuildPipelineCreation] [-DisableClassicPipelineCreation] - [-DisableClassicReleasePipelineCreation] [-DisableImpliedYAMLCiTrigger] [-EnableShellTasksArgsSanitizing] - [-EnableShellTasksArgsSanitizingAudit] [-EnforceJobAuthScope] [-EnforceJobAuthScopeForForks] - [-EnforceJobAuthScopeForReleases] [-EnforceNoAccessToSecretsFromForks] [-EnforceReferencedRepoScopedToken] - [-EnforceSettableVar] [-ForkProtectionEnabled] [-IsCommentRequiredForPullRequest] [-PublishPipelineMetadata] - [-RequireCommentsForNonTeamMemberAndNonContributors] [-RequireCommentsForNonTeamMembersOnly] - [-StatusBadgesArePrivate] [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Sets the project settings for the given project. - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project01" - EnforceJobAuthScope = $true - EnforceJobAuthScopeForReleases = $true - EnforceReferencedRepoScopedToken = $true - EnforceSettableVar = $true - PublishPipelineMetadata = $true - StatusBadgesArePrivate = $true -} -Set-AzDOProjectSettings -``` - -This example sets all the settings available to true. - -## PARAMETERS - -### -CollectionUri -Collection uri of the organization. -Can be set with the predefined variable from Azure DevOps. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectName -Name of the project - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -BuildsEnabledForForks -If enabled, enables forked repositories to build pull requests. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -DisableClassicBuildPipelineCreation -If enabled, disables classic build pipelines creation. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -DisableClassicPipelineCreation -If enabled, disables classic pipelines creation. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -DisableClassicReleasePipelineCreation -If enabled, disables classic release pipelines creation. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -DisableImpliedYAMLCiTrigger -If enabled, disables implied pipeline CI triggers if the trigger section in YAML is missing. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnableShellTasksArgsSanitizing -Enable shell tasks args sanitizing. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnableShellTasksArgsSanitizingAudit -Enable shell tasks args sanitizing preview. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceJobAuthScope -Limit job authorization scope to current project for for all non-release pipelines reduces to the current project. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceJobAuthScopeForForks -Limit job authorization scope to current project for builds of forked repositories. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceJobAuthScopeForReleases -Limit job authorization scope to current project for release pipelines. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceNoAccessToSecretsFromForks -Enforce no access to secrets for builds of forked repositories. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceReferencedRepoScopedToken -Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -EnforceSettableVar -If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ForkProtectionEnabled -Enable settings that enforce certain levels of protection for building pull requests from forks globally. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -IsCommentRequiredForPullRequest -Make comments required to have builds in all pull requests. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PublishPipelineMetadata -Allows pipelines to record metadata. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequireCommentsForNonTeamMemberAndNonContributors -Make comments required to have builds in pull requests from non-team members and non-contributors. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -RequireCommentsForNonTeamMembersOnly -Make comments required to have builds in pull requests from non-team members and non-contributors. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -StatusBadgesArePrivate -Anonymous users can access the status badge API for all pipelines unless this option is enabled. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: True -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### PSobject -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Set-AzDoTeamMember.md b/docs/en-US/Set-AzDoTeamMember.md deleted file mode 100644 index 4bc18469..00000000 --- a/docs/en-US/Set-AzDoTeamMember.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Set-AzDoTeamMember - -## SYNOPSIS -Adds a Azure Group to a default team in an Azure DevOps project. - -## SYNTAX - -``` -Set-AzDoTeamMember [-OrganizationName] [[-PAT] ] [-ProjectName] [-ObjectId] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Adds a Azure Group to a default team in an Azure DevOps project. - -## EXAMPLES - -### EXAMPLE 1 -``` -New-AzDoVariableGroup -collectionuri 'https://dev.azure.com/weareinspark/' -PAT '*******************' -ProjectName 'BusinessReadyCloud' --Name 'test' -Variables @{ test = @{ value = 'test' } } -Description 'This is a test' -``` - -To create a variable group 'test' with one variable - -## PARAMETERS - -### -OrganizationName -Collection Uri of the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PAT -PAT to authentice with the organization - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProjectName -Project where the variable group has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId -Project where the variable group has to be created - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 4 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### New-AzDoVariableGroup [-CollectionUri] [-PAT] [-ProjectName] [-Name] [-Variables] [[-Description] ] -### [] -## OUTPUTS - -### New variable group with at least 1 variable in a given project. -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/Test-AzDoServiceConnection.md b/docs/en-US/Test-AzDoServiceConnection.md deleted file mode 100644 index 0a6d4a4a..00000000 --- a/docs/en-US/Test-AzDoServiceConnection.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -external help file: AzureDevOpsPowerShell-help.xml -Module Name: AzureDevOpsPowerShell -online version: -schema: 2.0.0 ---- - -# Test-AzDoServiceConnection - -## SYNOPSIS -Function to create a service connection in Azure DevOps - -## SYNTAX - -``` -Test-AzDoServiceConnection [-ProjectName] [-CollectionUri] [-ServiceConnectionName] - [-ProgressAction ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Function to create a service connection in Azure DevOps - -## EXAMPLES - -### EXAMPLE 1 -``` -$params = @{ - CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" - ProjectName = "Project 1" - SubscriptionId = "00000-00000-00000-00000-00000" - SubscriptionName = "Subscription 1" - Tenantid = "11111-11111-11111-11111-11111" - Serviceprincipalid = "1c03163f-7e4e-4fab-8b41-6f040a8361b9" - KeyVaultName = "kv01" - CertName = "Cert01" - AuthenticationType = "spnCertificate" - ProjectID = "1f31cb4d-5a69-419f-86f0-ee3a8ed9ced2" - Name = "Project 1" -} -Test-AzDoServiceConnection @params -``` - -This example creates a new Azure DevOps service connection with a Certificate from a KeyVault in Azure. - -## PARAMETERS - -### -ProjectName -Name of the Project in Azure DevOps. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CollectionUri -Collection Uri. -e.g. -https://dev.azure.com/contoso. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServiceConnectionName -Collection Uri. -e.g. -https://dev.azure.com/contoso. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS diff --git a/docs/en-US/about_InstallingModule.md b/docs/en-US/about_InstallingModule.md deleted file mode 100644 index b99baaab..00000000 --- a/docs/en-US/about_InstallingModule.md +++ /dev/null @@ -1,101 +0,0 @@ -# Installing module -In this document we will describe how to register the PowerShell repository located at InSpark. -We use Powershell Secret Management with a local stored secret vault. This implementation has 1 downside, you will need to enter your password (One that you will create is this guide) every time you start PowerShell. -## Requirements -- PAT with Packaging (Read Access) to weareinspark organization - -| ⚠️ WARNING | -| :---------------------------------------------------------------------------------------------------------------------- | -| Contain the permission of the PAT to (Packaging (Read Access)), since it's going to be exposed to the environment vars. | - -## Set-up authentication with PAT -1. Install the required modules -```powershell -# This module handles fetching secrets -Install-Module -Name Microsoft.PowerShell.SecretManagement -Scope CurrentUser -Repository PSGallery -Force -# This module stores the secrets safely on your machine -Install-Module -Name Microsoft.PowerShell.SecretStore -Scope CurrentUser -Repository PSGallery -Force -``` -2. Set the secret -```powershell -Set-Secret -Name Pat -Secret "" -``` -3. Enter a password for own use. -4. Open your profile -```powershell -code $PROFILE -``` -5. Save the following code in your profile -```powershell -# This prepares authentication with the nuget packagefeed -$env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = @{ - endpointCredentials = @( - @{ - endpoint = "https://pkgs.dev.azure.com/weareinspark/_packaging/powershell/nuget/v2" - username = "" # Replace with your e-mail (User Principal Name) - password = (Get-Secret -Name Pat -AsPlainText) - } - ) -} | ConvertTo-Json -# This creates a persistant PSCredential so you can easily install modules from the repository -$InSparkAzureDevopsArtifacts = New-Object System.Management.Automation.PSCredential("", (Get-Secret -Name Pat)) # Replace with your e-mail (User Principal Name) -``` -## Install Azure Artifact Credential Provider -1. Follow the steps to install the [Azure Artifact Credential Provider](https://github.com/microsoft/artifacts-credprovider#setup) -## Set-up the Powershell Repository -1. Restart PowerShell session -2. Register the Repository -```powershell -$registerPSRepositorySplat = @{ - Name = "InSpark" - SourceLocation = "https://pkgs.dev.azure.com/weareinspark/_packaging/powershell/nuget/v2" - PublishLocation = "https://pkgs.dev.azure.com/weareinspark/_packaging/powershell/nuget/v2" - InstallationPolicy = 'Trusted' - Credential = $InSparkAzureDevopsArtifacts -} -Register-PSRepository @registerPSRepositorySplat -``` -3. Validate that the setup succeeded -```powershell -Find-Module -Repository InSpark -``` -4. Install the module () -```powershell -Install-Module -Name InSpark.InfrastructureAsCode -Scope CurrentUser -Repository InSpark -Credential $InSparkAzureDevopsArtifacts -``` -## Troubleshooting -### Query Url ... is invalid - -**Issue** - -In some cases PowerShell returns errors during `Find-Module` or `Install-Module`. -PowerShell will return errors like: -```powershell -Find-Module -Repository InSpark -WARNING: Query Url https://pkgs.dev.azure.com/weareinspark/_packaging/PowerShell/nuget/v2 is invalid. -``` -PowerShell sometimes registers a NuGet Provider as a PackageSource when registering a PSRepository instead of just the PowerShellGet entry. -You can check this by performing: -```powershell -Get-PackageSource -Name ProviderName IsTrusted Location ----- ------------ --------- -------- -PSGallery PowerShellGet True https://www.powershellgallery.com/api/v2 -InSpark PowerShellGet True https://pkgs.dev.azure.com/weareinspark/_packaging/powershell/nuget/v2 -InSpark NuGet True https://pkgs.dev.azure.com/weareinspark/_packaging/powershell/nuget/v2 -``` - -**Fix** - -You can remove the NuGet PackageSource with: -```powershell -Unregister-PackageSource -Name InSpark -ProviderName NuGet -``` -Make sure to validate that functionality is restored: -```powershell -Find-Module -Repository InSpark -``` -## Reference -- [https://devblogs.microsoft.com/powershell-community/how-to-use-the-secret-modules/](https://devblogs.microsoft.com/powershell-community/how-to-use-the-secret-modules/) -- [https://docs.microsoft.com/en-us/azure/devops/artifacts/tutorials/private-powershell-library?view=azure-devops](https://docs.microsoft.com/en-us/azure/devops/artifacts/tutorials/private-powershell-library?view=azure-devops) -- [https://github.com/microsoft/artifacts-credprovider](https://github.com/microsoft/artifacts-credprovider) diff --git a/docs/en-US/about_workflow.md b/docs/en-US/about_workflow.md deleted file mode 100644 index 2c35b6bf..00000000 --- a/docs/en-US/about_workflow.md +++ /dev/null @@ -1,64 +0,0 @@ -# Workflow - -In this document we describe how our test and release workflows work. The test workflow starts when a pull request opens and the release workflow starts when there is a commit on the main branch with a change in the folder InSpark.InfrastructureAsCode. - -![Image](images/workflow.png) - -## Pull request labels - -When a pull request opens the test workflow will start to set labels based on the head branch. You can find the labels in the file [pr-labeler.yml](../../.github/pr-labeler.yml). The labels are used in other actions to determine the version or changes. The workflow will check if one of these labels are set and will then be added as a reviewer. You can also choose to set the labels manually if you are not on the right branch. - -Reference: - -- [Github - TimonVS - pr-labeler-action](https://github.com/TimonVS/pr-labeler-action) -- [Github - NathanielHill - check-pr-label-action](https://github.com/NathanielHill/check-pr-label-action) - -## Unit testing - -Before merging the PR, PSake will test the module with Pester and PSScriptAnalyzer. The tests will be performed on different operating systems (Windows, Linux, Mac OS). The Pester tests are located in [tests/](../../tests) and the PSScriptAnalyzer settings can be found in [ScriptAnalyzerSettings.psd1](../../tests/ScriptAnalyzerSettings.psd1). - -Reference: - -- [Github - PowerShellBuild](https://github.com/psake/PowerShellBuild) - -## Search for previous tags - -When the labels are present and the unit tests complete whithout any errors, the pull request will be merged into the main branch and the release workflow will start. The first action that takes place is the search for previous tags. This is required to determine the new version of the module. When no tags are found, the version 0.0.0 will be given. - -Reference: - -- [github-action-get-previous-tag](https://github.com/WyriHaximus/github-action-get-previous-tag) - -## Calculating the new version - -All our versions are SemVer based and are calculated based on the labels that are set in the pull request. Examples: - -- patch: 0.0.0 -> 0.0.1 -- minor: 0.0.0 -> 0.1.0 -- major: 0.0.0 -> 1.0.0 - -## Updating the manifest - -The manifest [InSpark.InfrastructureAsCode.psd1](../../InSpark.InfrastructureAsCode/InSpark.InfrastructureAsCode.psd1) will be updated with the following information: - -- New version -- Release notes (The name of the pull request) -- The Project URL (The Github repo URL) - -## Create a github release - -After a new commit on the main branch, there will be GitHub release created based on a template that can be found in [release.yml](../../.github/release.yml). The template will look for all pull request between the two (previous and current) versions based on SemVer and add the pull request title and link to different sections. Because this workflow runs after every pull request there will always be one pull request linked in the github release. - -Reference: - -- [Github - Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) - -## Publishing the module - -When the manifest is updated the module is ready to be published. We use PSake to publish the module as well. -We first make sure that the PowerShell repository is registered. For this reason we switched to a Windows runner, because the CmdLet Register-PSRepository does not work on a Linux runner. After this we will PSake publish the module to the repository. This will only work if the version is higher then the latest available version. - -Reference: - -- [Github - PowerShellBuild](https://github.com/psake/PowerShellBuild) -- [Azure DevOps - Use an Azure Artifacts feed as a private PowerShell repository](https://docs.microsoft.com/en-us/azure/devops/artifacts/tutorials/private-powershell-library?view=azure-devops) diff --git a/docs/en-US/index.md b/docs/en-US/index.md index 41fc4aaf..519c3de1 100644 --- a/docs/en-US/index.md +++ b/docs/en-US/index.md @@ -1,18 +1,17 @@ # Home -Powershell module for API to DevOps services - -## Overview - -Automate tasks in Azure DevOps and Azure AD. Works on Windows Linux and MacOS. +Automate tasks in Azure DevOps. Works on Windows, Linux and MacOS. There are a few good open-source projects already going on this topic (Like VS-Team), +but we believe that this project in more user-friendly. ## Installation ```powershell -Install-Module -Name InSpark.InfrastructureAsCode -Scope CurrentUser -Repository InSpark -Credential $InSparkAzureDevopsArtifacts -``` +# PowerShell 7.3 and below +Install-Module -Name AzureDevOpsPowerShellAPI -Scope CurrentUser -For more information on how to setup access to our repository, please checkout [our guide](https://weareinspark.github.io/BRC.PS.InfrastructureAsCode/about_InstallingModule/). The [source documentation on installation can also be found here](https://github.com/WeAreInSpark/BRC.PS.InfrastructureAsCode/blob/main/docs/en-US/about_InstallingModule.md). +# PowerShell 7.4 and up +Install-PSresource -Name AzureDevOpsPowerShellAPI -Scope CurrentUser +``` ## Basic Usage @@ -21,7 +20,6 @@ For more information on how to setup access to our repository, please checkout [ ```powershell $Params = @{ CollectionUri = "https://dev.azure.com/contoso" - PAT = "***" } Get-AzDoProject @params ``` @@ -29,9 +27,9 @@ Get-AzDoProject @params ### Create an Azure DevOps Project ```powershell -New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -PAT "***" -ProjectName "Project 1" +New-AzDoProject -CollectionUri "https://dev.azure.com/contoso" -ProjectName "Project 1" ``` ## Contributing -Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. +Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. diff --git a/mkdocs.txt b/mkdocs.txt index 14f4269a..4d30e0ba 100644 --- a/mkdocs.txt +++ b/mkdocs.txt @@ -1,5 +1,5 @@ mkdocs-awesome-pages-plugin -mkdocs-material==9.4.11 +mkdocs-material==9.5.8 mike==1.1.2 mkdocs-simple-hooks==0.1.5 mkdocs-git-revision-date-plugin==0.3.2 diff --git a/mkdocs.yml b/mkdocs.yml index 79ca6f62..aa1187a4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -43,9 +43,6 @@ markdown_extensions: - pymdownx.details - mdx_truly_sane_lists - pymdownx.tasklist -- pymdownx.emoji: - emoji_generator: !!python/name:material.extensions.emoji.to_svg - emoji_index: !!python/name:material.extensions.emoji.twemoji - toc: permalink: '#' separator: '-' @@ -61,12 +58,6 @@ extra: local: social_preview: https://repository-images.githubusercontent.com/184154668/58818c00-d496-11eb-9b77-016145022654 - giscus: - repo: Azure/PSRule.Rules.Azure - repo_id: MDEwOlJlcG9zaXRvcnkxODQxNTQ2Njg= - category: Documentation - category_id: DIC_kwDOCvn6LM4CQqE6 - plugins: - mkdocs-simple-hooks: hooks: