en-US/about_AzDoPipeline.help.txt

.NAME
    AzDoPipeline
 
.SYNOPSIS
    DSC resource for managing Azure DevOps YAML pipelines.
 
.DESCRIPTION
    The AzDoPipeline class manages YAML pipeline definitions within an
    Azure DevOps project.
 
.PARAMETER ProjectName
    Key - System.String
    The Azure DevOps project name.
 
.PARAMETER PipelineName
    Required - System.String
    The name of the pipeline.
 
.PARAMETER RepositoryName
    Required - System.String
    The Git repository that contains the YAML file.
 
.PARAMETER YamlPath
    Required - System.String
    The path to the YAML pipeline definition file.
 
.PARAMETER FolderPath
    Write - System.String
    The folder path under which the pipeline is organised. Default is '\'.
 
.PARAMETER DefaultBranch
    Write - System.String
    The default branch for the pipeline. Default is 'main'.
 
.PARAMETER RepositoryType
    Write - System.String
    Allowed values: TfsGit, GitHub, GitHubEnterprise, Bitbucket
    The type of repository backing the pipeline's YAML. 'TfsGit' (the default) is an Azure Repos
    Git repository, resolved by name from the project. The other values - 'GitHub',
    'GitHubEnterprise' and 'Bitbucket' - are external repositories reached through a service
    connection, and require 'ServiceConnectionName' to be set.
 
.PARAMETER ServiceConnectionName
    Write - System.String
    The name of the service connection used to reach the repository. Required when
    'RepositoryType' is not 'TfsGit'; ignored for 'TfsGit'. Resolved to the connection's endpoint
    id the same way 'AzDoServiceConnection' resolves one.
 
.PARAMETER Variables
    Write - System.Collections.Hashtable[]
    Pipeline (build definition) variables, as an array of hashtables shaped
    '@{ Name = <string>; Value = <string>; IsSecret = <bool>; AllowOverride = <bool> }'.
    'IsSecret' and 'AllowOverride' default to $false when omitted from an entry.
 
    Secret variable values are write-only: the Azure DevOps API never returns a secret's value, so
    drift detection compares only a secret's presence and its 'IsSecret'/'AllowOverride' flags. A
    secret's value is written on every 'New'/'Set', but a value changed only on the live pipeline
    (or a value change that isn't reflected here) is never detected as drift.
 
    Only the variables listed here are managed; variables already on the pipeline that are not
    listed are left alone.
 
.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'
        }
    }
}