AzureDevOpsDscNative.AzDoPipeline.dsc.adaptedResource.json

{
  "$schema": "https://aka.ms/dsc/schemas/v3/bundled/adaptedresource/manifest.json",
  "type": "AzureDevOpsDscNative/AzDoPipeline",
  "kind": "resource",
  "version": "1.2.0",
  "capabilities": [
    "set",
    "test",
    "get"
  ],
  "description": "DSC resource for managing Azure DevOps YAML pipelines.",
  "author": "ZanattaMichael",
  "requireAdapter": "Microsoft.Adapter/PowerShell",
  "path": "AzureDevOpsDscNative.psd1",
  "schema": {
    "embedded": {
      "additionalProperties": false,
      "title": "AzureDevOpsDscNative/AzDoPipeline",
      "properties": {
        "Ensure": {
          "type": "string",
          "enum": [
            "Present",
            "Absent"
          ],
          "title": "Ensure",
          "description": "The Ensure property."
        },
        "LookupResult": {
          "type": "object",
          "title": "LookupResult",
          "readOnly": true,
          "description": "The LookupResult property."
        },
        "ProjectName": {
          "type": "string",
          "title": "ProjectName",
          "description": "The Azure DevOps project name."
        },
        "PipelineName": {
          "type": "string",
          "title": "PipelineName",
          "description": "The name of the pipeline."
        },
        "RepositoryName": {
          "type": "string",
          "title": "RepositoryName",
          "description": "The Git repository that contains the YAML file."
        },
        "YamlPath": {
          "type": "string",
          "title": "YamlPath",
          "description": "The path to the YAML pipeline definition file."
        },
        "FolderPath": {
          "type": "string",
          "title": "FolderPath",
          "description": "The folder path under which the pipeline is organised. Default is '\\'."
        },
        "DefaultBranch": {
          "type": "string",
          "title": "DefaultBranch",
          "description": "The default branch for the pipeline. Default is 'main'."
        },
        "RepositoryType": {
          "type": "string",
          "enum": [
            "TfsGit",
            "GitHub",
            "GitHubEnterprise",
            "Bitbucket"
          ],
          "title": "RepositoryType",
          "description": "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."
        },
        "ServiceConnectionName": {
          "type": "string",
          "title": "ServiceConnectionName",
          "description": "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."
        },
        "Variables": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Variables",
          "description": "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."
        }
      },
      "required": [
        "ProjectName",
        "PipelineName",
        "RepositoryName",
        "YamlPath"
      ],
      "type": "object",
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "description": "DSC resource for managing Azure DevOps YAML pipelines."
    }
  }
}