Final ADS-side hookup for sqlcmd vars (#10815)

* Adding reading SqlCmdVars from project file

* organized apiWrapper, added calls

* Adding test to confirm deployment/script gen profiles with sqlcmd vars
This commit is contained in:
Benjin Dubishar
2020-06-12 19:49:28 -07:00
committed by GitHub
parent 26a00696d4
commit ddb210e971
9 changed files with 212 additions and 76 deletions

View File

@@ -63,6 +63,15 @@ export class Project {
this.importedTargets.push(importTarget.getAttribute(constants.Project));
}
// find all SQLCMD variables to include
for (let i = 0; i < this.projFileXmlDoc.documentElement.getElementsByTagName(constants.SqlCmdVariable).length; i++) {
const sqlCmdVar = this.projFileXmlDoc.documentElement.getElementsByTagName(constants.SqlCmdVariable)[i];
const varName = sqlCmdVar.getAttribute(constants.Include);
const varValue = sqlCmdVar.getElementsByTagName(constants.DefaultValue)[0].childNodes[0].nodeValue;
this.sqlCmdVariables[varName] = varValue;
}
// find all database references to include
for (let r = 0; r < this.projFileXmlDoc.documentElement.getElementsByTagName(constants.ArtifactReference).length; r++) {
const filepath = this.projFileXmlDoc.documentElement.getElementsByTagName(constants.ArtifactReference)[r].getAttribute(constants.Include);