Skip to content

Commit

Permalink
Merge pull request #336 from aws/kmalhar/improve-console-output
Browse files Browse the repository at this point in the history
Reword Console Output Text
  • Loading branch information
96malhar authored Sep 29, 2021
2 parents 78b225b + 6dab468 commit dd391d4
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public async Task ExecuteAsync(string saveCdkDirectoryPath, string projectDispla

var saveCdkDirectoryFullPath = _directoryManager.GetDirectoryInfo(saveCdkDirectoryPath).FullName;
_toolInteractiveService.WriteLine();
_toolInteractiveService.WriteLine($"The CDK deployment project is saved at: {saveCdkDirectoryFullPath}");
_toolInteractiveService.WriteLine($"Saving AWS CDK deployment project to: {saveCdkDirectoryFullPath}");

await _deploymentManifestEngine.UpdateDeploymentManifestFile(saveCdkDirectoryFullPath, _targetApplicationFullPath);
}
Expand Down
6 changes: 3 additions & 3 deletions src/AWS.Deploy.Orchestration/CdkProjectHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task<string> ConfigureCdkProject(OrchestratorSession session, Cloud
else
{
// Create a new temporary CDK project for a new deployment
_interactiveService.LogMessageLine($"Generating a {recommendation.Recipe.Name} CDK Project");
_interactiveService.LogMessageLine("Generating AWS Cloud Development Kit (AWS CDK) deployment project");
cdkProjectPath = CreateCdkProject(recommendation, session);
}

Expand All @@ -69,7 +69,7 @@ public async Task DeployCdkProject(OrchestratorSession session, string cdkProjec
{ EnvironmentVariableKeys.AWS_EXECUTION_ENV, recipeInfo }
};

_interactiveService.LogMessageLine("Starting deployment of CDK Project");
_interactiveService.LogMessageLine("Deploying AWS CDK project");

// Ensure region is bootstrapped
await _commandLineWrapper.Run($"npx cdk bootstrap aws://{session.AWSAccountId}/{session.AWSRegion}",
Expand Down Expand Up @@ -115,7 +115,7 @@ public string CreateCdkProject(Recommendation recommendation, OrchestratorSessio
var templateEngine = new TemplateEngine();
templateEngine.GenerateCDKProjectFromTemplate(recommendation, session, saveCdkDirectoryPath, assemblyName);

_interactiveService.LogDebugLine($"The CDK Project is saved at: {saveCdkDirectoryPath}");
_interactiveService.LogDebugLine($"Saving AWS CDK deployment project to: {saveCdkDirectoryPath}");
return saveCdkDirectoryPath;
}

Expand Down
2 changes: 1 addition & 1 deletion src/AWS.Deploy.Orchestration/Orchestrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public async Task DeployRecommendation(CloudApplication cloudApplication, Recomm
throw new InvalidOperationException($"{nameof(_directoryManager)} must not be null.");
}

_interactiveService.LogMessageLine("Configuring AWS Cloud Development Kit (CDK)...");
var cdkProject = await _cdkProjectHandler.ConfigureCdkProject(_session, cloudApplication, recommendation);
_interactiveService.LogMessageLine("AWS CDK is being configured.");

var projFiles = _directoryManager.GetProjFiles(cdkProject);
var cdkVersion = _cdkVersionDetector.Detect(projFiles);
Expand Down
4 changes: 2 additions & 2 deletions test/AWS.Deploy.CLI.IntegrationTests/BlazorWasmTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public async Task DefaultConfigurations(params string[] components)

var deployStdOut = _interactiveService.StdOutReader.ReadAllLines();

var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("The CDK Project is saved at:"));
var tempCdkProject = tempCdkProjectLine.Split(":")[1].Trim();
var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("Saving AWS CDK deployment project to: "));
var tempCdkProject = tempCdkProjectLine.Split(": ")[1].Trim();
Assert.False(Directory.Exists(tempCdkProject), $"{tempCdkProject} must not exist.");

// Example URL string: BlazorWasm5068e7a879d5ee.EndpointURL = http://blazorwasm5068e7a879d5ee-blazorhostc7106839-a2585dcq9xve.s3-website-us-west-2.amazonaws.com/
Expand Down
4 changes: 2 additions & 2 deletions test/AWS.Deploy.CLI.IntegrationTests/ConsoleAppTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public async Task DefaultConfigurations(params string[] components)

var deployStdOut = _interactiveService.StdOutReader.ReadAllLines();

var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("The CDK Project is saved at:"));
var tempCdkProject = tempCdkProjectLine.Split(":")[1].Trim();
var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("Saving AWS CDK deployment project to: "));
var tempCdkProject = tempCdkProjectLine.Split(": ")[1].Trim();
Assert.False(Directory.Exists(tempCdkProject), $"{tempCdkProject} must not exist.");

// list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static async Task CreateCDKDeploymentProject(string targetApplicationPath

// Verify project is saved
var stdOut = interactiveService.StdOutReader.ReadAllLines();
var successMessage = $"The CDK deployment project is saved at: {saveDirectoryPath}";
var successMessage = $"Saving AWS CDK deployment project to: {saveDirectoryPath}";

if (!isValid)
{
Expand Down Expand Up @@ -87,7 +87,7 @@ public static async Task CreateCDKDeploymentProjectWithRecipeName(string targetA

// Verify project is saved
var stdOut = interactiveService.StdOutReader.ReadAllLines();
var successMessage = $"The CDK deployment project is saved at: {saveDirectoryPath}";
var successMessage = $"Saving AWS CDK deployment project to: {saveDirectoryPath}";

if (!isValid)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public async Task DefaultConfigurations()

var deployStdOut = _interactiveService.StdOutReader.ReadAllLines();

var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("The CDK Project is saved at:"));
var tempCdkProject = tempCdkProjectLine.Split(":")[1].Trim();
var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("Saving AWS CDK deployment project to: "));
var tempCdkProject = tempCdkProjectLine.Split(": ")[1].Trim();
Assert.False(Directory.Exists(tempCdkProject), $"{tempCdkProject} must not exist.");

// Example: Endpoint: http://52.36.216.238/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public async Task DefaultConfigurations()

var deployStdOut = _interactiveService.StdOutReader.ReadAllLines();

var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("The CDK Project is saved at:"));
var tempCdkProject = tempCdkProjectLine.Split(":")[1].Trim();
var tempCdkProjectLine = deployStdOut.First(line => line.StartsWith("Saving AWS CDK deployment project to: "));
var tempCdkProject = tempCdkProjectLine.Split(": ")[1].Trim();
Assert.False(Directory.Exists(tempCdkProject), $"{tempCdkProject} must not exist.");

var applicationUrl = deployStdOut.First(line => line.Trim().StartsWith("Endpoint:"))
Expand Down

0 comments on commit dd391d4

Please sign in to comment.