void DoBuild(FullBuildOptions options) { this.getLatest(); this.loadConfig(); this.stopAOS(); this.restoreBlank(); this.clearAllLabelFiles(); this.startAOS(); // this.processModel(modelName2); // this.processModel(modelName3); this.processModelCombined(modelName, "usp"); this.stopAOS(); this.restoreConfig(); // this.clearModels(); // this.installModel(modelName2); // this.installModel(modelName3); this.installModel(modelName); this.startAOS(); // this.processModelCombined(modelName, "usp", true); this.compileAll(); // this.synchronizeDB(); this.importLabels(modelName); // this.importLabels(modelName2); // this.importLabels(modelName3); this.generateCIL(); this.restartAOS(); this.importLabels(modelName); // this.importLabels(modelName2); // this.importLabels(modelName3); this.restartAOS(); this.exportModelstore(); this.backupConfig(); this.RotateModelstore(); this.updateData(options); }
public async Task <int> RunAsync(FullBuildOptions options) { branch = options.Branch; latestChangesetNumber = this.getLatestVersionNumber(); blankDatabaseName = options.BlankDatabaseName; workingDirectory = options.WorkingDirectory; workspaceName = options.WorkspaceName; collectionUrl = options.CollectionUrl; tfsRoot = options.TFSRoot; clientConfig = options.ClientConfig; skipGetLatest = options.SkipGetLatest; deployBuildDefinitionName = options.DeployBuildDefinitionName; buildNumber = options.BuildNumber; modelstorePath = options.ModelstorePath; modelstoreBackupPath = options.ModelstoreBackupPath; await Task.Run(() => this.DoBuild(options)); return(0); }
void updateData(FullBuildOptions options) { using (IDbConnection db = new SqlConnection(String.Format("Data Source={0};Initial Catalog={1};Integrated Security=SSPI;", options.DatabaseServer, options.DatabaseName))) { Branch branch = db.Query <Branch>("select top 1 * from dbo.Branch where Name = @Name", new { Name = options.Branch }).SingleOrDefault(); log(String.Format("RecId: {0}", branch.RecId)); log(String.Format("Name: {0}", branch.Name)); log(String.Format("Path: {0}", branch.Path)); log(String.Format("BuildStartChangeset: {0}", branch.BuildStartChangeset)); log(String.Format("BuildEndChangeset: {0}", branch.BuildEndChangeset)); branch.BuildStartChangeset = branch.BuildEndChangeset; branch.BuildEndChangeset = latestChangesetNumber; db.Execute("update dbo.Branch set BuildStartChangeset = @BuildStartChangeset, BuildEndChangeset = @BuildEndChangeset where Name = @Name", branch); log("Changing"); log(String.Format("BuildStartChangeset: {0}", branch.BuildStartChangeset)); log(String.Format("BuildEndChangeset: {0}", branch.BuildEndChangeset)); } }