Add setting to extend dotnet-publish arguments in ApplicationDeployer

This commit is contained in:
Nate McMaster 2017-01-12 11:24:19 -08:00 committed by GitHub
parent ac8a86ff3f
commit e312552edd
2 changed files with 9 additions and 1 deletions

View File

@ -76,6 +76,11 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
/// </summary>
public string Configuration { get; set; } = "Debug";
/// <summary>
/// Space separated command line arguments to be passed to dotnet-publish
/// </summary>
public string AdditionalPublishParameters { get; set; }
/// <summary>
/// To publish the application before deployment.
/// </summary>

View File

@ -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)