Microsoft.DevHub 工作流程 2023-08-01

Bicep 資源定義

工作流程資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.DevHub/workflows 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.DevHub/workflows@2023-08-01' = {
  location: 'string'
  name: 'string'
  properties: {
    artifactGenerationProperties: {
      appName: 'string'
      builderVersion: 'string'
      dockerfileGenerationMode: 'string'
      dockerfileOutputDirectory: 'string'
      generationLanguage: 'string'
      imageName: 'string'
      imageTag: 'string'
      languageVersion: 'string'
      manifestGenerationMode: 'string'
      manifestOutputDirectory: 'string'
      manifestType: 'string'
      namespace: 'string'
      port: 'string'
    }
    githubWorkflowProfile: {
      acr: {
        acrRegistryName: 'string'
        acrRepositoryName: 'string'
        acrResourceGroup: 'string'
        acrSubscriptionId: 'string'
      }
      aksResourceId: 'string'
      branchName: 'string'
      deploymentProperties: {
        helmChartPath: 'string'
        helmValues: 'string'
        kubeManifestLocations: [
          'string'
        ]
        manifestType: 'string'
        overrides: {
          {customized property}: 'string'
        }
      }
      dockerBuildContext: 'string'
      dockerfile: 'string'
      lastWorkflowRun: {
        workflowRunStatus: 'string'
      }
      namespace: 'string'
      oidcCredentials: {
        azureClientId: 'string'
        azureTenantId: 'string'
      }
      repositoryName: 'string'
      repositoryOwner: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.DevHub/workflows

名字 描述 價值
位置 資源所在的地理位置 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 1
最大長度 = 63
模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要)
性能 工作流程的屬性。 工作流屬性
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

ACR

名字 描述 價值
acrRegistryName ACR 登錄 字串
acrRepository名稱 ACR 存放庫 字串
acrResourceGroup ACR 資源群組 字串
acrSubscriptionId ACR 訂用帳戶標識碼 字串

ArtifactGenerationProperties

名字 描述 價值
應用程式名稱 應用程式的名稱。 字串
builderVersion 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 字串
dockerfile生成模式 要用於產生 Dockerfiles 的產生模式。 '已禁用'
'已啟用'
dockerfileOutputDirectory 要輸出所產生 Dockerfile 的目錄。 字串
generationLanguage 所使用的程式設計語言。 'clojure'
'夏普'
'erlang'
'去'
'gomodule'
'gradle'
'爪哇'
'JavaScript'
'php'
'python'
'紅寶石'
'锈'
“斯威夫特”
圖像名稱 要產生之映像的名稱。 字串
imageTag (影像標籤) 要套用至所產生影像的標記。 字串
語言版本 用於在產生的 dockerfile 中執行的語言映像版本。 字串
manifestGenerationMode 要用於產生指令清單的產生模式。 '已禁用'
'已啟用'
manifestOutputDirectory 要輸出所產生指令清單的目錄。 字串
manifestType 決定要產生的指令清單類型。 '舵'
'kube'
命名空間 要部署應用程式至的命名空間。 字串
傳輸埠 應用程式公開的埠。 字串

部署屬性

名字 描述 價值
helmChartPath 存放庫中的 Helm 圖表目錄路徑。 字串
helm值 存放庫中的 Helm Values.yaml 檔案位置。 字串
kubeManifestLocations 字串[]
manifestType 決定存放庫中的指令清單類型。 '舵'
'kube'
重寫 指令清單覆寫值。 DeploymentPropertiesOverrides

DeploymentPropertiesOverrides

名字 描述 價值

GitHubWorkflowProfile

名字 描述 價值
ACR Azure Container Registry 的相關信息 ACR
aksResourceId (AKS 資源 ID) 應用程式將部署至的 Azure Kubernetes 叢集資源。 字串
branchName (分支名稱) 存放庫分支名稱 字串
deploymentProperties 部署屬性
dockerBuildContext 存放庫中 Dockerfile 建置內容的路徑。 字串
dockerfile 存放庫內 Dockerfile 的路徑。 字串
lastWorkflowRun 工作流運行
命名空間 部署應用程式的 Kubernetes 命名空間。 字串
oidc憑證 OIDC 與 GitHub 所需的欄位。 GitHubWorkflowProfileOidcCredentials
repositoryName (儲存庫名稱) 存放庫名稱 字串
repository擁有者 存放庫擁有者 字串

GitHubWorkflowProfileOidcCredentials

名字 描述 價值
azureClientId Azure 應用程式用戶端識別碼 字串
azureTenantId Azure 目錄 (租使用者) 識別碼 字串

TrackedResourceTags

名字 描述 價值

工作流屬性

名字 描述 價值
artifactGenerationProperties 產生 dockerfile 和指令清單等成品的屬性。 ArtifactGenerationProperties
githubWorkflowProfile Github 工作流程的配置檔。 GitHubWorkflowProfile

工作流運行

名字 描述 價值
workflowRunStatus 描述工作流程執行的狀態 '已完成'
'正在進行'
'已排隊'

ARM 樣本資源定義

工作流程資源類型可以使用目標作業來部署:

使用範例

資源格式

若要建立 Microsoft.DevHub/workflows 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.DevHub/workflows",
  "apiVersion": "2023-08-01",
  "name": "string",
  "location": "string",
  "properties": {
    "artifactGenerationProperties": {
      "appName": "string",
      "builderVersion": "string",
      "dockerfileGenerationMode": "string",
      "dockerfileOutputDirectory": "string",
      "generationLanguage": "string",
      "imageName": "string",
      "imageTag": "string",
      "languageVersion": "string",
      "manifestGenerationMode": "string",
      "manifestOutputDirectory": "string",
      "manifestType": "string",
      "namespace": "string",
      "port": "string"
    },
    "githubWorkflowProfile": {
      "acr": {
        "acrRegistryName": "string",
        "acrRepositoryName": "string",
        "acrResourceGroup": "string",
        "acrSubscriptionId": "string"
      },
      "aksResourceId": "string",
      "branchName": "string",
      "deploymentProperties": {
        "helmChartPath": "string",
        "helmValues": "string",
        "kubeManifestLocations": [ "string" ],
        "manifestType": "string",
        "overrides": {
          "{customized property}": "string"
        }
      },
      "dockerBuildContext": "string",
      "dockerfile": "string",
      "lastWorkflowRun": {
        "workflowRunStatus": "string"
      },
      "namespace": "string",
      "oidcCredentials": {
        "azureClientId": "string",
        "azureTenantId": "string"
      },
      "repositoryName": "string",
      "repositoryOwner": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.DevHub/workflows

名字 描述 價值
apiVersion API 版本 '2023-08-01'
位置 資源所在的地理位置 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 1
最大長度 = 63
模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要)
性能 工作流程的屬性。 工作流屬性
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
型別 資源類型 “Microsoft.DevHub/工作流”

ACR

名字 描述 價值
acrRegistryName ACR 登錄 字串
acrRepository名稱 ACR 存放庫 字串
acrResourceGroup ACR 資源群組 字串
acrSubscriptionId ACR 訂用帳戶標識碼 字串

ArtifactGenerationProperties

名字 描述 價值
應用程式名稱 應用程式的名稱。 字串
builderVersion 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 字串
dockerfile生成模式 要用於產生 Dockerfiles 的產生模式。 '已禁用'
'已啟用'
dockerfileOutputDirectory 要輸出所產生 Dockerfile 的目錄。 字串
generationLanguage 所使用的程式設計語言。 'clojure'
'夏普'
'erlang'
'去'
'gomodule'
'gradle'
'爪哇'
'JavaScript'
'php'
'python'
'紅寶石'
'锈'
“斯威夫特”
圖像名稱 要產生之映像的名稱。 字串
imageTag (影像標籤) 要套用至所產生影像的標記。 字串
語言版本 用於在產生的 dockerfile 中執行的語言映像版本。 字串
manifestGenerationMode 要用於產生指令清單的產生模式。 '已禁用'
'已啟用'
manifestOutputDirectory 要輸出所產生指令清單的目錄。 字串
manifestType 決定要產生的指令清單類型。 '舵'
'kube'
命名空間 要部署應用程式至的命名空間。 字串
傳輸埠 應用程式公開的埠。 字串

部署屬性

名字 描述 價值
helmChartPath 存放庫中的 Helm 圖表目錄路徑。 字串
helm值 存放庫中的 Helm Values.yaml 檔案位置。 字串
kubeManifestLocations 字串[]
manifestType 決定存放庫中的指令清單類型。 '舵'
'kube'
重寫 指令清單覆寫值。 DeploymentPropertiesOverrides

DeploymentPropertiesOverrides

名字 描述 價值

GitHubWorkflowProfile

名字 描述 價值
ACR Azure Container Registry 的相關信息 ACR
aksResourceId (AKS 資源 ID) 應用程式將部署至的 Azure Kubernetes 叢集資源。 字串
branchName (分支名稱) 存放庫分支名稱 字串
deploymentProperties 部署屬性
dockerBuildContext 存放庫中 Dockerfile 建置內容的路徑。 字串
dockerfile 存放庫內 Dockerfile 的路徑。 字串
lastWorkflowRun 工作流運行
命名空間 部署應用程式的 Kubernetes 命名空間。 字串
oidc憑證 OIDC 與 GitHub 所需的欄位。 GitHubWorkflowProfileOidcCredentials
repositoryName (儲存庫名稱) 存放庫名稱 字串
repository擁有者 存放庫擁有者 字串

GitHubWorkflowProfileOidcCredentials

名字 描述 價值
azureClientId Azure 應用程式用戶端識別碼 字串
azureTenantId Azure 目錄 (租使用者) 識別碼 字串

TrackedResourceTags

名字 描述 價值

工作流屬性

名字 描述 價值
artifactGenerationProperties 產生 dockerfile 和指令清單等成品的屬性。 ArtifactGenerationProperties
githubWorkflowProfile Github 工作流程的配置檔。 GitHubWorkflowProfile

工作流運行

名字 描述 價值
workflowRunStatus 描述工作流程執行的狀態 '已完成'
'正在進行'
'已排隊'

Terraform (AzAPI 提供者) 資源定義

工作流程資源類型可以使用目標作業來部署:

  • 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。

資源格式

若要建立 Microsoft.DevHub/workflows 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DevHub/workflows@2023-08-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      artifactGenerationProperties = {
        appName = "string"
        builderVersion = "string"
        dockerfileGenerationMode = "string"
        dockerfileOutputDirectory = "string"
        generationLanguage = "string"
        imageName = "string"
        imageTag = "string"
        languageVersion = "string"
        manifestGenerationMode = "string"
        manifestOutputDirectory = "string"
        manifestType = "string"
        namespace = "string"
        port = "string"
      }
      githubWorkflowProfile = {
        acr = {
          acrRegistryName = "string"
          acrRepositoryName = "string"
          acrResourceGroup = "string"
          acrSubscriptionId = "string"
        }
        aksResourceId = "string"
        branchName = "string"
        deploymentProperties = {
          helmChartPath = "string"
          helmValues = "string"
          kubeManifestLocations = [
            "string"
          ]
          manifestType = "string"
          overrides = {
            {customized property} = "string"
          }
        }
        dockerBuildContext = "string"
        dockerfile = "string"
        lastWorkflowRun = {
          workflowRunStatus = "string"
        }
        namespace = "string"
        oidcCredentials = {
          azureClientId = "string"
          azureTenantId = "string"
        }
        repositoryName = "string"
        repositoryOwner = "string"
      }
    }
  }
}

屬性值

Microsoft.DevHub/workflows

名字 描述 價值
位置 資源所在的地理位置 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 1
最大長度 = 63
模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要)
性能 工作流程的屬性。 工作流屬性
標籤 資源標籤 標記名稱和值的字典。
型別 資源類型 “Microsoft.DevHub/workflows@2023-08-01”

ACR

名字 描述 價值
acrRegistryName ACR 登錄 字串
acrRepository名稱 ACR 存放庫 字串
acrResourceGroup ACR 資源群組 字串
acrSubscriptionId ACR 訂用帳戶標識碼 字串

ArtifactGenerationProperties

名字 描述 價值
應用程式名稱 應用程式的名稱。 字串
builderVersion 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 字串
dockerfile生成模式 要用於產生 Dockerfiles 的產生模式。 '已禁用'
'已啟用'
dockerfileOutputDirectory 要輸出所產生 Dockerfile 的目錄。 字串
generationLanguage 所使用的程式設計語言。 'clojure'
'夏普'
'erlang'
'去'
'gomodule'
'gradle'
'爪哇'
'JavaScript'
'php'
'python'
'紅寶石'
'锈'
“斯威夫特”
圖像名稱 要產生之映像的名稱。 字串
imageTag (影像標籤) 要套用至所產生影像的標記。 字串
語言版本 用於在產生的 dockerfile 中執行的語言映像版本。 字串
manifestGenerationMode 要用於產生指令清單的產生模式。 '已禁用'
'已啟用'
manifestOutputDirectory 要輸出所產生指令清單的目錄。 字串
manifestType 決定要產生的指令清單類型。 '舵'
'kube'
命名空間 要部署應用程式至的命名空間。 字串
傳輸埠 應用程式公開的埠。 字串

