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