diff --git a/site/content/docs/commands/project.md b/site/content/docs/commands/project.md index 5142cfa24..ce07fa4a2 100644 --- a/site/content/docs/commands/project.md +++ b/site/content/docs/commands/project.md @@ -10,4 +10,6 @@ Generates and saves the deployment CDK project in a user provided directory path without proceeding with a deployment. Allows user to customize the CDK project before deploying the application. ### Examples -TBD... +``` +dotnet aws deployment-project generate --region us-west-2 +``` \ No newline at end of file diff --git a/site/content/docs/commands/server-mode.md b/site/content/docs/commands/server-mode.md index ab59fd41d..4e763af8b 100644 --- a/site/content/docs/commands/server-mode.md +++ b/site/content/docs/commands/server-mode.md @@ -9,6 +9,7 @@ ### Description Starts the tool in the server mode to provide integration with IDEs, for example Visual Studio. This tool is not intended for the end user usage unless you are writing a custom integration into an IDE. -### Options - -TODO +### Examples +``` +dotnet aws server-mode --port 1234 --parent-pid 12345 +``` diff --git a/site/content/index.md b/site/content/index.md index 2f1b2f0ac..45791c707 100644 --- a/site/content/index.md +++ b/site/content/index.md @@ -20,10 +20,6 @@ AWS Deploy tool is available for download as a NuGet package. See [How to instal ### ... in AWS Toolkit for Visual Studio The AWS Toolkit for Visual Studio exposes the same deployment functionality via **Publish to AWS** feature. For information about toolkit versions and using the feature, see [Publish to AWS](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/publish-experience.html) in the [AWS Toolkit for Visual Studio User Guide](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/). -## What's new? - -TODO - ## Additional Resources * The [aws-dotnet-deploy](https://github.com/aws/aws-dotnet-deploy) GitHub repo. diff --git a/site/content/troubleshooting-guide/missing-dependencies.md b/site/content/troubleshooting-guide/missing-dependencies.md index 357d35ece..633f14cfb 100644 --- a/site/content/troubleshooting-guide/missing-dependencies.md +++ b/site/content/troubleshooting-guide/missing-dependencies.md @@ -6,7 +6,7 @@ This section of the troubleshooting guide explains how to determine, diagnose, a **Why is this happening**: AWS.Deploy.Tools relies on [AWS Cloud Development Kit](https://aws.amazon.com/cdk/) (CDK) to provision resources for your cloud application. AWS CDK requires Node.js to be installed in your machine. See the [CDK's FAQs](https://aws.amazon.com/cdk/faqs/) for more information about how it uses Node.js. -*Minimum required Node.js version >= 10.13.0* +*Minimum required Node.js version >= 14.17.0* **Resolution**: See [here](https://nodejs.org/en/download/) to install Node.js on your system. diff --git a/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs b/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs index b2823bc1f..b9cd04b6a 100644 --- a/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs +++ b/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs @@ -164,6 +164,7 @@ public partial class OptionSettingItem : IOptionSettingItem /// /// The validation state of the setting that contains the validation status and message. /// + [JsonIgnore] public OptionSettingValidation Validation { get; set; } public OptionSettingItem(string id, string fullyQualifiedId, string name, string description) diff --git a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe index 973795dfd..35bfba1ef 100644 --- a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe +++ b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe @@ -470,6 +470,15 @@ "DefaultValue": "Sun:00:00", "AdvancedSetting": true, "Updatable": true, + "Validators": [ + { + "ValidatorType": "Regex", + "Configuration": { + "Regex": "^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$", + "ValidationFailedMessage": "Invalid Preferred Start Time. You need to specify a day and time in the 'day:hour:minute' format such as 'Sun:00:00'." + } + } + ], "DependsOn": [ { "Id": "ElasticBeanstalkManagedPlatformUpdates.ManagedActionsEnabled", diff --git a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe index 2d726848a..f0400a88a 100644 --- a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe +++ b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe @@ -459,6 +459,15 @@ "DefaultValue": "Sun:00:00", "AdvancedSetting": true, "Updatable": true, + "Validators": [ + { + "ValidatorType": "Regex", + "Configuration": { + "Regex": "^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$", + "ValidationFailedMessage": "Invalid Preferred Start Time. You need to specify a day and time in the 'day:hour:minute' format such as 'Sun:00:00'." + } + } + ], "DependsOn": [ { "Id": "ElasticBeanstalkManagedPlatformUpdates.ManagedActionsEnabled", diff --git a/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs b/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs index 66c117650..6c3a5d664 100644 --- a/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs +++ b/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs @@ -46,6 +46,23 @@ public async Task ApplicationNameValidationTest(string value, bool isValid) await Validate(optionSettingItem, value, isValid); } + [Theory] + [InlineData("Sun:00:00", true)] + [InlineData("sun:00:00", false)] + [InlineData("Suns:00:00", false)] + [InlineData("Mon:23:59", true)] + [InlineData("Mon:24:00", false)] + [InlineData("Mon:00:60", false)] + [InlineData("", false)] + [InlineData("test", false)] + public async Task PreferredStartTimeValidationTest(string value, bool isValid) + { + var optionSettingItem = new OptionSettingItem("id", "fullyQualifiedId", "name", "description"); + // valid examples are in the 'day:hour:minute' pattern such as 'Sun:00:00' + optionSettingItem.Validators.Add(GetRegexValidatorConfig("^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$")); + await Validate(optionSettingItem, value, isValid); + } + [Theory] [InlineData("abc-123", true)] [InlineData("abc-ABC-123-xyz", true)] diff --git a/version.json b/version.json index bdfbd567f..3d784fe69 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.50", + "version": "1.0", "publicReleaseRefSpec": [ ".*" ],