部署屬性

名字 描述 價值
helmChartPath 存放庫中的 Helm 圖表目錄路徑。 字串
helm值 存放庫中的 Helm Values.yaml 檔案位置。 字串
kubeManifestLocations 字串[]
manifestType 決定存放庫中的指令清單類型。 '舵'
'kube'
重寫 指令清單覆寫值。 DeploymentPropertiesOverrides

DeploymentPropertiesOverrides

名字 描述 價值

GitHubWorkflowProfile

名字 描述 價值
ACR Azure Container Registry 的相關信息 ACR
aksResourceId (AKS 資源 ID) 應用程式將部署至的 Azure Kubernetes 叢集資源。 字串
branchName (分支名稱) 存放庫分支名稱 字串
deploymentProperties 部署屬性
dockerBuildContext 存放庫中 Dockerfile 建置內容的路徑。 字串
dockerfile 存放庫內 Dockerfile 的路徑。 字串
lastWorkflowRun 工作流運行
命名空間 部署應用程式的 Kubernetes 命名空間。 字串
oidc憑證 OIDC 與 GitHub 所需的欄位。 GitHubWorkflowProfileOidcCredentials
repositoryName (儲存庫名稱) 存放庫名稱 字串
repository擁有者 存放庫擁有者 字串

GitHubWorkflowProfileOidcCredentials

名字 描述 價值
azureClientId Azure 應用程式用戶端識別碼 字串
azureTenantId Azure 目錄 (租使用者) 識別碼 字串

TrackedResourceTags

名字 描述 價值

工作流屬性

名字 描述 價值
artifactGenerationProperties 產生 dockerfile 和指令清單等成品的屬性。 ArtifactGenerationProperties
githubWorkflowProfile Github 工作流程的配置檔。 GitHubWorkflowProfile

工作流運行

名字 描述 價值
workflowRunStatus 描述工作流程執行的狀態 '已完成'
'正在進行'
'已排隊'