diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml
index be4541ad1..56d480f7a 100644
--- a/.github/workflows/codebuild-ci.yml
+++ b/.github/workflows/codebuild-ci.yml
@@ -1,6 +1,11 @@
name: AWS CodeBuild CI
on:
+ # Manually trigger on specific branches
+ workflow_dispatch:
+ push:
+ branches:
+ - dev
pull_request:
branches:
- main
@@ -19,10 +24,12 @@ jobs:
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
role-duration-seconds: 7200
aws-region: us-west-2
+
- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
+
- name: Invoke Load Balancer Lambda
id: lambda
shell: pwsh
@@ -30,17 +37,23 @@ jobs:
aws lambda invoke response.json --function-name "${{ secrets.CI_TESTING_LOAD_BALANCER_LAMBDA_NAME }}" --cli-binary-format raw-in-base64-out --payload '{\"Roles\": \"${{ secrets.CI_TEST_RUNNER_ACCOUNT_ROLES }}\", \"ProjectName\": \"${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}\", \"Branch\": \"${{ github.sha }}\"}'
$roleArn=$(cat ./response.json)
"roleArn=$($roleArn -replace '"', '')" >> $env:GITHUB_OUTPUT
+
- name: Configure Test Runner Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ steps.lambda.outputs.roleArn }}
role-duration-seconds: 7200
aws-region: us-west-2
+
- name: Run CodeBuild
id: codebuild
uses: aws-actions/aws-codebuild-run-build@v1.0.3
with:
project-name: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
+ env-vars-for-codebuild: CODECOV_TOKEN
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+
- name: CodeBuild Link
shell: pwsh
run: |
diff --git a/AWS.Deploy.sln b/AWS.Deploy.sln
index d8f591869..6540ad553 100644
--- a/AWS.Deploy.sln
+++ b/AWS.Deploy.sln
@@ -1,4 +1,5 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
@@ -36,12 +37,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.DockerEngine", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Common", "src\AWS.Deploy.Common\AWS.Deploy.Common.csproj", "{3AAC19A6-02E8-45D0-BDD0-CAD0FBE15F64}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ManualLinuxTesting", "ManualLinuxTesting", "{D0172E70-D5BC-4EDE-84E4-9ADB67B5F8FB}"
- ProjectSection(SolutionItems) = preProject
- test\ManualLinuxTesting\Dockerfile = test\ManualLinuxTesting\Dockerfile
- test\ManualLinuxTesting\Readme.md = test\ManualLinuxTesting\Readme.md
- EndProjectSection
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Recipes.CDK.Common", "src\AWS.Deploy.Recipes.CDK.Common\AWS.Deploy.Recipes.CDK.Common.csproj", "{FAE4D4C5-9107-4622-A050-E30CC70BE754}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Orchestration.UnitTests", "test\AWS.Deploy.Orchestration.UnitTests\AWS.Deploy.Orchestration.UnitTests.csproj", "{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E}"
@@ -70,7 +65,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm60", "testapps\Bl
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.DocGenerator", "src\AWS.Deploy.DocGenerator\AWS.Deploy.DocGenerator.csproj", "{6D4BD0C2-C2A0-4AFB-BC22-623DD64A4F84}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWS.Deploy.DocGenerator.UnitTests", "test\AWS.Deploy.DocGenerator.UnitTests\AWS.Deploy.DocGenerator.UnitTests.csproj", "{7E661545-7DFD-4FE3-A5F9-767FAE30DFFE}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.DocGenerator.UnitTests", "test\AWS.Deploy.DocGenerator.UnitTests\AWS.Deploy.DocGenerator.UnitTests.csproj", "{7E661545-7DFD-4FE3-A5F9-767FAE30DFFE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -194,7 +189,6 @@ Global
{F06F9F2B-9018-4357-9ECB-EAF3D9EC335C} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
{4C4F07CE-4C88-44C6-864F-C5E563712EE2} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
{3AAC19A6-02E8-45D0-BDD0-CAD0FBE15F64} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
- {D0172E70-D5BC-4EDE-84E4-9ADB67B5F8FB} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{FAE4D4C5-9107-4622-A050-E30CC70BE754} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{4AD9D400-3F3D-4076-B34C-0F88576C1889} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
diff --git a/README.md b/README.md
index 971e7cda2..740a3db02 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
-# AWS .NET deployment tool [![nuget](https://img.shields.io/nuget/v/AWS.Deploy.Tools.svg) ![downloads](https://img.shields.io/nuget/dt/AWS.Deploy.Tools.svg)](https://www.nuget.org/packages/AWS.Deploy.Tools/)
+# AWS .NET deployment tool
+[![nuget](https://img.shields.io/nuget/v/AWS.Deploy.Tools.svg) ![downloads](https://img.shields.io/nuget/dt/AWS.Deploy.Tools.svg)](https://www.nuget.org/packages/AWS.Deploy.Tools/)
+[![build status](https://img.shields.io/github/actions/workflow/status/aws/aws-dotnet-deploy/codebuild-ci.yml?branch=dev)](https://github.com/aws/aws-dotnet-deploy/actions/workflows/codebuild-ci.yml)
+[![code coverage](https://img.shields.io/codecov/c/github/aws/aws-dotnet-deploy/dev.svg)](https://codecov.io/gh/aws/aws-dotnet-deploy)
## Overview
This repository contains the AWS Deploy Tool for .NET CLI - the opinionated tooling that simplifies deployment of .NET applications. The tool suggests the right AWS compute service to deploy your application to. It then builds and packages your application as required by the chosen compute service, generates the deployment infrastructure, deploys your application by using the appropriate deployment engine (Cloud Development Kit (CDK) or native service APIs), and displays the endpoint.
diff --git a/THIRD_PARTY_LICENSES b/THIRD_PARTY_LICENSES
index c2d93f2de..1d57e0499 100644
--- a/THIRD_PARTY_LICENSES
+++ b/THIRD_PARTY_LICENSES
@@ -1,28 +1,26 @@
-** AWSSDK.EC2; version 3.7.19.1 -- https://www.nuget.org/packages/AWSSDK.EC2
-** Constructs; version 10.0.0 -- https://www.nuget.org/packages/Constructs
-** Amazon.JSII.Runtime; version 1.54.0 -- https://www.nuget.org/packages/Amazon.JSII.Runtime
-** AWSSDK.IdentityManagement; version 3.7.100.15 -- https://www.nuget.org/packages/AWSSDK.IdentityManagement
-** AWSSDK.CloudFormation; version 3.7.101.9 -- https://www.nuget.org/packages/AWSSDK.CloudFormation
-** AWSSDK.SecurityToken; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.SecurityToken
-** AWSSDK.SSO; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.SSO
-** AWSSDK.SSOOIDC; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.SSOOIDC
-** AWSSDK.CloudControlApi; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.CloudControlApi/
-** AWSSDK.CloudWatchEvents; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.CloudWatchEvents/
-** AWSSDK.EC2; version 3.7.105.3 -- https://www.nuget.org/packages/AWSSDK.EC2/
-** AWSSDK.Extensions.NETCore.Setup; version 3.7.2 -- https://www.nuget.org/packages/AWSSDK.Extensions.NETCore.Setup
-** AWSSDK.AppRunner; version 3.7.102.7 -- https://www.nuget.org/packages/AWSSDK.AppRunner/
-** AWSSDK.CloudFront; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.CloudFront/
-** AWSSDK.DynamoDBv2; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.DynamoDBv2/
-** AWSSDK.ECR; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.ECR
-** AWSSDK.ECS; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.ECS
-** AWSSDK.S3; version 3.7.101.14 -- https://www.nuget.org/packages/AWSSDK.S3/
-** AWSSDK.SimpleSystemsManagement; version 3.7.101.4 -- https://www.nuget.org/packages/AWSSDK.SimpleSystemsManagement/
-** AWSSDK.SimpleNotificationService; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.SimpleNotificationService/
-** AWSSDK.SQS; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.SQS/
-** AWSSDK.ElasticBeanstalk; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.ElasticBeanstalk
-** AWSSDK.ElasticLoadBalancingV2; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.ElasticLoadBalancingV2/
-** AWSSDK.Core; version 3.7.100.14 -- https://www.nuget.org/packages/AWSSDK.Core
-** AWSSDK.CloudWatchLogs; version 3.7.101.7 -- https://www.nuget.org/packages/AWSSDK.CloudWatchLogs
+** AWSSDK.EC2; version 3.7.214 -- https://www.nuget.org/packages/AWSSDK.EC2
+** AWSSDK.IdentityManagement; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.IdentityManagement
+** AWSSDK.CloudFormation; version 3.7.203.36 -- https://www.nuget.org/packages/AWSSDK.CloudFormation
+** AWSSDK.SecurityToken; version 3.7.201.38 -- https://www.nuget.org/packages/AWSSDK.SecurityToken
+** AWSSDK.SSO; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.SSO
+** AWSSDK.SSOOIDC; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.SSOOIDC
+** AWSSDK.CloudControlApi; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.CloudControlApi/
+** AWSSDK.CloudWatchEvents; version 3.7.201.12 -- https://www.nuget.org/packages/AWSSDK.CloudWatchEvents/
+** AWSSDK.EC2; version 3.7.214 -- https://www.nuget.org/packages/AWSSDK.EC2/
+** AWSSDK.Extensions.NETCore.Setup; version 3.7.7 -- https://www.nuget.org/packages/AWSSDK.Extensions.NETCore.Setup
+** AWSSDK.AppRunner; version 3.7.201.14 -- https://www.nuget.org/packages/AWSSDK.AppRunner/
+** AWSSDK.CloudFront; version 3.7.201.36 -- https://www.nuget.org/packages/AWSSDK.CloudFront/
+** AWSSDK.DynamoDBv2; version 3.7.201.13 -- https://www.nuget.org/packages/AWSSDK.DynamoDBv2/
+** AWSSDK.ECR; version 3.7.201.6 -- https://www.nuget.org/packages/AWSSDK.ECR
+** AWSSDK.ECS; version 3.7.201.12 -- https://www.nuget.org/packages/AWSSDK.ECS
+** AWSSDK.S3; version 3.7.203.17 -- https://www.nuget.org/packages/AWSSDK.S3/
+** AWSSDK.SimpleSystemsManagement; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.SimpleSystemsManagement/
+** AWSSDK.SimpleNotificationService; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.SimpleNotificationService/
+** AWSSDK.SQS; version 3.7.200.43 -- https://www.nuget.org/packages/AWSSDK.SQS/
+** AWSSDK.ElasticBeanstalk; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.ElasticBeanstalk
+** AWSSDK.ElasticLoadBalancingV2; version 3.7.201.27 -- https://www.nuget.org/packages/AWSSDK.ElasticLoadBalancingV2/
+** AWSSDK.Core; version 3.7.202.11 -- https://www.nuget.org/packages/AWSSDK.Core
+** AWSSDK.CloudWatchLogs; version 3.7.200.42 -- https://www.nuget.org/packages/AWSSDK.CloudWatchLogs
** Amazon.CDK.Lib; version 2.43.1 -- https://www.nuget.org/packages/Amazon.CDK.Lib/
Apache License
@@ -210,11 +208,6 @@ limitations under the License.
* For AWSSDK.EC2 see also this required NOTICE:
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-* For Constructs see also this required NOTICE:
- Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-* For Amazon.JSII.Runtime see also this required NOTICE:
- AWS Cloud Development Kit (AWS CDK)
- Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* For AWSSDK.IdentityManagement see also this required NOTICE:
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* For AWSSDK.CloudFormation see also this required NOTICE:
@@ -291,119 +284,65 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------
-** Microsoft.Bcl.AsyncInterfaces; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterfaces/
-Copyright (c) .NET Foundation and Contributors
** System.CommandLine; version 2.0.0-beta1.20574.7 -- https://www.nuget.org/packages/System.CommandLine/
Copyright © .NET Foundation and Contributors
-** System.Linq.Async; version 4.0.0 -- https://www.nuget.org/packages/System.Linq.Async
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Configuration.Abstractions; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Abstractions
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Configuration.Binder; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Configuration; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Configuration
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Configuration.FileExtensions; version 3.1.7 -- https://www.nuget.org/packages/Microsoft.Extensions.Configuration.FileExtensions
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.FileProviders.Abstractions; version 3.1.7 -- https://www.nuget.org/packages/Microsoft.Extensions.FileProviders.Abstractions
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.FileProviders.Physical; version 3.1.7 -- https://www.nuget.org/packages/Microsoft.Extensions.FileProviders.Physical
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.FileSystemGlobbing; version 3.1.7 -- https://www.nuget.org/packages/Microsoft.Extensions.FileSystemGlobbing
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Logging.Abstractions; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Logging.Configuration; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Logging.Configuration
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Logging.Console; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Logging; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Logging.
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Options.ConfigurationExtensions; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Options.ConfigurationExtensions
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Options; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Options
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Primitives; version 5.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.Primitives
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.TemplateEngine.Abstractions; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Abstractions
-Copyright (c) 2016 .NET Foundation
-** Microsoft.TemplateEngine.Core.Contracts; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Core.Contracts
-Copyright (c) 2016 .NET Foundation
-** Microsoft.TemplateEngine.Core; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Core
-Copyright (c) 2016 .NET Foundation
-** Microsoft.TemplateEngine.Edge; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Edge
-Copyright (c) 2016 .NET Foundation
** Microsoft.TemplateEngine.IDE; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.IDE
Copyright (c) 2016 .NET Foundation
-** Microsoft.TemplateEngine.Utils; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Utils
-Copyright (c) 2016 .NET Foundation
-** System.Diagnostics.DiagnosticSource; version 5.0.0 -- https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource
-Copyright (c) 2016 .NET Foundation
** Microsoft.TemplateEngine.Orchestrator.RunnableProjects; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Orchestrator.RunnableProjects
Copyright (c) 2016 .NET Foundation
-** Microsoft.Extensions.DependencyInjection; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection
-Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.DependencyInjection.Abstractions; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection.Abstractions
+** Microsoft.Extensions.Configuration.Json; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterhttps://www.nuget.org/packages/Microsoft.Extensions.Configuration.Jsonfaces
Copyright (c) .NET Foundation and Contributors
-** System.Runtime.CompilerServices.Unsafe; version 6.0.0 -- https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/
+** Microsoft.Bcl.AsyncInterfaces; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterfaces/
Copyright (c) .NET Foundation and Contributors
-** Microsoft.OpenApi; version 1.2.3 -- https://www.nuget.org/packages/Microsoft.OpenApi/
-Copyright (c) Microsoft Corporation.
-** System.Text.Json; version 6.0.4 -- https://www.nuget.org/packages/System.Text.Json
+** System.Linq.Async; version 6.0.1 -- https://www.nuget.org/packages/System.Linq.Async
Copyright (c) .NET Foundation and Contributors
-** Microsoft.Extensions.Configuration.Json; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterhttps://www.nuget.org/packages/Microsoft.Extensions.Configuration.Jsonfaces
+** System.Text.Json; version 6.0.8 -- https://www.nuget.org/packages/System.Text.Json
Copyright (c) .NET Foundation and Contributors
All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------
-** libyaml; version 0.1.7 -- https://github.com/yaml/libyaml
-Copyright (c) 2006 Kirill Simonov
-** Newtonsoft.Json; version 13.0.1 -- https://www.nuget.org/packages/Newtonsoft.Json/
+** Newtonsoft.Json; version 13.0.3 -- https://www.nuget.org/packages/Newtonsoft.Json/
Copyright (c) 2007 James Newton-King
-** YamlDotNet; version 9.1.4 -- https://www.nuget.org/packages/YamlDotNet
+** YamlDotNet; version 13.4.0 -- https://www.nuget.org/packages/YamlDotNet
Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and
contributors
-** Swashbuckle.AspNetCore.Annotations; version 6.1.2 -- https://www.nuget.org/packages/Swashbuckle.AspNetCore.Annotations/
-Copyright (c) 2016 Richard Morris
-** Swashbuckle.AspNetCore.Swagger; version 6.1.2 -- https://www.nuget.org/packages/Swashbuckle.AspNetCore.Swagger/
+** Swashbuckle.AspNetCore.Annotations; version 6.5.0 -- https://www.nuget.org/packages/Swashbuckle.AspNetCore.Annotations/
Copyright (c) 2016 Richard Morris
-** Swashbuckle.AspNetCore.SwaggerGen ; version 6.1.2 -- https://www.nuget.org/packages/Swashbuckle.AspNetCore.SwaggerGen/
+** Swashbuckle.AspNetCore.Swagger; version 6.5.0 -- https://www.nuget.org/packages/Swashbuckle.AspNetCore.Swagger/
Copyright (c) 2016 Richard Morris
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.sln b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.sln
deleted file mode 100644
index c8eed4e59..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.4.33205.214
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Tools.CI", "AWS.Deploy.Tools.CI\AWS.Deploy.Tools.CI.csproj", "{81F4E63D-681F-4796-8CDC-809CA16303A7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {81F4E63D-681F-4796-8CDC-809CA16303A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {81F4E63D-681F-4796-8CDC-809CA16303A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {81F4E63D-681F-4796-8CDC-809CA16303A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {81F4E63D-681F-4796-8CDC-809CA16303A7}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {4B5BB5B3-122F-48AE-BE94-24B95898AC99}
- EndGlobalSection
-EndGlobal
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.csproj b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.csproj
deleted file mode 100644
index ef40ac247..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI.csproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- Library
- net6.0
- enable
- enable
- true
- Lambda
-
- true
-
- true
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/CodeBuildFunctions.cs b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/CodeBuildFunctions.cs
deleted file mode 100644
index 9aac00099..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/CodeBuildFunctions.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-using Amazon.SecurityToken;
-using Amazon.SecurityToken.Model;
-using Amazon.CodeBuild;
-using Amazon.CodeBuild.Model;
-using Amazon.Lambda.Core;
-using Amazon.Lambda.Annotations;
-using Amazon.Lambda.Annotations.APIGateway;
-using AWS.Deploy.Tools.CI.Models;
-
-[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
-
-namespace AWS.Deploy.Tools.CI;
-
-///
-/// Lambda functions that will interact with CodeBuild as part of the AWS.Deploy.Tools CI/CD pipeline.
-///
-public class CodeBuildFunctions
-{
- private readonly IAmazonSecurityTokenService _githubSTSClient;
-
- public CodeBuildFunctions(IAmazonSecurityTokenService githubSTSClient)
- {
- _githubSTSClient = githubSTSClient;
- }
-
- ///
- /// The function is responsible for checking available test runner accounts to run the AWS.Deploy.Tools CodeBuild PR check.
- /// A list of IAM roles, representing the test runner accounts, is passed to the function.
- /// These roles are assumed and used to check if the CodeBuild CI project in the test runner account is currently running any jobs.
- ///
- /// The function will return the IAM role of the account that is not running any CodeBuild CI jobs.
- /// If the input passed to the function is invalid.
- /// If no test runner account is available.
- /// If a CodeBuild CI project is not found in the test runner account.
- [LambdaFunction(Name = "GetAvailableTestRunner", Policies = "@AWSDeployToolsCIGetAvailableTestRunnerLambdaAssumeRolePolicy")]
- public async Task GetAvailableTestRunner(GetAvailableTestRunnerInput input)
- {
- if (string.IsNullOrEmpty(input.Roles))
- {
- throw new ArgumentNullException(nameof(input.Roles));
- }
- if (string.IsNullOrEmpty(input.ProjectName))
- {
- throw new ArgumentNullException(nameof(input.ProjectName));
- }
- if (string.IsNullOrEmpty(input.Branch))
- {
- throw new ArgumentNullException(nameof(input.Branch));
- }
-
- var roles = input.Roles.Split(",").Select(x => x.Trim()).ToList();
-
- if (!roles.Any())
- {
- throw new ArgumentNullException(nameof(input.Roles));
- }
-
- foreach (var role in roles)
- {
- var assumeRoleResponse =
- await _githubSTSClient.AssumeRoleAsync(
- new AssumeRoleRequest
- {
- RoleArn = role,
- RoleSessionName = "DeployToolTestRunner"
- }
- );
-
- using var testRunnerSTSClient = new AmazonSecurityTokenServiceClient(assumeRoleResponse.Credentials);
- var callerIdentity = await testRunnerSTSClient.GetCallerIdentityAsync(new GetCallerIdentityRequest());
-
- using var codeBuildClient = new AmazonCodeBuildClient(assumeRoleResponse.Credentials);
-
- var batchGetProjectsResponse =
- await codeBuildClient.BatchGetProjectsAsync(
- new BatchGetProjectsRequest
- {
- Names = new List { input.ProjectName }
- }
- );
-
- if (!batchGetProjectsResponse.Projects.Any())
- {
- throw new Exception($"Could not find any project with the name '{input.ProjectName}' in account '{callerIdentity.Account}'.");
- }
-
- var project = batchGetProjectsResponse.Projects.First();
-
- var listBuildsForProjectResponse =
- await codeBuildClient.ListBuildsForProjectAsync(
- new ListBuildsForProjectRequest
- {
- ProjectName = project.Name
- }
- );
-
- var runningBuilds = 0;
- if (listBuildsForProjectResponse.Ids.Any())
- {
- var latestBuilds = listBuildsForProjectResponse.Ids.Take(20).ToList();
- var detailedBuilds =
- await codeBuildClient.BatchGetBuildsAsync(
- new BatchGetBuildsRequest
- {
- Ids = latestBuilds
- }
- );
-
- foreach (var detailedBuild in detailedBuilds.Builds)
- {
- if (detailedBuild.BuildComplete == false)
- {
- runningBuilds++;
- }
- }
- }
-
- if (runningBuilds < project.ConcurrentBuildLimit)
- {
- return role;
- }
- else
- {
- continue;
- }
- }
-
- throw new Exception("There are no available Test Runner accounts.");
- }
-}
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Models/GetAvailableTestRunnerInput.cs b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Models/GetAvailableTestRunnerInput.cs
deleted file mode 100644
index 71dec6537..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Models/GetAvailableTestRunnerInput.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-namespace AWS.Deploy.Tools.CI.Models;
-
-///
-/// Input to the Lambda function
-///
-public class GetAvailableTestRunnerInput
-{
- ///
- /// Comma-separated list of IAM roles in the test runner accounts that have a trust relationship
- /// with the AWS account that will be hosting the Lambda function
- /// These roles will be used to invoke a CodeBuild job hosted in the test runner accounts.
- ///
- public string Roles { get; set; }
-
- ///
- /// The CodeBuild project name that will be invoked in the test runner account.
- ///
- public string ProjectName { get; set; }
-
- ///
- /// The GitHub branch/commit-id that will be passed to the CodeBuild project.
- ///
- public string Branch { get; set; }
-
- public GetAvailableTestRunnerInput(string roles, string projectName, string branch)
- {
- Roles = roles;
- ProjectName = projectName;
- Branch = branch;
- }
-}
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Startup.cs b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Startup.cs
deleted file mode 100644
index 4c4222541..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/Startup.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Amazon.Lambda.Annotations;
-using Amazon.SecurityToken;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace AWS.Deploy.Tools.CI
-{
- [LambdaStartup]
- public class Startup
- {
- ///
- /// Services for Lambda functions can be registered in the services dependency injection container in this method.
- ///
- /// The services can be injected into the Lambda function through the containing type's constructor or as a
- /// parameter in the Lambda function using the FromService attribute. Services injected for the constructor have
- /// the lifetime of the Lambda compute container. Services injected as parameters are created within the scope
- /// of the function invocation.
- ///
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddAWSService();
- }
- }
-}
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/aws-lambda-tools-defaults.json b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/aws-lambda-tools-defaults.json
deleted file mode 100644
index a66b3b8ce..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/aws-lambda-tools-defaults.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "template" : "serverless.template",
- "stack-name" : "AWS-Deploy-Tools-CI",
- "template-parameters" : "\"GitHubOrg\"=\"aws\";\"GitHubRepositoryName\"=\"aws-dotnet-deploy\""
-}
\ No newline at end of file
diff --git a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/serverless.template b/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/serverless.template
deleted file mode 100644
index 946a487d4..000000000
--- a/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/serverless.template
+++ /dev/null
@@ -1,117 +0,0 @@
-{
- "AWSTemplateFormatVersion": "2010-09-09",
- "Transform": "AWS::Serverless-2016-10-31",
- "Description": "This template is partially managed by Amazon.Lambda.Annotations (v0.10.0.0).",
- "Parameters": {
- "GitHubOrg": {
- "Type": "String",
- "Default": "aws",
- "Description": "The GitHub organization to use for the repository."
- },
- "GitHubRepositoryName": {
- "Type": "String",
- "Default": "aws-dotnet-deploy",
- "Description": "The name of the GitHub repository to create the role template in and to use for the CodeBuild."
- }
- },
- "Resources": {
- "AWSDeployToolsCIGitHubTrustRole": {
- "Type": "AWS::IAM::Role",
- "Properties": {
- "RoleName": "AWSDeployToolsCIGitHubTrustRole",
- "AssumeRolePolicyDocument": {
- "Statement": [
- {
- "Effect": "Allow",
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Principal": {
- "Federated": {
- "Fn::Sub": "arn:aws:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com"
- }
- },
- "Condition": {
- "StringLike": {
- "token.actions.githubusercontent.com:sub": {
- "Fn::Sub": "repo:${GitHubOrg}/${GitHubRepositoryName}:*"
- }
- }
- }
- }
- ]
- },
- "Policies": [
- {
- "PolicyName": "AWSDeployToolsCIGitHubTrustRolePolicy",
- "PolicyDocument": {
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "lambda:InvokeFunction"
- ],
- "Resource": [
- {
- "Fn::GetAtt": [
- "GetAvailableTestRunner",
- "Arn"
- ]
- }
- ]
- },
- {
- "Action": [
- "sts:AssumeRole"
- ],
- "Effect": "Allow",
- "Resource": [
- "*"
- ]
- }
- ]
- }
- }
- ],
- "MaxSessionDuration": "7200"
- }
- },
- "AWSDeployToolsCIGetAvailableTestRunnerLambdaAssumeRolePolicy": {
- "Type": "AWS::IAM::ManagedPolicy",
- "Properties": {
- "Description": "Policy created by AWS.Deploy.Tools.CI for Lambda Function",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Action": [
- "sts:AssumeRole"
- ],
- "Effect": "Allow",
- "Resource": [
- "*"
- ]
- }
- ]
- }
- }
- },
- "GetAvailableTestRunner": {
- "Type": "AWS::Serverless::Function",
- "Metadata": {
- "Tool": "Amazon.Lambda.Annotations"
- },
- "Properties": {
- "Runtime": "dotnet6",
- "CodeUri": ".",
- "MemorySize": 256,
- "Timeout": 30,
- "Policies": [
- {
- "Ref": "AWSDeployToolsCIGetAvailableTestRunnerLambdaAssumeRolePolicy"
- }
- ],
- "PackageType": "Zip",
- "Handler": "AWS.Deploy.Tools.CI::AWS.Deploy.Tools.CI.CodeBuildFunctions_GetAvailableTestRunner_Generated::GetAvailableTestRunner"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/buildtools/README.md b/buildtools/README.md
deleted file mode 100644
index cd118acec..000000000
--- a/buildtools/README.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# AWS.Deploy.Tools.CI
-
-The `AWS.Deploy.Tools.CI` project is used to setup the CI/CD PR check between the [AWS.Deploy.Tools](https://github.com/aws/aws-dotnet-deploy) GitHub Repo and the AWS CodeBuild project that will be executed by the GitHub workflow `AWS CodeBuild CI (codebuild-ci.yml)`.
-
-The workflow will be executed starting from `AWS CodeBuild CI (codebuild-ci.yml)` PR check, which will call a Lambda function in an `AWS Account` (which will act as a load balancer) which will ping 1 or many `Test Runner` accounts to check for availability.
-
-## Main Account (Load Balancer)
-
-We will start by deploying the `Lambda function` to the main testing account. Make sure you have AWS credentials with `Admin` access for the main testing account stored in your `credentials` file locally.
-
-From the [_**AWS.Deploy.Tools.CI Project Directory**_](/buildtools/AWS.Deploy.Tools.CI/AWS.Deploy.Tools.CI/), run the following commands:
-```
-dotnet tool update -g Amazon.Lambda.Tools
-dotnet lambda deploy-serverless --profile --region --config-file aws-lambda-tools-defaults.json --resolve-s3 true
-```
-
-The `Lambda Function` should now be deployed in the main testing account. Log into the account and take note of the `Lambda Function` name as it will be needed in a later step. Also, check the Resources tab of the created stack an take note of the IAM role `AWSDeployToolsCIGitHubTrustRole` ARN.
-
-## Test Runner Accounts
-
-You can setup 1 or multiple test runner accounts. These are new AWS Accounts other than the main account that containes the Lambda function. These accounts will run the `AWS CodeBuild Project` defined in [ci.template.yml](./ci.template.yml)
-
-The setup needs an OIDC Identity provider to be defined for the Test Runner account. If one exists, take note of the ARN. If not, go to [Identity providers](https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-west-2#/identity_providers) and create one.
-Use the following config:
-* Provider: `token.actions.githubusercontent.com`
-* Audiences: `sts.amazonaws.com`
-* Generate Thumbprint
-
-To create the `AWS CodeBuild Project` in a test runner account
-1. Go to CloudFormation, create a Stack using [buildtools/ci.template](ci.template.yml)
-2. Use the following variables:
- * Stack name: `aws-dotnet-deploy-ci`
- * CodeBuildProjectName: `aws-dotnet-deploy-ci`
- * GitHubOrg: `aws`
- * GitHubRepositoryName: `aws-dotnet-deploy`
- * MainAWSAccountId : *Main AWS Account ID that you deployed the Lambda function to*
- * OIDCProviderArn: *ARN of the OIDC Identity Provider for the Test Runner account*
- * TestRunnerTrustRoleName: `aws-dotnet-deploy-ci-role`
-2. Once the Stack is created, take note of CodeBuild Project name `aws-dotnet-deploy-ci` and the new `TestRunnerTrustRole` ARN that you can find in the Resources tab of the created stack.
-
-Repeat the above steps for every account that you want to use as a Test Runner.
-
-## GitHub Workflow
-
-In order for the GitHub workflow `AWS CodeBuild CI (codebuild-ci.yml)` to work properly, we need to set some GitHub secrets on the repo. Based on the names/ARNs you noted from previous steps, add the following secrets:
-* CI_TESTING_LOAD_BALANCER_LAMBDA_NAME: *From Main Account step, this is the name of the Lambda function*
-* CI_MAIN_TESTING_ACCOUNT_ROLE_ARN: *From Main Account step, this is the IAM role AWSDeployToolsCIGitHubTrustRole ARN*
-* CI_TESTING_CODE_BUILD_PROJECT_NAME: *From Test Runner Accounts step, this is `aws-dotnet-deploy-ci`*
-* CI_TEST_RUNNER_ACCOUNT_ROLES: This is a comma-delimited string of `TestRunnerTrustRole` ARNs from the Test Runner Accounts step
-
-# Troubleshooting
-
-## thumbprint rotation
-```
-Error: OpenIDConnect provider's HTTPS certificate doesn't match configured thumbprint
-```
-
-This can happen if GitHub has rotated the thumbprint of the certificate. Follow [this guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc_verify-thumbprint.html) to generate new thumbprint.
-
-Redeploy the ci.template with the new thumbprint. Additionally, contact https://github.com/aws-actions/configure-aws-credentials/issues for the thumbprint rotation.
\ No newline at end of file
diff --git a/buildtools/ci.buildspec.yml b/buildtools/ci.buildspec.yml
index f3699e2d5..66cf38cc4 100644
--- a/buildtools/ci.buildspec.yml
+++ b/buildtools/ci.buildspec.yml
@@ -15,7 +15,13 @@ phases:
build:
commands:
- dotnet build AWS.Deploy.sln -c Release
- - dotnet test AWS.Deploy.sln -c Release --no-build --logger trx --results-directory ./testresults
+ - dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover AWS.Deploy.sln -c Release --no-build --logger trx --results-directory ./testresults
+
+ post_build:
+ steps:
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d #v3
+
reports:
aws-dotnet-deploy-tests:
file-format: VisualStudioTrx
diff --git a/buildtools/ci.template.yml b/buildtools/ci.template.yml
deleted file mode 100644
index 4c84b99d8..000000000
--- a/buildtools/ci.template.yml
+++ /dev/null
@@ -1,137 +0,0 @@
-Parameters:
- MainAWSAccountId:
- Type: String
- Default: ""
- Description: The Account ID of the Main account containing the Lambda function that will trigger the CI CodeBuild project.
- GitHubOrg:
- Type: String
- Default: "aws"
- Description: The GitHub organization to use for the repository.
- GitHubRepositoryName:
- Description: The name of the GitHub repository to create the role template in and to use for the CodeBuild.
- Type: String
- Default: "aws-dotnet-deploy"
- OIDCProviderArn:
- Description: Arn for the GitHub OIDC Provider. Leave blank to create a new one or provide an existing Provider. There can only be one GitHub OIDC Provider per GitHubOrg per AWS Account. Example arn:aws:iam::665544332211:oidc-provider/token.actions.githubusercontent.com
- Default: ""
- Type: String
- CodeBuildProjectName:
- Description: Name of the CodeBuild project.
- Default: "aws-dotnet-deploy-ci"
- Type: String
- TestRunnerTrustRoleName:
- Description: Name of the role to allow GitHub to execute CodeBuild jobs.
- Default: "aws-dotnet-deploy-ci-role"
- Type: String
-
-
-Conditions:
- CreateOIDCProvider: !Equals
- - !Ref OIDCProviderArn
- - ""
-
-Resources:
- TestRunnerTrustRole:
- Type: AWS::IAM::Role
- Properties:
- RoleName: !Ref TestRunnerTrustRoleName
- MaxSessionDuration: 7200
- AssumeRolePolicyDocument:
- Statement:
- - Effect: Allow
- Principal:
- AWS: !Sub arn:aws:iam::${MainAWSAccountId}:root
- Action: sts:AssumeRole
- - Effect: Allow
- Action: sts:AssumeRoleWithWebIdentity
- Principal:
- Federated: !If
- - CreateOIDCProvider
- - !Ref GithubOidc
- - !Ref OIDCProviderArn
- Condition:
- StringLike:
- token.actions.githubusercontent.com:sub: !Sub repo:${GitHubOrg}/${GitHubRepositoryName}:*
- Policies:
- - PolicyName: !Sub "${AWS::StackName}-OIDC-Policy"
- PolicyDocument:
- Version: "2012-10-17"
- Statement:
- - Effect: Allow
- Action:
- - codebuild:StartBuild
- - codebuild:BatchGetBuilds
- - codebuild:BatchGetProjects
- - codebuild:ListBuildsForProject
- Resource:
- - !Sub arn:aws:codebuild:${AWS::Region}:${AWS::AccountId}:project/${CodeBuildProjectName}
- - Effect: Allow
- Action:
- - logs:GetLogEvents
- Resource:
- - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/${CodeBuildProjectName}:*
- - Effect: Allow
- Action:
- - sts:GetCallerIdentity
- Resource:
- - '*'
-
- GithubOidc:
- Type: AWS::IAM::OIDCProvider
- Condition: CreateOIDCProvider
- Properties:
- Url: https://token.actions.githubusercontent.com
- ClientIdList:
- - sts.amazonaws.com
- ThumbprintList:
- - 6938fd4d98bab03faadb97b34396831e3780aea1
- - 1c58a3a8518e8759bf075b76b750d4f2df264fcd
- CodeBuildProject:
- Type: AWS::CodeBuild::Project
- Properties:
- ConcurrentBuildLimit: 1
- Name: !Sub ${CodeBuildProjectName}
- ServiceRole: !GetAtt CodeBuildProjectRole.Arn
- Environment:
- PrivilegedMode: true
- ComputeType: BUILD_GENERAL1_LARGE
- Type: LINUX_CONTAINER
- ImagePullCredentialsType: CODEBUILD
- Image: aws/codebuild/standard:5.0
- Source:
- Type: GITHUB
- Location: !Sub https://github.com/${GitHubOrg}/${GitHubRepositoryName}
- BuildSpec: buildtools/ci.buildspec.yml
- Artifacts:
- Type: NO_ARTIFACTS
- TimeoutInMinutes: 120
-
- CodeBuildProjectRole:
- Type: AWS::IAM::Role
- Properties:
- RoleName: !Sub ${CodeBuildProjectName}-codebuild-service-role
- MaxSessionDuration: 7200
- AssumeRolePolicyDocument:
- Statement:
- - Action: ['sts:AssumeRole']
- Effect: Allow
- Principal:
- Service: [codebuild.amazonaws.com]
- Version: '2012-10-17'
- Path: /
- Policies:
- - PolicyName: !Sub "${AWS::StackName}-codebuild-service-role-policy"
- PolicyDocument:
- Version: '2012-10-17'
- Statement:
- - Action:
- - '*'
- Effect: Allow
- Resource:
- - '*'
-
-Outputs:
- TestRunnerTrustRole:
- Value: !GetAtt TestRunnerTrustRole.Arn
- CodeBuildProjectName:
- Value: !Sub ${CodeBuildProjectName}
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 000000000..44818a8f2
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,2 @@
+codecov:
+ branch: dev # set the default branch to 'dev'. This branch provides the coverage baselines during pull requests.
\ No newline at end of file
diff --git a/src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj b/src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj
index f3733aec8..8f9973018 100644
--- a/src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj
+++ b/src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj
@@ -21,15 +21,15 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/src/AWS.Deploy.CLI/Commands/DeployCommand.cs b/src/AWS.Deploy.CLI/Commands/DeployCommand.cs
index a709c5a76..5446369f3 100644
--- a/src/AWS.Deploy.CLI/Commands/DeployCommand.cs
+++ b/src/AWS.Deploy.CLI/Commands/DeployCommand.cs
@@ -586,7 +586,7 @@ private async Task CreateDeploymentBundle(Orchestrator orchestrator, Recommendat
{
if (_toolInteractiveService.DisableInteractive)
{
- throw ex;
+ throw;
}
_toolInteractiveService.WriteLine("Docker builds usually fail due to executing them from a working directory that is incompatible with the Dockerfile." +
@@ -615,7 +615,7 @@ private async Task CreateDeploymentBundle(Orchestrator orchestrator, Recommendat
}
else
{
- throw ex;
+ throw;
}
}
}
diff --git a/src/AWS.Deploy.Common/AWS.Deploy.Common.csproj b/src/AWS.Deploy.Common/AWS.Deploy.Common.csproj
index 5cd7d2403..c1b3cc865 100644
--- a/src/AWS.Deploy.Common/AWS.Deploy.Common.csproj
+++ b/src/AWS.Deploy.Common/AWS.Deploy.Common.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
@@ -8,25 +8,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AWS.Deploy.Common/Data/IAWSResourceQueryer.cs b/src/AWS.Deploy.Common/Data/IAWSResourceQueryer.cs
index b93995e91..998a15ad9 100644
--- a/src/AWS.Deploy.Common/Data/IAWSResourceQueryer.cs
+++ b/src/AWS.Deploy.Common/Data/IAWSResourceQueryer.cs
@@ -36,7 +36,7 @@ public enum BeanstalkPlatformType { Linux, Windows }
///
public interface IAWSResourceQueryer
{
- Task GetDefaultVpc();
+ Task GetDefaultVpc();
Task GetCloudControlApiResource(string type, string identifier);
Task> GetCloudFormationStackEvents(string stackName);
diff --git a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs
index cb98b1e3c..3a66ce5db 100644
--- a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs
+++ b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs
@@ -64,7 +64,7 @@ public async Task Validate(object input, Recommendation recomm
}
else // Anything else is unexpected, so proceed with usual exception handling
{
- throw ex;
+ throw;
}
}
diff --git a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/SecurityGroupsInVpcValidator.cs b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/SecurityGroupsInVpcValidator.cs
index b26f8b374..24493635b 100644
--- a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/SecurityGroupsInVpcValidator.cs
+++ b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/SecurityGroupsInVpcValidator.cs
@@ -55,7 +55,7 @@ public async Task Validate(object input, Recommendation recomm
if (shouldUseDefaultVpc)
{
- vpcId = (await _awsResourceQueryer.GetDefaultVpc()).VpcId;
+ vpcId = (await _awsResourceQueryer.GetDefaultVpc())?.VpcId;
}
}
diff --git a/src/AWS.Deploy.DockerEngine/AWS.Deploy.DockerEngine.csproj b/src/AWS.Deploy.DockerEngine/AWS.Deploy.DockerEngine.csproj
index 7a840bc0d..135ad3e9b 100644
--- a/src/AWS.Deploy.DockerEngine/AWS.Deploy.DockerEngine.csproj
+++ b/src/AWS.Deploy.DockerEngine/AWS.Deploy.DockerEngine.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
@@ -21,7 +21,7 @@
-
+
diff --git a/src/AWS.Deploy.DockerEngine/Templates/Dockerfile.template b/src/AWS.Deploy.DockerEngine/Templates/Dockerfile.template
index bca730ed1..adbf64c7f 100644
--- a/src/AWS.Deploy.DockerEngine/Templates/Dockerfile.template
+++ b/src/AWS.Deploy.DockerEngine/Templates/Dockerfile.template
@@ -13,8 +13,11 @@ RUN dotnet build "{project-name}" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "{project-name}" -c Release -o /app/publish
diff --git a/src/AWS.Deploy.Orchestration/AWS.Deploy.Orchestration.csproj b/src/AWS.Deploy.Orchestration/AWS.Deploy.Orchestration.csproj
index cb32fa633..0a5d85e3a 100644
--- a/src/AWS.Deploy.Orchestration/AWS.Deploy.Orchestration.csproj
+++ b/src/AWS.Deploy.Orchestration/AWS.Deploy.Orchestration.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
@@ -12,28 +12,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
diff --git a/src/AWS.Deploy.Orchestration/Data/AWSResourceQueryer.cs b/src/AWS.Deploy.Orchestration/Data/AWSResourceQueryer.cs
index 0e589107b..634c22f66 100644
--- a/src/AWS.Deploy.Orchestration/Data/AWSResourceQueryer.cs
+++ b/src/AWS.Deploy.Orchestration/Data/AWSResourceQueryer.cs
@@ -497,7 +497,7 @@ public async Task> GetListOfVpcs()
"Error attempting to describe available VPCs");
}
- public async Task GetDefaultVpc()
+ public async Task GetDefaultVpc()
{
var vpcClient = _awsClientFactory.GetAWSClient();
diff --git a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Program.cs b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Program.cs
index c4991a906..365b6c7d7 100644
--- a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Program.cs
+++ b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Program.cs
@@ -10,12 +10,16 @@ namespace AspNetAppAppRunner
{
sealed class Program
{
- public static void Main(string[] args)
+ public static void Main()
{
var app = new App();
var builder = new ConfigurationBuilder().AddAWSDeployToolConfiguration(app);
var recipeProps = builder.Build().Get>();
+ if (recipeProps is null)
+ {
+ throw new InvalidOrMissingConfigurationException("The configuration is missing for the selected recipe.");
+ }
var appStackProps = new DeployToolStackProps(recipeProps)
{
Env = new Environment
diff --git a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppEcsFargate/Program.cs b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppEcsFargate/Program.cs
index dda18d09f..ce3570068 100644
--- a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppEcsFargate/Program.cs
+++ b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppEcsFargate/Program.cs
@@ -12,12 +12,16 @@ namespace AspNetAppEcsFargate
{
sealed class Program
{
- public static void Main(string[] args)
+ public static void Main()
{
var app = new App();
var builder = new ConfigurationBuilder().AddAWSDeployToolConfiguration(app);
var recipeProps = builder.Build().Get>();
+ if (recipeProps is null)
+ {
+ throw new InvalidOrMissingConfigurationException("The configuration is missing for the selected recipe.");
+ }
var appStackProps = new DeployToolStackProps(recipeProps)
{
Env = new Environment
diff --git a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/AspNetAppElasticBeanstalkLinux.csproj b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/AspNetAppElasticBeanstalkLinux.csproj
index e455ce22a..e19155942 100644
--- a/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/AspNetAppElasticBeanstalkLinux.csproj
+++ b/src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/AspNetAppElasticBeanstalkLinux.csproj
@@ -27,7 +27,7 @@
-
+
-
+
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/src/AWS.Deploy.ServerMode.Client/RestAPI.cs b/src/AWS.Deploy.ServerMode.Client/RestAPI.cs
index 34487f169..89b488811 100644
--- a/src/AWS.Deploy.ServerMode.Client/RestAPI.cs
+++ b/src/AWS.Deploy.ServerMode.Client/RestAPI.cs
@@ -2012,6 +2012,21 @@ public partial class CategorySummary
public int Order { get; set; }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.1.0 (Newtonsoft.Json v13.0.0.0)")]
+ public partial class DeployToolExceptionSummary
+ {
+ [Newtonsoft.Json.JsonProperty("errorCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string ErrorCode { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public string Message { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("processExitCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public int? ProcessExitCode { get; set; }
+
+
}
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.1.0 (Newtonsoft.Json v13.0.0.0)")]
@@ -2045,21 +2060,6 @@ public enum DeploymentTypes
}
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.1.0 (Newtonsoft.Json v13.0.0.0)")]
- public partial class DeployToolExceptionSummary
- {
- [Newtonsoft.Json.JsonProperty("errorCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
- public string ErrorCode { get; set; }
-
- [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
- public string Message { get; set; }
-
- [Newtonsoft.Json.JsonProperty("processExitCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
- public int? ProcessExitCode { get; set; }
-
-
- }
-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.1.0 (Newtonsoft.Json v13.0.0.0)")]
public partial class DisplayedResourceSummary
{
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index f046cc158..a1329c82d 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -2,7 +2,7 @@
- 3.4.194
+ 3.6.133
all
diff --git a/test/AWS.Deploy.CLI.Common.UnitTests/AWS.Deploy.CLI.Common.UnitTests.csproj b/test/AWS.Deploy.CLI.Common.UnitTests/AWS.Deploy.CLI.Common.UnitTests.csproj
index 04556a69d..7b4bdfcfb 100644
--- a/test/AWS.Deploy.CLI.Common.UnitTests/AWS.Deploy.CLI.Common.UnitTests.csproj
+++ b/test/AWS.Deploy.CLI.Common.UnitTests/AWS.Deploy.CLI.Common.UnitTests.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
@@ -23,6 +23,16 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/AWS.Deploy.CLI.IntegrationTests/AWS.Deploy.CLI.IntegrationTests.csproj b/test/AWS.Deploy.CLI.IntegrationTests/AWS.Deploy.CLI.IntegrationTests.csproj
index 67e212590..08f9c52a6 100644
--- a/test/AWS.Deploy.CLI.IntegrationTests/AWS.Deploy.CLI.IntegrationTests.csproj
+++ b/test/AWS.Deploy.CLI.IntegrationTests/AWS.Deploy.CLI.IntegrationTests.csproj
@@ -7,12 +7,21 @@
-
-
+
+
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/AWS.Deploy.CLI.UnitTests/AWS.Deploy.CLI.UnitTests.csproj b/test/AWS.Deploy.CLI.UnitTests/AWS.Deploy.CLI.UnitTests.csproj
index 079792ba5..2e8be9cd8 100644
--- a/test/AWS.Deploy.CLI.UnitTests/AWS.Deploy.CLI.UnitTests.csproj
+++ b/test/AWS.Deploy.CLI.UnitTests/AWS.Deploy.CLI.UnitTests.csproj
@@ -24,7 +24,17 @@
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
diff --git a/test/AWS.Deploy.DocGenerator.UnitTests/AWS.Deploy.DocGenerator.UnitTests.csproj b/test/AWS.Deploy.DocGenerator.UnitTests/AWS.Deploy.DocGenerator.UnitTests.csproj
index e33bad108..c16c929be 100644
--- a/test/AWS.Deploy.DocGenerator.UnitTests/AWS.Deploy.DocGenerator.UnitTests.csproj
+++ b/test/AWS.Deploy.DocGenerator.UnitTests/AWS.Deploy.DocGenerator.UnitTests.csproj
@@ -26,10 +26,17 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/AWS.Deploy.Orchestration.UnitTests/AWS.Deploy.Orchestration.UnitTests.csproj b/test/AWS.Deploy.Orchestration.UnitTests/AWS.Deploy.Orchestration.UnitTests.csproj
index dfe0745b7..014808041 100644
--- a/test/AWS.Deploy.Orchestration.UnitTests/AWS.Deploy.Orchestration.UnitTests.csproj
+++ b/test/AWS.Deploy.Orchestration.UnitTests/AWS.Deploy.Orchestration.UnitTests.csproj
@@ -13,6 +13,16 @@
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/AWS.Deploy.ServerMode.Client.UnitTests/AWS.Deploy.ServerMode.Client.UnitTests.csproj b/test/AWS.Deploy.ServerMode.Client.UnitTests/AWS.Deploy.ServerMode.Client.UnitTests.csproj
index 90b27b9ae..d0a9aa7c2 100644
--- a/test/AWS.Deploy.ServerMode.Client.UnitTests/AWS.Deploy.ServerMode.Client.UnitTests.csproj
+++ b/test/AWS.Deploy.ServerMode.Client.UnitTests/AWS.Deploy.ServerMode.Client.UnitTests.csproj
@@ -12,7 +12,16 @@
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/test/ManualLinuxTesting/Dockerfile b/test/ManualLinuxTesting/Dockerfile
deleted file mode 100644
index 22b04d22b..000000000
--- a/test/ManualLinuxTesting/Dockerfile
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-# SPDX-License-Identifier: Apache-2.0
-
-####################################
-## Run at repository root with
-## docker build -f /test/ManualLinuxTesting/Dockerfile/ . -t 'aws-deploy:local'
-##
-## Execute with
-## docker run -v $HOME/.aws/:/root/.aws --privileged -it --entrypoint bash aws-deploy:local
-##
-## See the /README.md file for more details
-####################################
-
-ARG AWS_CLI_VERSION=0.0.1-local
-
-FROM ubuntu as base-updates
-ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
-RUN apt-get update
-
-FROM base-updates as base
-RUN apt-get install -y wget unzip
-
-#install aws cli
-RUN wget https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -O "awscliv2.zip"
-RUN unzip awscliv2.zip
-RUN ./aws/install
-RUN aws --version
-
-# install node/npm
-RUN apt-get install -y nodejs
-RUN apt-get install -y npm
-
-#install cdk
-RUN npm install -g aws-cdk
-
-# install docker
-RUN apt-get update; \
- apt-get install -y \
- apt-transport-https \
- ca-certificates \
- curl \
- gnupg-agent \
- software-properties-common
-RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
-RUN apt-get update
-RUN add-apt-repository \
- "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
-RUN apt-get update
-RUN apt-get install -y docker-ce docker-ce-cli containerd.io
-
-# start docker on login
-RUN echo 'service docker start' >> ~/.bashrc
-
-# install dotnet sdk
-RUN wget https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-RUN dpkg -i packages-microsoft-prod.deb
-RUN apt-get update; \
- apt-get install -y apt-transport-https && \
- apt-get update && \
- apt-get install -y dotnet-sdk-3.1
-RUN dotnet --list-sdks
-
-# manually add dotnet tools path to path variable
-# https://github.com/dotnet/dotnet-docker/issues/520
-ENV PATH="${PATH}:/root/.dotnet/tools"
-
-WORKDIR /app
-
-FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim-amd64 AS build
-ARG AWS_CLI_VERSION
-ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
-
-WORKDIR /src
-COPY . .
-
-RUN echo $AWS_CLI_VERSION
-
-RUN dotnet restore "src/AWS.Deploy.CLI/AWS.Deploy.CLI.csproj"
-WORKDIR "/src/src/AWS.Deploy.CLI"
-RUN dotnet build "AWS.Deploy.CLI.csproj" -c Release -o /app/build -p:Version=$AWS_CLI_VERSION
-
-#FROM build as test
-#RUN dotnet test AWS.Deploy.sln
-
-FROM build AS publish
-ARG AWS_CLI_VERSION
-RUN dotnet pack "AWS.Deploy.CLI.csproj" -c Release -o /app/publish -p:PackageVersion=$AWS_CLI_VERSION -p:Version=$AWS_CLI_VERSION
-
-FROM base AS final
-ARG AWS_CLI_VERSION
-WORKDIR /app
-COPY --from=publish /app/publish .
-
-#install aws deploy
-RUN dotnet tool install AWS.Deploy.Tools -g --add-source /app --version $AWS_CLI_VERSION
-
-# verify it worked
-RUN dotnet aws --version
-
-#copy in the testing apps
-COPY /testapps /testapps
-
-WORKDIR /testapps
-ENTRYPOINT ["echo", "\nMake sure to start in Interactive mode: docker run --privileged -it --entrypoint bash '\n\nAdd your AWS creds via `aws configure`\n\nThen try `dotnet aws --help`\n\n"]
diff --git a/test/ManualLinuxTesting/Readme.md b/test/ManualLinuxTesting/Readme.md
deleted file mode 100644
index 0e8944868..000000000
--- a/test/ManualLinuxTesting/Readme.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Local Testing
-
-You use `/test/ManualLinuxTesting/Dockerfile` to create a local sandbox for testing. This image will build from source and install the aws cli deployment tool.
-
-1. From the root directory, run
-```
-docker build -f ./test/ManualLinuxTesting/Dockerfile/ . -t 'aws-deploy:local'
-```
-
-2. _Grab a caffeinated beverage_. The first run can take several minutes.
-
-3. Run the docker image in interactive mode:
-```
-docker run -v $HOME/.aws/:/root/.aws --privileged -it --entrypoint bash aws-deploy:local
- ```
- _Note:_ the above command assumes you are running in powershell and have the `$HOME` variable availabe and that you've [saved your aws credentials](https://cdkworkshop.com/15-prerequisites/200-account.html#configure-your-credentials) in your home directory.
-
-You are now free to play with the cli. There are several sample applications in `/testapps` that you can deploy:
-
-```shell
-root@562bccd30027:/testapps# cd WebAppNoDockerFile/
-root@562bccd30027:/testapps/WebAppNoDockerFile# dotnet aws deploy
-AWS .NET deployment tool for deploying .NET Core applications to AWS
-```
diff --git a/testapps/docker/ConsoleSdkType/Dockerfile b/testapps/docker/ConsoleSdkType/Dockerfile
index 2ae905634..450ad5460 100644
--- a/testapps/docker/ConsoleSdkType/Dockerfile
+++ b/testapps/docker/ConsoleSdkType/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "ConsoleSdkType.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "ConsoleSdkType.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/ConsoleSdkType/ReferenceDockerfile b/testapps/docker/ConsoleSdkType/ReferenceDockerfile
index 2ae905634..450ad5460 100644
--- a/testapps/docker/ConsoleSdkType/ReferenceDockerfile
+++ b/testapps/docker/ConsoleSdkType/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "ConsoleSdkType.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "ConsoleSdkType.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppDifferentAssemblyName/Dockerfile b/testapps/docker/WebAppDifferentAssemblyName/Dockerfile
index 51748cd8f..edd7311bb 100644
--- a/testapps/docker/WebAppDifferentAssemblyName/Dockerfile
+++ b/testapps/docker/WebAppDifferentAssemblyName/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppDifferentAssemblyName.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppDifferentAssemblyName.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppDifferentAssemblyName/ReferenceDockerfile b/testapps/docker/WebAppDifferentAssemblyName/ReferenceDockerfile
index 51748cd8f..edd7311bb 100644
--- a/testapps/docker/WebAppDifferentAssemblyName/ReferenceDockerfile
+++ b/testapps/docker/WebAppDifferentAssemblyName/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppDifferentAssemblyName.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppDifferentAssemblyName.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppDifferentTargetFramework/Dockerfile b/testapps/docker/WebAppDifferentTargetFramework/Dockerfile
index ecdf16381..1e4a4b1be 100644
--- a/testapps/docker/WebAppDifferentTargetFramework/Dockerfile
+++ b/testapps/docker/WebAppDifferentTargetFramework/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppDifferentTargetFramework.csproj" -c Release -o /app/buil
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppDifferentTargetFramework.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppDifferentTargetFramework/ReferenceDockerfile b/testapps/docker/WebAppDifferentTargetFramework/ReferenceDockerfile
index ecdf16381..1e4a4b1be 100644
--- a/testapps/docker/WebAppDifferentTargetFramework/ReferenceDockerfile
+++ b/testapps/docker/WebAppDifferentTargetFramework/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppDifferentTargetFramework.csproj" -c Release -o /app/buil
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppDifferentTargetFramework.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppNet7/Dockerfile b/testapps/docker/WebAppNet7/Dockerfile
index 5b52cbd1f..74e72e8a5 100644
--- a/testapps/docker/WebAppNet7/Dockerfile
+++ b/testapps/docker/WebAppNet7/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppNet7.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppNet7.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppNet7/ReferenceDockerfile b/testapps/docker/WebAppNet7/ReferenceDockerfile
index 5b52cbd1f..74e72e8a5 100644
--- a/testapps/docker/WebAppNet7/ReferenceDockerfile
+++ b/testapps/docker/WebAppNet7/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppNet7.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppNet7.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppNoSolution/Dockerfile b/testapps/docker/WebAppNoSolution/Dockerfile
index 809b42eea..dead51eea 100644
--- a/testapps/docker/WebAppNoSolution/Dockerfile
+++ b/testapps/docker/WebAppNoSolution/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppNoSolution.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppNoSolution.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppNoSolution/ReferenceDockerfile b/testapps/docker/WebAppNoSolution/ReferenceDockerfile
index 809b42eea..dead51eea 100644
--- a/testapps/docker/WebAppNoSolution/ReferenceDockerfile
+++ b/testapps/docker/WebAppNoSolution/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppNoSolution.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppNoSolution.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/Dockerfile b/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/Dockerfile
index bc0a0bba0..0fea40a2b 100644
--- a/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/Dockerfile
+++ b/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/Dockerfile
@@ -14,8 +14,11 @@ RUN dotnet build "WebAppProjectDependencies.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppProjectDependencies.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/ReferenceDockerfile b/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/ReferenceDockerfile
index bc0a0bba0..0fea40a2b 100644
--- a/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/ReferenceDockerfile
+++ b/testapps/docker/WebAppProjectDependencies/WebAppProjectDependencies/ReferenceDockerfile
@@ -14,8 +14,11 @@ RUN dotnet build "WebAppProjectDependencies.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppProjectDependencies.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/Dockerfile b/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/Dockerfile
index 584761972..f2834919d 100644
--- a/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/Dockerfile
+++ b/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppWithSolutionParentLevel.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppWithSolutionParentLevel.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/ReferenceDockerfile b/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/ReferenceDockerfile
index 584761972..f2834919d 100644
--- a/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/ReferenceDockerfile
+++ b/testapps/docker/WebAppWithSolutionParentLevel/WebAppWithSolutionParentLevel/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppWithSolutionParentLevel.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppWithSolutionParentLevel.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppWithSolutionSameLevel/Dockerfile b/testapps/docker/WebAppWithSolutionSameLevel/Dockerfile
index add31fb96..4de9f1f19 100644
--- a/testapps/docker/WebAppWithSolutionSameLevel/Dockerfile
+++ b/testapps/docker/WebAppWithSolutionSameLevel/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppWithSolutionSameLevel.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppWithSolutionSameLevel.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WebAppWithSolutionSameLevel/ReferenceDockerfile b/testapps/docker/WebAppWithSolutionSameLevel/ReferenceDockerfile
index add31fb96..4de9f1f19 100644
--- a/testapps/docker/WebAppWithSolutionSameLevel/ReferenceDockerfile
+++ b/testapps/docker/WebAppWithSolutionSameLevel/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WebAppWithSolutionSameLevel.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WebAppWithSolutionSameLevel.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WorkerServiceExample/Dockerfile b/testapps/docker/WorkerServiceExample/Dockerfile
index 315642daf..a16f5a4cc 100644
--- a/testapps/docker/WorkerServiceExample/Dockerfile
+++ b/testapps/docker/WorkerServiceExample/Dockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WorkerServiceExample.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WorkerServiceExample.csproj" -c Release -o /app/publish
diff --git a/testapps/docker/WorkerServiceExample/ReferenceDockerfile b/testapps/docker/WorkerServiceExample/ReferenceDockerfile
index 315642daf..a16f5a4cc 100644
--- a/testapps/docker/WorkerServiceExample/ReferenceDockerfile
+++ b/testapps/docker/WorkerServiceExample/ReferenceDockerfile
@@ -13,8 +13,11 @@ RUN dotnet build "WorkerServiceExample.csproj" -c Release -o /app/build
FROM build AS publish
RUN apt-get update -yq \
- && apt-get install curl gnupg -yq \
- && curl -sL https://deb.nodesource.com/setup_14.x | bash \
+ && apt-get install -yq ca-certificates curl gnupg \
+ && mkdir -p /etc/apt/keyrings \
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -yq \
&& apt-get install nodejs -yq
RUN dotnet publish "WorkerServiceExample.csproj" -c Release -o /app/publish