首页 > 解决方案 > 用于计划触发器的 Azure 数据工厂 CI/CD 不起作用

问题描述

对于触发器,它看起来只是pipelines pipeline,并且typeProperties可以根据文档覆盖块。

我想要实现的是通过我的 CI/CD 流程和覆盖参数功能,在目标 ADF 中禁用计划触发器,这与我的源 ADF 不同。

如果我检查看起来像以下字段的触发器的 JSON 可以解决问题"runtimeState": "Started"

{
    "name": "name_daily",
    "properties": {
        "description": " ",
        "annotations": [],
        "runtimeState": "Started",
        "pipelines": [
            {
                "pipelineReference": {
                    "referenceName": "name",
                    "type": "PipelineReference"
                }
            }
        ],
        "type": "ScheduleTrigger",
        "typeProperties": {
            "recurrence": {
                "frequency": "Day",
                "interval": 1,
                "startTime": "2020-05-05T13:01:00.000Z",
                "timeZone": "UTC",
                "schedule": {
                    "minutes": [
                        1
                    ],
                    "hours": [
                        13
                    ]
                }
            }
        }
    }
}

但是,如果我尝试将它添加到 JSON 文件中,如下所示:

"Microsoft.DataFactory/factories/triggers": {
        "properties": {
            "runtimeState": "-",
            "typeProperties": {
                "recurrence": {
                    "interval": "=",
                    "frequency": "="
                }
            }
        }
    }

它永远不会出现在 Azure Pipeline Releases 的 Override 部分。

触发器是否存在此 ADF CI/CD 功能?我怎样才能在这里实现我的目标?

标签: azureazure-pipelinesazure-data-factoryazure-pipelines-release-pipeline

解决方案


事实证明runtimeState,在arm-template-parameters-definition.json.

经过更多研究后,路径更加清晰 - 我可以通过编辑Microsoft 提供的 Powershell 脚本或使用Azure Devops 市场中的ADF 自定义任务来实现我想要的。


推荐阅读