Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Data Factory global parameters don't work with new deployment method

I'm using the "new" ADF deployment approach as defined here:

https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements#continuous-deployment-improvements

Which pulls code out of the collabaration branch and validates and compiles it using this code:

(sample of validation code straight from the site - my code uses real values and runs as expected)

run build validate $(Build.Repository.LocalPath)/<Root-folder-from-Git-configuration-settings-in-ADF> /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testResourceGroup/providers/Microsoft.DataFactory/factories/<Your-Factory-Name>

This works fine for me. The output of the build stage is an ARM template that can be deployed.

However when I start using global parameters I get this error:

Validator: Error for Expression: '@pipeline().globalParameters.gAFConnectivityTestEndPoint', Expression Error Message: 'Parameter gAFConnectivityTestEndPoint was not found under MYRESOURCEGROUP-001', attribute: '{"name":"url","display":"url","constraint":{},"primitive":true,"templatable":true,"_owner":{"name":"WebActivity","display":["Activity","Activities"]}}', obj: '{"_object":{},"_owned":{},"_ancestor":{},"_model":{},"_aObject":{}}', resolution: '{"kind":0,"details":{}}', resolution.error: '{"kind":0,"details":{}}'

The doco seems to indicate that global parameters are not published to the collabaration branch, however I've found that global parameters are acually written into the factory/ADFName.JSON file in the collabaration branch. So it appears to have all required information.

I've tried copying the global parameters JSON file into the collabaration branch from the adf_publish branch with the same filename and get the same error

Does anyone know what is required to get this working? How do I tell the npm task about my global parameters JSON?

EDIT

I tried to repro for a much simpler pipeline and the npm task executed with no errors so it seems like this does work. Ticking "Include in ARM template" was not necessary for this to work. I need to work out why it fails for my more complicated pipeline. Curiously the error refers to the resource group, not the adf instance, so perhaps it is because the failing environment is heavily locked down.

like image 947
Nick.McDermaid Avatar asked Oct 15 '25 06:10

Nick.McDermaid


1 Answers

Are your Global Parameters included in the ARM Template? There are two ways via which you can deploy the Global Parameters:

  1. Via ARM Template

  2. Via PowerShell

To include them in the ARM Template JSON file you will have to check Include in ARM Template checkbox in the Global Parameter window under Manage section

enter image description here

Please refer to the below link to deploy Global Parameters in ADF as they do have some limitations:

https://learn.microsoft.com/en-us/azure/data-factory/author-global-parameters#cicd

like image 60
Pratik Somaiya Avatar answered Oct 18 '25 01:10

Pratik Somaiya