1 write to DeploymentParameters
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\ApplicationDeployer.cs (1)
23DeploymentParameters = deploymentParameters;
146 references to DeploymentParameters
Microsoft.AspNetCore.Server.IntegrationTesting (79)
Deployers\ApplicationDeployer.cs (26)
32if (DeploymentParameters.ServerType == ServerType.None) 34throw new ArgumentException($"Invalid ServerType '{DeploymentParameters.ServerType}'."); 37if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.None && !string.IsNullOrEmpty(DeploymentParameters.TargetFramework)) 39DeploymentParameters.RuntimeFlavor = GetRuntimeFlavor(DeploymentParameters.TargetFramework); 42if (DeploymentParameters.ApplicationPublisher == null) 44ArgumentException.ThrowIfNullOrEmpty(DeploymentParameters.ApplicationPath); 46if (!Directory.Exists(DeploymentParameters.ApplicationPath)) 48throw new DirectoryNotFoundException($"Application path {DeploymentParameters.ApplicationPath} does not exist."); 51if (string.IsNullOrEmpty(DeploymentParameters.ApplicationName)) 53DeploymentParameters.ApplicationName = new DirectoryInfo(DeploymentParameters.ApplicationPath).Name; 77var publisher = DeploymentParameters.ApplicationPublisher ?? new ApplicationPublisher(DeploymentParameters.ApplicationPath); 78_publishedApplication = publisher.Publish(DeploymentParameters, Logger).GetAwaiter().GetResult(); 79DeploymentParameters.PublishedApplicationRootPath = _publishedApplication.Path; 86if (DeploymentParameters.PreservePublishedApplicationForDebugging) 90$"'{nameof(DeploymentParameters.PreservePublishedApplicationForDebugging)}' is set to 'true'."); 103if (DotNetCommands.IsRunningX86OnX64(DeploymentParameters.RuntimeArchitecture)) 105executableName = DotNetCommands.GetDotNetExecutable(DeploymentParameters.RuntimeArchitecture); 141ProcessHelpers.SetEnvironmentVariable(environment, "ASPNETCORE_ENVIRONMENT", DeploymentParameters.EnvironmentName, Logger); 149if (DeploymentParameters.UserAdditionalCleanup != null) 154DeploymentParameters.UserAdditionalCleanup(DeploymentParameters); 179Logger.LogInformation($"Deploying {DeploymentParameters}");
Deployers\NginxDeployer.cs (15)
34var uri = string.IsNullOrEmpty(DeploymentParameters.ApplicationBaseUriHint) ? 36new Uri(DeploymentParameters.ApplicationBaseUriHint); 58if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr 59&& DeploymentParameters.ApplicationType == ApplicationType.Standalone) 62DeploymentParameters.PublishApplicationBeforeDeployment = true; 65if (DeploymentParameters.PublishApplicationBeforeDeployment) 94DeploymentParameters, 96contentRoot: DeploymentParameters.ApplicationPath, 138var pidFile = Path.Combine(DeploymentParameters.ApplicationPath, $"{Guid.NewGuid()}.nginx.pid"); 139var errorLog = Path.Combine(DeploymentParameters.ApplicationPath, "nginx.error.log"); 140var accessLog = Path.Combine(DeploymentParameters.ApplicationPath, "nginx.access.log"); 141DeploymentParameters.ServerConfigTemplateContent = DeploymentParameters.ServerConfigTemplateContent 153Logger.LogTrace($"Config File Content:{Environment.NewLine}===START CONFIG==={Environment.NewLine}{{configContent}}{Environment.NewLine}===END CONFIG===", DeploymentParameters.ServerConfigTemplateContent); 155File.WriteAllText(_configFile, DeploymentParameters.ServerConfigTemplateContent);
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (7)
103DeploymentParameters, 104DeploymentParameters.ApplicationBaseUriHint); 141Logger.LogInformation($"Deleting the locally published folder '{DeploymentParameters.PublishedApplicationRootPath}'"); 142Directory.Delete(DeploymentParameters.PublishedApplicationRootPath, recursive: true); 146Logger.LogWarning(0, ex, $"Failed to delete the locally published folder '{DeploymentParameters.PublishedApplicationRootPath}'."); 200var applicationName = new DirectoryInfo(DeploymentParameters.ApplicationPath).Name; 201if (DeploymentParameters.ApplicationType == ApplicationType.Portable)
Deployers\SelfHostDeployer.cs (31)
39if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr 40&& DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x86) 43DeploymentParameters.PublishApplicationBeforeDeployment = true; 46if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr 47&& DeploymentParameters.ApplicationType == ApplicationType.Standalone) 50DeploymentParameters.PublishApplicationBeforeDeployment = true; 53if (DeploymentParameters.PublishApplicationBeforeDeployment) 59DeploymentParameters.ServerType, 60DeploymentParameters.Scheme, 61DeploymentParameters.ApplicationBaseUriHint, 62DeploymentParameters.StatusMessagesEnabled); 71DeploymentParameters, 73contentRoot: DeploymentParameters.PublishApplicationBeforeDeployment ? DeploymentParameters.PublishedApplicationRootPath : DeploymentParameters.ApplicationPath, 85var executableExtension = DeploymentParameters.ApplicationType == ApplicationType.Portable ? ".dll" 88if (DeploymentParameters.PublishApplicationBeforeDeployment) 90workingDirectory = DeploymentParameters.PublishedApplicationRootPath; 96var targetFramework = DeploymentParameters.TargetFramework 97?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? Tfm.Net462 : Tfm.NetCoreApp22); 98workingDirectory = Path.Combine(DeploymentParameters.ApplicationPath, "bin", DeploymentParameters.Configuration, targetFramework); 100DeploymentParameters.EnvironmentVariables["ASPNETCORE_CONTENTROOT"] = DeploymentParameters.ApplicationPath; 103var executable = Path.Combine(workingDirectory, DeploymentParameters.ApplicationName + executableExtension); 105if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr && DeploymentParameters.ApplicationType == ApplicationType.Portable) 115var server = DeploymentParameters.ServerType == ServerType.HttpSys 140AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.EnvironmentVariables); 193if (DeploymentParameters.StatusMessagesEnabled) 211if (DeploymentParameters.PublishApplicationBeforeDeployment)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (67)
IISDeployer.cs (14)
81if (string.IsNullOrEmpty(DeploymentParameters.ServerConfigTemplateContent)) 83DeploymentParameters.ServerConfigTemplateContent = File.ReadAllText("IIS.config"); 87DeploymentParameters.PublishApplicationBeforeDeployment = true; 106var contentRoot = DeploymentParameters.PublishedApplicationRootPath; 110var uri = TestUriHelper.BuildTestUri(ServerType.IIS, DeploymentParameters.ApplicationBaseUriHint); 133value: DeploymentParameters.HostingModel.ToString()); 145aspNetCore.SetAttributeValue("processPath", DotNetCommands.GetDotNetExecutable(DeploymentParameters.RuntimeArchitecture)); 170if (DeploymentParameters.EnvironmentVariables.TryGetValue("ASPNETCORE_MODULE_DEBUG_FILE", out debugFile)) 185var file = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, debugLogLocation); 311var config = XDocument.Parse(DeploymentParameters.ServerConfigTemplateContent ?? File.ReadAllText("IIS.config")); 360if (DeploymentParameters.EnvironmentVariables.Any()) 365foreach (var tuple in DeploymentParameters.EnvironmentVariables) 374if (DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x86) 510HelixHelper.PreserveFile(Path.Combine(DeploymentParameters.PublishedApplicationRootPath, "web.config"), fileNamePrefix + ".web.config");
IISDeployerBase.cs (3)
38if (!DeploymentParameters.PublishApplicationBeforeDeployment) 43var path = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, "web.config"); 95var arch = DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x64 ? $@"{basePath}x64\{ancmDllName}" : $@"{basePath}x86\{ancmDllName}";
IISExpressDeployer.cs (50)
41protected override string ApplicationHostConfigPath => DeploymentParameters.ServerConfigLocation; 57if (DeploymentParameters.PublishApplicationBeforeDeployment) 60contentRoot = DeploymentParameters.PublishedApplicationRootPath; 66contentRoot = DeploymentParameters.ApplicationPath; 68var executableExtension = DeploymentParameters.ApplicationType == ApplicationType.Portable ? ".dll" : ".exe"; 69var entryPoint = Path.Combine(dllRoot, DeploymentParameters.ApplicationName + executableExtension); 74if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr && DeploymentParameters.ApplicationType == ApplicationType.Portable) 85DeploymentParameters.EnvironmentVariables["LAUNCHER_PATH"] = executableName; 86DeploymentParameters.EnvironmentVariables["LAUNCHER_ARGS"] = executableArgs; 89Logger.LogInformation("ContentRoot: {path}", DeploymentParameters.ApplicationPath); 90DeploymentParameters.EnvironmentVariables["ASPNETCORE_CONTENTROOT"] = DeploymentParameters.ApplicationPath; 116var targetFramework = DeploymentParameters.TargetFramework; 117if (!string.IsNullOrEmpty(DeploymentParameters.ApplicationPath)) 120dllRoot = Path.Combine(DeploymentParameters.ApplicationPath, "bin", DeploymentParameters.RuntimeArchitecture.ToString(), 121DeploymentParameters.Configuration, targetFramework); 126dllRoot = Path.Combine(DeploymentParameters.ApplicationPath, "bin", DeploymentParameters.Configuration, targetFramework); 131DeploymentParameters.PublishApplicationBeforeDeployment = true; 133else if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr 134&& DeploymentParameters.RuntimeArchitecture == RuntimeArchitecture.x86) 137DeploymentParameters.PublishApplicationBeforeDeployment = true; 142if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr 143&& DeploymentParameters.ApplicationType == ApplicationType.Standalone) 146DeploymentParameters.PublishApplicationBeforeDeployment = true; 160var uri = TestUriHelper.BuildTestUri(ServerType.IISExpress, DeploymentParameters.ApplicationBaseUriHint); 170var parameters = string.IsNullOrEmpty(DeploymentParameters.ServerConfigLocation) ? 172string.Format(CultureInfo.InvariantCulture, "/site:{0} /config:{1} /trace:error /systray:false", DeploymentParameters.SiteName, DeploymentParameters.ServerConfigLocation); 188AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.EnvironmentVariables); 275var serverConfig = DeploymentParameters.ServerConfigTemplateContent; 299if (!DeploymentParameters.PublishApplicationBeforeDeployment && !File.Exists(webConfigPath)) 308DeploymentParameters.ServerConfigLocation = Path.GetTempFileName(); 309Logger.LogDebug("Saving Config to {configPath}", DeploymentParameters.ServerConfigLocation); 311File.WriteAllText(DeploymentParameters.ServerConfigLocation, serverConfig); 320aspNetCore.SetAttributeValue("hostingModel", DeploymentParameters.HostingModel.ToString()); 348value: DeploymentParameters.HostingModel.ToString()); 356if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr 357&& DeploymentParameters.ApplicationType == ApplicationType.Portable 358&& DotNetCommands.IsRunningX86OnX64(DeploymentParameters.RuntimeArchitecture)) 360var executableName = DotNetCommands.GetDotNetExecutable(DeploymentParameters.RuntimeArchitecture); 378if (DotNetCommands.IsRunningX86OnX64(DeploymentParameters.RuntimeArchitecture)) 412if (!string.IsNullOrEmpty(DeploymentParameters.ServerConfigLocation) 413&& File.Exists(DeploymentParameters.ServerConfigLocation)) 416Logger.LogDebug("Deleting applicationHost.config file from {configLocation}", DeploymentParameters.ServerConfigLocation); 419File.Delete(DeploymentParameters.ServerConfigLocation); 424Logger.LogWarning("Failed to delete '{config}'. Exception : {exception}", DeploymentParameters.ServerConfigLocation, exception.Message); 428if (DeploymentParameters.PublishApplicationBeforeDeployment)