Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

azure data factory - ADF deployment without making changes on trigger status

I am doing CI/CD on Azure Data Factory.

I do have a DEV instance and PROD instance of Azure Data Factory.

The deployment process is going smooth except one problem with the triggers.

I do have around 20 triggers in which 15 are in running state and 5 are stopped for a while in PROD.

Since DEV ADF is a development instance and i do not want to run any of the triggers in scheduled manner in development instance status of all triggers are set to stopped.

Currently the trigger status changes from DEV to PROD deployment is by replacing the string '"runtimeState": "Stopped"', '"runtimeState": "Started"' in the ARM template json file. enter image description here

But this will start all of the triggers in the production after deployment along with the 5 triggers which are stopped for a while.

Is there any way to un touch the trigger status at the time of deployment in PROD and only add newly created trigger into PROD without touching the existing triggers in PROD?

question from:https://stackoverflow.com/questions/65919254/adf-deployment-without-making-changes-on-trigger-status

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can add an Azure PowerShell Task to do this activity.

You can write a PowerShell script to Start/Stop trigger and place it in relevant pipeline.

In below case, I have stopped all triggers before deployment, you can add Pre or Post deployment step via PowerShell to achieve this.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...