Beispiel #1
0
        private string[] GenerateParameters(DeploymentTool.Environment buildEnvironment)
        {
            var parameterDictionary = new Dictionary <string, string>
            {
                { "Environment_Name", buildEnvironment.Name },
                { "Environment_Client", buildEnvironment.Client },
                { "Environment_Database_Name", buildEnvironment.Database.Name },
                { "Environment_Database_Server_HostName", buildEnvironment.Database.Server.HostName },
                { "Environment_Database_Server_BackupLocation", buildEnvironment.Database.Server.BackupLocation },
                { "Environment_Database_Server_RestoreLocation", buildEnvironment.Database.Server.RestoreLocation },
                { "Environment_Database_Server_SqlInstance", buildEnvironment.Database.Server.SqlInstance },
                { "Environment_Redis", string.Join(";", buildEnvironment.RedisServers.Select(SerializeServer)) },
                { "Environment_Web_SiteUrl", buildEnvironment.WebServers.SiteUrl },
                { "Environment_Web", string.Join(";", buildEnvironment.WebServers.WebServers.Select(SerializeServer)) },
                { "Environment_RTE", string.Join(";", buildEnvironment.RTEServers.Select(SerializeServer)) },
            };

            return(parameterDictionary.Select(p => string.Format("{0}=\"{1}\"", p.Key, p.Value)).ToArray());
        }
Beispiel #2
0
        public bool Run(BuildSystem.ProcessTextReceivedDelegate textReceived, string target, DeploymentTool.Environment buildEnvironment)
        {
            var parameters = GenerateParameters(buildEnvironment);

            return(Run(textReceived, target, parameters));
        }