2024-09-23 05:55:17 +00:00
|
|
|
using Common;
|
|
|
|
using LocalServer;
|
|
|
|
using RemoteServer;
|
|
|
|
|
|
|
|
namespace ServerTest;
|
|
|
|
|
|
|
|
public class PipeSeed : IDisposable
|
|
|
|
{
|
|
|
|
public PipeSeed()
|
|
|
|
{
|
|
|
|
TestConfig = new Config
|
|
|
|
{
|
|
|
|
Name = "Test",
|
2024-09-24 09:46:52 +00:00
|
|
|
RemoteUrl = "D:/FileSyncTest/dtemp",
|
2024-09-23 09:46:46 +00:00
|
|
|
RemotePwd = "t123",
|
2024-10-11 08:32:36 +00:00
|
|
|
IsDeployDb = true,
|
|
|
|
IsDeployProject = true,
|
2024-09-23 05:55:17 +00:00
|
|
|
LocalProjectAbsolutePath = "D:/git/HMES-H7-HNFY/HMES-H7-HNFYMF/HMES-H7-HNFYMF.WEB",
|
|
|
|
LocalRootPath = "D:/FileSyncTest/src",
|
|
|
|
|
|
|
|
RemoteRootPath = "D:/FileSyncTest/dst",
|
|
|
|
SrcDb = new MSSqlConfig
|
|
|
|
{
|
|
|
|
ServerName = "172.16.12.2",
|
2024-10-28 09:28:18 +00:00
|
|
|
DatabaseName = "HMES_H7_HNFYMF",
|
2024-09-23 05:55:17 +00:00
|
|
|
User = "hmes-h7",
|
|
|
|
Password = "Hmes-h7666",
|
|
|
|
TrustServerCertificate = "True",
|
|
|
|
SyncTablesData = new List<string>
|
|
|
|
{
|
|
|
|
"dbo.sys_Button",
|
|
|
|
"dbo.sys_Menu",
|
|
|
|
"dbo.sys_Module",
|
|
|
|
"dbo.sys_Page",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
DstDb = new MSSqlConfig
|
|
|
|
{
|
|
|
|
ServerName = "127.0.0.1",
|
2024-10-28 09:28:18 +00:00
|
|
|
DatabaseName = "HMES_H7_HNFYMF",
|
2024-09-23 05:55:17 +00:00
|
|
|
User = "sa",
|
|
|
|
Password = "0",
|
|
|
|
TrustServerCertificate = "True"
|
|
|
|
},
|
2024-09-23 09:46:46 +00:00
|
|
|
DirFileConfigs = new List<DirFileConfig>
|
|
|
|
{
|
|
|
|
new DirFileConfig { DirPath = "/bin", Excludes = ["/roslyn", "/Views"] }
|
2024-10-29 04:46:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// C:/Windows/System32/inetsrv/appcmd.exe stop sites "publicserver"
|
|
|
|
// C:/Windows/System32/inetsrv/appcmd.exe start sites "publicserver"
|
|
|
|
ExecProcesses = new List<ExecProcess>
|
|
|
|
{
|
|
|
|
new ExecProcess
|
|
|
|
{
|
|
|
|
Argumnets = "ls",
|
|
|
|
FileName = "powershell",
|
|
|
|
StepBeforeOrAfter = "A",
|
|
|
|
ExecInLocalOrServer = "L",
|
|
|
|
Step = SyncProcessStep.DeployProject,
|
|
|
|
},
|
|
|
|
new ExecProcess
|
|
|
|
{
|
|
|
|
Argumnets = "ls",
|
|
|
|
FileName = "powershell",
|
|
|
|
StepBeforeOrAfter = "B",
|
|
|
|
ExecInLocalOrServer = "S",
|
|
|
|
Step = SyncProcessStep.Publish,
|
|
|
|
},
|
|
|
|
new ExecProcess
|
|
|
|
{
|
|
|
|
Argumnets = "ls",
|
|
|
|
FileName = "powershell",
|
|
|
|
StepBeforeOrAfter = "A",
|
|
|
|
ExecInLocalOrServer = "S",
|
|
|
|
Step = SyncProcessStep.Publish,
|
|
|
|
},
|
2024-09-23 05:55:17 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public Config TestConfig;
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
{
|
|
|
|
GC.SuppressFinalize(this);
|
|
|
|
}
|
|
|
|
}
|