diff --git a/src/AWS.Deploy.DockerEngine/Properties/DockerFileConfig.json b/src/AWS.Deploy.DockerEngine/Properties/DockerFileConfig.json index 122d06c3..3c0cadf6 100644 --- a/src/AWS.Deploy.DockerEngine/Properties/DockerFileConfig.json +++ b/src/AWS.Deploy.DockerEngine/Properties/DockerFileConfig.json @@ -2,11 +2,17 @@ { "SdkType": "Microsoft.NET.Sdk.Web", "ImageMapping": [ + { + "TargetFramework": "net9.0", + "BaseImage": "mcr.microsoft.com/dotnet/aspnet:9.0", + "BuildImage": "mcr.microsoft.com/dotnet/sdk:9.0" + }, { "TargetFramework": "net8.0", "BaseImage": "mcr.microsoft.com/dotnet/aspnet:8.0", "BuildImage": "mcr.microsoft.com/dotnet/sdk:8.0" - }, { + }, + { "TargetFramework": "net7.0", "BaseImage": "mcr.microsoft.com/dotnet/aspnet:7.0", "BuildImage": "mcr.microsoft.com/dotnet/sdk:7.0" @@ -31,11 +37,16 @@ { "SdkType": "Microsoft.NET.Sdk", "ImageMapping": [ + { + "TargetFramework": "net9.0", + "BaseImage": "mcr.microsoft.com/dotnet/runtime:9.0", + "BuildImage": "mcr.microsoft.com/dotnet/sdk:9.0" + }, { "TargetFramework": "net8.0", "BaseImage": "mcr.microsoft.com/dotnet/runtime:8.0", "BuildImage": "mcr.microsoft.com/dotnet/sdk:8.0" - }, + }, { "TargetFramework": "net7.0", "BaseImage": "mcr.microsoft.com/dotnet/runtime:7.0", diff --git a/src/AWS.Deploy.Orchestration/CdkAppSettingsSerializer.cs b/src/AWS.Deploy.Orchestration/CdkAppSettingsSerializer.cs index 98454fe3..6bf05cb0 100644 --- a/src/AWS.Deploy.Orchestration/CdkAppSettingsSerializer.cs +++ b/src/AWS.Deploy.Orchestration/CdkAppSettingsSerializer.cs @@ -53,7 +53,8 @@ public string Build(CloudApplication cloudApplication, Recommendation recommenda ECRRepositoryName = recommendation.DeploymentBundle.ECRRepositoryName ?? "", ECRImageTag = recommendation.DeploymentBundle.ECRImageTag ?? "", DotnetPublishZipPath = recommendation.DeploymentBundle.DotnetPublishZipPath ?? "", - DotnetPublishOutputDirectory = recommendation.DeploymentBundle.DotnetPublishOutputDirectory ?? "" + DotnetPublishOutputDirectory = recommendation.DeploymentBundle.DotnetPublishOutputDirectory ?? "", + NewDeployment = !recommendation.IsExistingCloudApplication }; // Persist deployment bundle settings diff --git a/src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs b/src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs index 237548de..ffd687dd 100644 --- a/src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs +++ b/src/AWS.Deploy.Orchestration/DeploymentBundleHandler.cs @@ -134,8 +134,8 @@ private void SwitchToSelfContainedBuildIfNeeded(Recommendation recommendation) return; // Elastic Beanstalk doesn't currently have .NET 7 preinstalled. - var unavailableFramework = new List { "net7.0" }; - var frameworkNames = new Dictionary { { "net7.0", ".NET 7" } }; + var unavailableFramework = new List { "net7.0", "net9.0" }; + var frameworkNames = new Dictionary { { "net7.0", ".NET 7" }, { "net9.0", ".NET 9" } }; if (unavailableFramework.Contains(targetFramework)) { _interactiveService.LogInfoMessage($"Using self-contained publish since AWS Elastic Beanstalk does not currently have {frameworkNames[targetFramework]} preinstalled"); diff --git a/src/AWS.Deploy.Recipes.CDK.Common/AWS.Deploy.Recipes.CDK.Common.csproj b/src/AWS.Deploy.Recipes.CDK.Common/AWS.Deploy.Recipes.CDK.Common.csproj index b085004d..9250a4a4 100644 --- a/src/AWS.Deploy.Recipes.CDK.Common/AWS.Deploy.Recipes.CDK.Common.csproj +++ b/src/AWS.Deploy.Recipes.CDK.Common/AWS.Deploy.Recipes.CDK.Common.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/AWS.Deploy.Recipes.CDK.Common/RecipeProps.cs b/src/AWS.Deploy.Recipes.CDK.Common/RecipeProps.cs index 76f4c0d3..1dabc5a2 100644 --- a/src/AWS.Deploy.Recipes.CDK.Common/RecipeProps.cs +++ b/src/AWS.Deploy.Recipes.CDK.Common/RecipeProps.cs @@ -70,6 +70,11 @@ public interface IRecipeProps /// The account ID used during deployment. /// string? AWSAccountId { get; set; } + + /// + /// True if the recipe is doing a new deployment. + /// + bool NewDeployment { get; set; } } /// @@ -138,6 +143,11 @@ public class RecipeProps : IRecipeProps /// public string? AWSAccountId { get; set; } + /// + /// True if the recipe is doing a redeployment. + /// + public bool NewDeployment { get; set; } = false; + /// A parameterless constructor is needed for /// or the classes will fail to initialize. /// The warnings are disabled since a parameterless constructor will allow non-nullable properties to be initialized with null values. diff --git a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/AspNetAppAppRunner.csproj b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/AspNetAppAppRunner.csproj index 6293b380..a50c9a84 100644 --- a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/AspNetAppAppRunner.csproj +++ b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/AspNetAppAppRunner.csproj @@ -25,7 +25,7 @@ - + - + - + - + - +