How to use Azure Powershell Datafactory cmdlets against specific branches in Azure DevOps repositories?

209 Views Asked by At

I have a Datafactory in AzureDevOps Repos. enter image description here

I am trying to use Azure Powershell cmdlets to create a trigger, such as the following :enter image description here

The problem is, when I run the above command, the changes are not showing on the Az DevOps Repo. So the trigger I just created does not appear in the Repo.

As a workaround, I have been able to manually create JSON files in my local git repo > merge with local master > push to online master and then the trigger works just fine and the JSON file is also visible in the Az DevOps Repo. enter image description here

But how to instruct the Powershell cmdlets to work on a specific branch? Because when I just use PS cmdlets, whatever is added (trigger/dataset/pipeline) does not show up online in the Azure DevOps Repo.

So, question is, where do cmdlets like Set-AzDatafactorV2Trigger operate/make the changes and can that be changed to work against specific branches in a git repo?

1

There are 1 best solutions below

0
On

I believe that when you run powershell commands against a Data Factory which is connected to git, the updates are made to the "live mode" of ADF and not the the git version of the factory.

Have you tried to switch to "live mode" to see if your triggers are there: enter image description here