From e312552edd196fa949498e09cf24d3eef4b3f0bd Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 12 Jan 2017 11:24:19 -0800 Subject: [PATCH] Add setting to extend dotnet-publish arguments in ApplicationDeployer --- .../Common/DeploymentParameters.cs | 5 +++++ .../Deployers/ApplicationDeployer.cs | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Common/DeploymentParameters.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Common/DeploymentParameters.cs index 9b2187c8b1..54c2517919 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Common/DeploymentParameters.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Common/DeploymentParameters.cs @@ -76,6 +76,11 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting /// public string Configuration { get; set; } = "Debug"; + /// + /// Space separated command line arguments to be passed to dotnet-publish + /// + public string AdditionalPublishParameters { get; set; } + /// /// To publish the application before deployment. /// diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs index e861cebc0a..718bb54541 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs @@ -48,7 +48,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting var parameters = $"publish " + $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\"" + $" --framework {DeploymentParameters.TargetFramework}" - + $" --configuration {DeploymentParameters.Configuration}"; + + $" --configuration {DeploymentParameters.Configuration}" + + $" {DeploymentParameters.AdditionalPublishParameters}"; Logger.LogInformation($"Executing command {DotnetCommandName} {parameters}"); @@ -103,6 +104,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting { if (hostProcess != null && !hostProcess.HasExited) { + Logger.LogInformation("Attempting to cancel process {0}", hostProcess.Id); + // Shutdown the host process. hostProcess.KillTree(); if (!hostProcess.HasExited)