static void Main(string[] args) { try { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; default: System.Console.WriteLine("No Command Found"); break; } } catch (Exception e) { System.Console.WriteLine("Error occured starting pipeline " + e); } }
static void Main(string[] args) { switch (args[0]) { case "install": InstallArgs installArgs = new InstallArgs(args); InstallProcess installProcess = new InstallProcess(); installProcess.Execute(installArgs); break; case "delete": DeleteArgs deleteArgs = new DeleteArgs(args); DeleteProcess deleteProcess = new DeleteProcess(); deleteProcess.Execute(deleteArgs); break; } }
public bool Execute(InstallArgs args) { try { System.Console.WriteLine("SIM: Starting Install"); string instanceRootDirectoryPath = args.InstanceDirectory + "\\" + args.InstanceName; Instance instance = InstanceManager.GetInstance(args.InstanceName); if (instance != null) { System.Console.WriteLine("SIM: Warning! The instance with the same ({0}) name already exists", args.InstanceName); } // Next lets check the rootDirectoryPath folder for uniqueness if (Directory.Exists(instanceRootDirectoryPath)) { System.Console.WriteLine("SIM: Warning! The folder {0} already exists", instanceRootDirectoryPath); } Product product; string repoFullPath = args.RepoDirectory + "\\" + args.RepoFile; var result = Product.TryParse(repoFullPath, out product); if (result == false) { System.Console.WriteLine("SIM: Warning! Can't detect Sitecore-based product in {0} file", args.RepoFile); } var modules = new List<Product>(); if (!string.IsNullOrEmpty(args.Modules)) { var modulesNames = args.Modules.Split('|'); foreach (var moduleName in modulesNames) { string modulePath = args.RepoDirectory + "\\" + moduleName; Product module; Product.TryParse(modulePath, out module); if (module != null) { modules.Add(module); } } } SIM.Pipelines.Install.InstallArgs installArgs = new SIM.Pipelines.Install.InstallArgs(args.InstanceName, args.InstanceName, product, instanceRootDirectoryPath, new SqlConnectionStringBuilder(args.ConnectionString), args.AppPoolIdentity, args.AppPoolIdentity, new FileInfo(args.LicencePath), true, false, false, modules); IPipelineController controller = new ConsoleController(); // Lets start installation PipelineManager.Initialize(); PipelineManager.StartPipeline( "install", installArgs, controller, false); System.Console.WriteLine("SIM: Finished Install"); return true; } catch (Exception ex) { System.Console.WriteLine("Sitecore SIM install failed {0}", ex); return false; } }
public bool Execute(InstallArgs args) { try { System.Console.WriteLine("SIM: Starting Install"); string instanceRootDirectoryPath = args.InstanceDirectory + "\\" + args.InstanceName; Instance instance = InstanceManager.GetInstance(args.InstanceName); if (instance != null) { System.Console.WriteLine("SIM: Warning! The instance with the same ({0}) name already exists", args.InstanceName); } // Next lets check the rootDirectoryPath folder for uniqueness if (Directory.Exists(instanceRootDirectoryPath)) { System.Console.WriteLine("SIM: Warning! The folder {0} already exists", instanceRootDirectoryPath); } Product product; string repoFullPath = args.RepoDirectory + "\\" + args.RepoFile; var result = Product.TryParse(repoFullPath, out product); if (result == false) { System.Console.WriteLine("SIM: Warning! Can't detect Sitecore-based product in {0} file", args.RepoFile); } var modules = new List <Product>(); if (!string.IsNullOrEmpty(args.Modules)) { var modulesNames = args.Modules.Split('|'); foreach (var moduleName in modulesNames) { string modulePath = args.RepoDirectory + "\\" + moduleName; Product module; var isModule = Product.TryParse(modulePath, out module); if (!isModule) { System.Console.WriteLine("SIM: Warning! Can't detect Sitecore-based module in {0} file", moduleName); } else { if (module != null) { modules.Add(module); } } } } SIM.Pipelines.Install.InstallArgs installArgs = new SIM.Pipelines.Install.InstallArgs(args.InstanceName, args.HostName, product, instanceRootDirectoryPath, new SqlConnectionStringBuilder(args.ConnectionString), args.AppPoolIdentity, args.AppPoolIdentity, new FileInfo(args.LicencePath), true, false, false, modules); IPipelineController controller = new ConsoleController(); // Lets start installation PipelineManager.Initialize(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, PipelineManager.PipelinesConfigFilePath)); PipelineManager.StartPipeline( "install", installArgs, controller, false); System.Console.WriteLine("SIM: Finished Install"); return(true); } catch (Exception ex) { System.Console.WriteLine("Sitecore SIM install failed {0}", ex); return(false); } }