コード例 #1
0
        private void CleanUp()
        {
            _log.WriteCommand("Clean temp data");
            var cleanManager = new CleanManager(_context, _log);

            cleanManager.CleanLocalCopyBuild();
            cleanManager.CleanTempUnzippedBuildDirectory();
            _log.WriteCommandSuccess();
        }
コード例 #2
0
        protected override void InternalExecute(Context context)
        {
            Logger.WriteCommand("Restore database");
            var tsManager             = new TerrasoftManager();
            var originalBakFilePath   = tsManager.GetDatabaseBackupFilePath(Context.TempUnzippedBuildDirectory);
            var tempSharedBakFilePath = ShareDatabaseBakFile(originalBakFilePath);
            var dbManager             = new DbManager();

            dbManager.MSSSQLConnectionString = Context.Settings.MSSSQLConnectionString;
            var databaseName         = CreateDatabaseName();
            var restoredDatabaseName = dbManager.RestoreBpmonlineDbWithUniqueName(tempSharedBakFilePath, databaseName);

            Context.DatabaseName = restoredDatabaseName;
            DeleteFile(tempSharedBakFilePath);
            Logger.WriteCommandAddition($"Database name: {restoredDatabaseName}");
            var cleanManager = new CleanManager(context, Logger);

            cleanManager.CleanTempUnzippedBuildDirectory();
            Logger.WriteCommandSuccess();
        }