сохранение и публикация файлов вывода при установке сапфора на сервере.

возможность указать автоматическую сборку сапфора после публикации компонента.
This commit is contained in:
2023-11-14 00:56:05 +03:00
parent 362d6b56ee
commit 38eea01f5c
14 changed files with 102 additions and 69 deletions

View File

@@ -1,5 +1,6 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;
@@ -12,6 +13,7 @@ import Visual_DVM_2021.Passes.SSH.ConnectionPass;
import Visual_DVM_2021.Passes.TestingSystemPass;
import java.util.Date;
import java.util.Vector;
public class InstallServerSapfor extends ConnectionPass<Object> {
boolean result;
ServerSapfor serverSapfor;
@@ -49,7 +51,7 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
protected void ServerAction() throws Exception {
RemoteFile testingSystemHome = new RemoteFile(sftpChannel.pwd(), "testing_system", true);
RemoteFile repo = new RemoteFile(testingSystemHome.full_name, "Repo", true);
RemoteFile repoSapforHome = new RemoteFile(repo.full_name + "/sapfor/experts/Sapfor_2017/_bin", true);
RemoteFile repoSapforHome = new RemoteFile(repo.full_name + Constants.SAPFOR_REPOSITORY_BIN, true);
//--
ShowMessage1("Синхронизация ветви DVM...");
ShellCommand("cd " + Utils.DQuotes(repo.full_name), "svn checkout " + Constants.REPOSITORY_AUTHENTICATION + " " + Constants.DVM_REPOSITORY + "\n");
@@ -61,8 +63,7 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
if (Exists(repoSapforHome.full_name, repo_bin.name))
sftpChannel.rm(repo_bin.full_name);
//--
performScript(repoSapforHome, "cmake ../", "make -j 4" );
// ShellCommand("cd " + Utils.DQuotes(repoSapforHome.full_name), "cmake ../", "make -j 4");
performScript(repoSapforHome, "cmake ../", "make -j 4");
result = Exists(repoSapforHome.full_name, "Sapfor_F");
if (result) {
RemoteFile sapforsDirectory = new RemoteFile(testingSystemHome.full_name, "Sapfors", true);
@@ -93,6 +94,22 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
}
}.Do();
}
new TestingSystemPass() {
@Override
public String getDescription() {
return "Рассылка выходных файлов сборки SAPFOR";
}
@Override
protected void ServerAction() throws Exception {
Vector<String> info = new Vector<>();
info.add(result ? serverSapfor.version : "?");
info.add(result ? "Успешно" : "С ошибками");
Command(new ServerExchangeUnit_2021(ServerCode.EmailSapforAssembly,
Current.getAccount().email,
info
));
}
}.Do();
}
@Override
protected boolean validate() {