Skip to content

AzDoPipeline

github-actions[bot] edited this page Aug 19, 2026 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String The Azure DevOps project name.
PipelineName Required System.String The name of the pipeline.
RepositoryName Required System.String The Git repository that contains the YAML file.
YamlPath Required System.String The path to the YAML pipeline definition file.
DefaultBranch Write System.String The default branch for the pipeline. Default is 'main'.
Ensure Write Ensure Present, Absent
FolderPath Write System.String The folder path under which the pipeline is organised. Default is ''.
LookupResult Read System.Collections.Hashtable

Description

The AzDoPipeline class manages YAML pipeline definitions within an Azure DevOps project.

Examples

Example 1

This example shows how to create a pipeline in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipeline 'AddAzDoPipeline'
        {
            Ensure         = 'Present'
            ProjectName    = 'MyProject'
            PipelineName   = 'MyBuildPipeline'
            RepositoryName = 'MyRepository'
            YamlPath       = '.azurepipelines/build.yml'
            FolderPath     = '\'
            DefaultBranch  = 'main'
        }
    }
}

Example 2

This example shows how to update a pipeline in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipeline 'UpdateAzDoPipeline'
        {
            Ensure         = 'Present'
            ProjectName    = 'MyProject'
            PipelineName   = 'MyBuildPipeline'
            RepositoryName = 'MyRepository'
            YamlPath       = '.azurepipelines/build.yml'
            FolderPath     = '\Build'
            DefaultBranch  = 'develop'
        }
    }
}

Example 3

This example shows how to remove a pipeline from an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipeline 'RemoveAzDoPipeline'
        {
            Ensure         = 'Absent'
            ProjectName    = 'MyProject'
            PipelineName   = 'MyBuildPipeline'
            RepositoryName = 'MyRepository'
            YamlPath       = '.azurepipelines/build.yml'
        }
    }
}

Commands

Resources

Clone this wiki locally