Пример #1
0
        public void Deploy(string package, string webProject, Dictionary<string, object> environment, string username = "", string password = "", bool verbose = false)
        {
            _verbose = verbose;

            var archive = ConfiguredMsDeployArchiveDirectory(package, webProject, environment);
            var servers = Servers(environment);

            foreach (var server in servers)
            {
                var site = environment["site"];
                _log.Info("deploying to server: {0}, site: {1}", server, site);

                var args = new ExecArgsBuilder();
                args.Add("-source:archiveDir='{0}'", archive);
                args.Add(
                    "-dest:auto,computerName='http://{0}/MSDeployAgentService',includeAcls='False',username='******',password='******',authtype=ntlm",
                    server, username, password);
                args.Add("-verb:sync");
                args.Add("-disableLink:AppPoolExtension");
                args.Add("-disableLink:ContentExtension");
                args.Add("-disableLink:CertificateExtension");
                args.Add(@"-setParam:""IIS Web Application Name""=""{0}""", site);
                _shell.Exec(@"msdeploy", args.Args);
            }
        }
Пример #2
0
        public void Deploy(string package, string webProject, Dictionary <string, object> environment, string username = "", string password = "", bool verbose = false)
        {
            _verbose = verbose;

            var archive = ConfiguredMsDeployArchiveDirectory(package, webProject, environment);
            var servers = Servers(environment);

            foreach (var server in servers)
            {
                var site = environment["site"];
                _log.Info("deploying to server: {0}, site: {1}", server, site);

                var args = new ExecArgsBuilder();
                args.Add("-source:archiveDir='{0}'", archive);
                args.Add(
                    "-dest:auto,computerName='http://{0}/MSDeployAgentService',includeAcls='False',username='******',password='******',authtype=ntlm",
                    server, username, password);
                args.Add("-verb:sync");
                args.Add("-disableLink:AppPoolExtension");
                args.Add("-disableLink:ContentExtension");
                args.Add("-disableLink:CertificateExtension");
                args.Add(@"-setParam:""IIS Web Application Name""=""{0}""", site);
                _shell.Exec(@"msdeploy", args.Args);
            }
        }