-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoPipeline
Michael Zanatta edited this page Aug 19, 2026
·
4 revisions
AzDoPipeline [string] #ResourceName
{
ProjectName = [String]$ProjectName
PipelineName = [String]$PipelineName
RepositoryName = [String]$RepositoryName
YamlPath = [String]$YamlPath
[ FolderPath = [String]$FolderPath ]
[ DefaultBranch = [String]$DefaultBranch ]
[ Ensure = [String] {'Present', 'Absent'} ]
}- ProjectName: The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
- PipelineName: The name of the pipeline. This is a key property.
- RepositoryName: The name of the Git repository containing the YAML pipeline definition. This is a mandatory property.
-
YamlPath: The path to the YAML pipeline file within the repository (e.g.,
.azurepipelines/build.yml). This is a mandatory property. -
FolderPath: The folder path within Azure DevOps Pipelines to organise the pipeline (e.g.,
\Build). Defaults to\. -
DefaultBranch: The default branch for the pipeline. Defaults to
main. -
Ensure: Specifies whether the pipeline should exist. Valid values are
PresentandAbsent.
This resource manages YAML-based pipelines in Azure DevOps. It creates or removes pipeline definitions that reference YAML files stored in a Git repository.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
AzDoPipeline AddPipeline {
Ensure = 'Present'
ProjectName = 'MyProject'
PipelineName = 'MyBuildPipeline'
RepositoryName = 'MyRepository'
YamlPath = '.azurepipelines/build.yml'
FolderPath = '\'
DefaultBranch = 'main'
}
}
}
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoPipeline
$properties = @{
ProjectName = 'MyProject'
PipelineName = 'MyBuildPipeline'
RepositoryName = 'MyRepository'
YamlPath = '.azurepipelines/build.yml'
}
Invoke-DscResource -Name 'AzDoPipeline' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
ProjectName: MyProject,
RepositoryName: MyRepository
}
resources:
- name: My Build Pipeline
type: AzureDevOpsDscNative/AzDoPipeline
dependsOn:
- AzureDevOpsDscNative/AzDoGitRepository/MyRepository
properties:
ProjectName: $ProjectName
PipelineName: MyBuildPipeline
RepositoryName: $RepositoryName
YamlPath: .azurepipelines/build.yml
FolderPath: '\'
DefaultBranch: main
Ensure: PresentLCM Initialization:
$params = @{
AzureDevopsOrganizationName = "SampleAzDoOrgName"
ConfigurationDirectory = "C:\Datum\DSCOutput\"
ConfigurationUrl = 'https://configuration-path'
JITToken = 'SampleJITToken'
Mode = 'Set'
AuthenticationType = 'ManagedIdentity'
ReportPath = 'C:\Datum\DSCOutput\Reports'
}
Invoke-DscPipelineRunner @params- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- AzDoAPI_0_ProjectCache
- AzDoAPI_1_GroupCache
- AzDoAPI_2_UserCache
- AzDoAPI_3_GroupMemberCache
- AzDoAPI_4_GitRepositoryCache
- AzDoAPI_5_PermissionsCache
- AzDoAPI_6_ServicePrinciple
- AzDoAPI_7_IdentitySubjectDescriptors
- AzDoAPI_8_ProjectProcessTemplates
- AzDoAPI_9_DevOpsClassificationNodes
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-Base64String
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Format-Path
- Get-AzDevOpsOperation
- Get-AzDevOpsServicesApiUri
- Get-AzDevOpsServicesUri
- AzDoAgentPool
- AzDoAgentPoolPermission
- AzDoAgentQueue
- AzDoAreaNodes
- AzDoAreaPermission
- AzDoArtifactFeed
- AzDoArtifactFeedPermission
- AzDoArtifactFeedSettings
- AzDoArtifactFeedView
- AzDoAuditStream
- AzDoBranchPolicy
- AzDoCheckConfiguration
- AzDoDeploymentGroup
- AzDoEnvironmentApproval
- AzDoEnvironmentPermission
- AzDoExtension
- AzDoGitPermission
- AzDoGitRepository
- AzDoGroupMember
- AzDoGroupPermission
- AzDoIterationNodes
- AzDoIterationPermission
- AzDoNotificationSubscription
- AzDoOrganizationGroup
- AzDoOrganizationSettings
- AzDoPipeline
- AzDoPipelineEnvironment
- AzDoPipelinePermission
- AzDoPipelineSettings
- AzDoProcess
- AzDoProcessPermission
- AzDoProject
- AzDoProjectGroup
- AzDoProjectPermission
- AzDoProjectServices
- AzDoRepositorySettings
- AzDoSecurityNamespacePermission
- AzDoServiceConnection
- AzDoServiceConnectionPermission
- AzDoServiceHook
- AzDoTaskGroup
- AzDoTeam
- AzDoTeamMember
- AzDoTeamSettings
- AzDoUserEntitlement
- AzDoVariableGroup
- AzDoVariableGroupPermission
- AzDoWiki
- AzDoWIPTags