Azure-Player / azure.datafactory.devops

Azure DevOps Deployment Tasks for Azure Data Factory objects
MIT License
39 stars 21 forks source link

Environment variable in config file & 'name' column #41

Closed ivankragh closed 3 years ago

ivankragh commented 3 years ago

I get an error when using a environment variable together with a wildcard * as part of the file-name image

Azure DevOps Build Pipeline returns the following error: "##[error]ADFT0007: Could not find object: trigger.$($Env:Environment)*" image

I have configured the environment variable in the Publish task: image

NowinskiK commented 3 years ago

Column [name] does not support env-variables. I think you have some edge case where you have triggers for various environment in one ADF. This is neither not typical, nor recommended.

ivankragh commented 3 years ago

Hi' Kamil I manged to create a work-around with simply adding a PowerShell task before the publish task where I remove triggers which is not associated with the specific environment i'm working on :

image

This technic allows for creating multiple triggers which then is associated with the specific environment from which DevOps Release pipeline is publishing to. When collecting all environment trigger configurations within the development branch it possible to run different sets of operations for different environments.

Development Branch

image

Published Development ADF

image

Published User Acceptance Test ADF

image

With the latest CI/CD recommendations from MS it looks like the only way to securely handle environment specific triggers - do you have another suggestion ? :)

NowinskiK commented 3 years ago

@ivankragh, good job. I have good news for you: you can leave all files where they are and EXCLUDES or INCLUDE selected file: image Doc: https://github.com/SQLPlayer/azure.datafactory.tools#filtering-file-example