Add SqlCmdVariable parameter to Build procedure
We would like to add SQLCMD variables to our SQL Change Automation projects to denote whether a deployment is applying to a Local environment or to our production pipeline (isLocalDeployment). Our thought for how to do this with the least amount of changes required was to default the variable to be isLocalDeployment = FALSE. This would mean that if we are doing a deployment to a local developer database we would run additional scripts to configure that environment, but once the project is deployed into our normal production deployment pipeline those scripts would no longer run and we wouldn't have to change all of our build/release templates to account for a new variable.
The issue with this is that the build procedure (Invoke-DatabaseBuild) does not allow for us to pass in variable values. It will only use the default value specified which means all of our local builds will fail because these additional scripts won't run.
In talking with RedGate support, the only option we have is to flip the variable and set it to TRUE by default which means whenever someone does a local deploy the scripts would run, but they will also run by default in our production pipeline if we forget to add the variable to our build/release templates.
Adding the ability to pass a SqlCmdVariable value to the build script seems like something that shouldn't be difficult to do and would save us a lot of manual configuration changes in our build/deploy setup.