简体   繁体   中英

Azure Data Factory CI/CD for Schedule Triggers Not Working

For triggers it looks like only pipelines pipeline and typeProperties blocks can be overriden based on the documentation .

What I want to achieve is with my CI/CD process and overriding parameters functionality , to have a schedule trigger disabled in the target ADF, unlike my source ADF.

If I inspect the JSON of a trigger that looks like the following field could do the trick "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
                    ]
                }
            }
        }
    }
}

But if I attempt to add it in the JSON file like this:

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

it never shows up in the Override section in Azure Pipeline Releases.

Does this ADF CI/CD functionality exist for triggers? How can I achieve my target here?

Turns out runtimeState for triggers is not obeyed in the arm-template-parameters-definition.json .

The path is clearer after some more research - I can achieve what I want with either editing the Powershell script Microsoft has provided or use an ADF custom task from the Azure Devops marketplace.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM