Publishing of Data Factory with DevOps using CICD yaml script

Panga, Venkatesh 0 Reputation points
2025-01-17T20:18:20.76+00:00

I've been following the instructions in Automated publishing for continuous integration and delivery to build the ARM templates for Data Factory.

The Validate job seems to run successfully in Azure DevOps without any errors:

User's image

The Validate and Generate ARM template job fails with:

User's image

User's image

User's image

Any help for the above situation to resolve it?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,245 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 28,536 Reputation points
    2025-01-18T15:25:51.08+00:00

    I think it may be a problem related to the path to your ADF resource files ARMTemplateForFactory.json and ARMTemplateParametersForFactory.json which is not correctly specified in your pipeline YAML.

    The warning about NameMismatch might indicate that some resource names in your deployment are not consistent with expectations like case sensitivity or reserved words.

    You can enable detailed logging for your pipeline to get more insights into what might be failing:

    variables:
      system.debug: true
    

    Try also to vlone your repository and use the ADF management tools to manually generate ARM templates:

    az datafactory export-arm-template \
      --resource-group <ResourceGroupName> \
      --factory-name <DataFactoryName> \
      --output-folder <OutputFolderPath>
    
    

    Verify that your YAML script includes the correct steps for validation and ARM template generation. For example:

    - task: AzureCLI@2
      displayName: 'Generate ARM Templates'
      inputs:
        azureSubscription: '<AzureSubscription>'
        scriptType: 'ps'
        scriptLocation: 'inlineScript'
        inlineScript: |
          az datafactory export-arm-template \
            --resource-group $(ResourceGroup) \
            --factory-name $(ADFName) \
            --output-folder $(Build.ArtifactStagingDirectory)
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.