private string[] GetCommandParts()
 {
     var siteUrl = deployUnit.SiteUrl.Replace("localhost", HostNameUtil.GetFullHostName());
     var verifyCommand = command.Replace("%SITE_URL%", siteUrl);
     var commandParts = verifyCommand.Split(new[] { ' ' });
     return commandParts;
 }
Beispiel #2
0
        public override DeployUnitInfo GetUnitInfo()
        {
            var deployUnitInfo = base.GetUnitInfo();

            deployUnitInfo.Status = UnitStatus.NA;
            deployUnitInfo.Url    = Url != null?Url.Replace("localhost", HostNameUtil.GetFullHostName()) : null;

            return(deployUnitInfo);
        }
        public override DeployUnitInfo GetUnitInfo(bool refreshUnitStatus)
        {
            var deployUnitInfo = base.GetUnitInfo(refreshUnitStatus);

            deployUnitInfo.Status = UnitStatus.NA;
            deployUnitInfo.Url    = Url?.Replace("localhost", HostNameUtil.GetFullHostName());

            return(deployUnitInfo);
        }
Beispiel #4
0
        public void can_get_deploy_unit_info()
        {
            var units = Agent.Get <List <DeployUnitInfoDTO> >("/units/list");

            units.Count.ShouldBe(1);
            units[0].name.ShouldBe("PSTest");
            units[0].status.ShouldBe("NA");
            units[0].url.ShouldBe(string.Format("http://{0}:2121", HostNameUtil.GetFullHostName()));
            units[0].hasDeployParameters.ShouldBe(true);
        }
        public override DeployUnitInfo GetUnitInfo(bool refreshUnitStatus)
        {
            var unitInfo = base.GetUnitInfo(refreshUnitStatus);

            if (!string.IsNullOrEmpty(Url))
            {
                unitInfo.Url = Url.Replace("localhost", HostNameUtil.GetFullHostName());
            }

            unitInfo.Status = (UnitStatus)_lastUnitStatus;

            return(unitInfo);
        }
Beispiel #6
0
        public override DeployUnitInfo GetUnitInfo(bool refreshUnitStatus)
        {
            var siteInfo = base.GetUnitInfo(refreshUnitStatus);

            if ((UnitStatus)_lastUnitStatus == UnitStatus.NotFound)
            {
                siteInfo.Version = new DeployedVersion {
                    VersionNumber = "0.0.0.0"
                };
            }

            siteInfo.Url    = SiteUrl.Replace("localhost", HostNameUtil.GetFullHostName());
            siteInfo.Status = (UnitStatus)_lastUnitStatus;

            return(siteInfo);
        }
Beispiel #7
0
        public override DeployUnitInfo GetUnitInfo()
        {
            var siteInfo = base.GetUnitInfo();

            var siteData = GetWebServer().GetInfo();

            if (siteData == null)
            {
                siteInfo.Status  = UnitStatus.NotFound;
                siteInfo.Version = new DeployedVersion {
                    VersionNumber = "0.0.0.0"
                };
                return(siteInfo);
            }

            siteInfo.Url    = SiteUrl.Replace("localhost", HostNameUtil.GetFullHostName());
            siteInfo.Status = (siteData.AppPoolStarted && siteData.SiteStarted) ? UnitStatus.Running : UnitStatus.Stopped;

            return(siteInfo);
        }
        public override DeployUnitInfo GetUnitInfo()
        {
            var serviceManager = new ServiceController(ServiceName);

            var unitInfo = base.GetUnitInfo();

            if (!string.IsNullOrEmpty(Url))
            {
                unitInfo.Url = Url.Replace("localhost", HostNameUtil.GetFullHostName());
            }

            try
            {
                unitInfo.Status = serviceManager.Status == ServiceControllerStatus.Running ? UnitStatus.Running : UnitStatus.Stopped;
            }
            catch
            {
                unitInfo.Status = UnitStatus.NotFound;
            }

            return(unitInfo);
        }