From f6b10238c8c58360619f12a676bf487ce4d24684 Mon Sep 17 00:00:00 2001 From: Tim Powell Date: Thu, 13 Jun 2024 15:01:01 +0100 Subject: [PATCH 1/6] Update nuget packages that had vunerabilities --- ...ProducerContentValidation.Application.UnitTests.csproj | 6 ++++-- .../EPR.ProducerContentValidation.FunctionApp.csproj | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj index c15d984..5ea411b 100644 --- a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj @@ -16,8 +16,10 @@ - - + + + + diff --git a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj index a5a9277..986cce3 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj @@ -6,14 +6,16 @@ S3903 + - - + + - + + From 4cf61dc0335e01126fb8405ca75dd1e1e12b7f90 Mon Sep 17 00:00:00 2001 From: MasilEviden Date: Wed, 26 Jun 2024 16:30:01 +0100 Subject: [PATCH 2/6] Upgraded to dotnet 8 --- README.md | 2 +- src/Directory.Build.props | 2 +- ...R.ProducerContentValidation.Application.UnitTests.csproj | 3 ++- .../EPR.ProducerContentValidation.Application.csproj | 3 ++- .../Exceptions/MissingSubmissionConfidurationException.cs | 6 ------ .../Exceptions/SubmissionApiClientException.cs | 6 ------ ...R.ProducerContentValidation.FunctionApp.UnitTests.csproj | 1 + .../EPR.ProducerContentValidation.FunctionApp.csproj | 3 ++- .../EPR.ProducerContentValidation.TestSupport.csproj | 5 +++-- 9 files changed, 12 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f5ad9bc..426f0ce 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ An example of payload passed into the Azure service bus can be seen below. ### Prerequisites In order to run the service you will need the following dependencies: -- .NET 6 +- .NET 8 - Redis - Azure CLI diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 30687be..f8e9e8b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ - net6.0 + net8.0 true enable enable diff --git a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj index 5ea411b..4d77af4 100644 --- a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj @@ -1,8 +1,9 @@ - + false true + net8.0 diff --git a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj index 33bb6da..85862ef 100644 --- a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj +++ b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj @@ -1,7 +1,8 @@ - + false + net8.0 diff --git a/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs b/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs index 321ca98..f861072 100644 --- a/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs +++ b/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs @@ -1,5 +1,4 @@ using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; namespace EPR.ProducerContentValidation.Application.Exceptions; @@ -11,9 +10,4 @@ public MissingSubmissionConfidurationException(string message) : base(message) { } - - protected MissingSubmissionConfidurationException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs b/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs index 1820183..2133f29 100644 --- a/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs +++ b/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs @@ -1,7 +1,6 @@ namespace EPR.ProducerContentValidation.Application.Exceptions; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; [ExcludeFromCodeCoverage] [Serializable] @@ -11,9 +10,4 @@ public SubmissionApiClientException(string message, Exception cause) : base(message, cause) { } - - protected SubmissionApiClientException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } \ No newline at end of file diff --git a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj index 22ca936..2b43524 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj @@ -2,6 +2,7 @@ false true + net8.0 diff --git a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj index 986cce3..090329a 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj @@ -1,9 +1,10 @@ - + V4 false S3903 + net8.0 diff --git a/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj b/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj index 5929435..395f9e4 100644 --- a/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj +++ b/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj @@ -1,9 +1,10 @@ - + - + true + net8.0 From 9494e63ed786aefc509b1d033fde48ff6384df93 Mon Sep 17 00:00:00 2001 From: MasilEviden Date: Wed, 26 Jun 2024 16:40:11 +0100 Subject: [PATCH 3/6] Updated Dockerfile --- src/EPR.ProducerContentValidation.FunctionApp/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile b/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile index 3bdf958..75d2dc2 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile +++ b/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env # Build requires 3.1 SDK -COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet +#COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet # Copy everything COPY stylecop.ruleset ./ @@ -13,7 +13,7 @@ RUN dotnet publish EPR.ProducerContentValidation.FunctionApp/*.csproj --output / # To enable ssh & remote debugging on app service change the base image to the one below # FROM mcr.microsoft.com/azure-functions/dotnet:4-appservice -FROM mcr.microsoft.com/azure-functions/dotnet:4 +FROM mcr.microsoft.com/azure-functions/dotnet:4-dotnet8 # Create a non-root user and set permissions RUN groupadd -r dotnet && \ From c6a5b68697926da5a290db69c7f3621aae0df0d6 Mon Sep 17 00:00:00 2001 From: MasilEviden Date: Wed, 26 Jun 2024 16:45:36 +0100 Subject: [PATCH 4/6] Updated yaml files --- pipelines/ci_pipeline.yaml | 2 +- pipelines/deployment-pipeline.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/ci_pipeline.yaml b/pipelines/ci_pipeline.yaml index 6757443..a7218c1 100644 --- a/pipelines/ci_pipeline.yaml +++ b/pipelines/ci_pipeline.yaml @@ -42,7 +42,7 @@ resources: name: defra/epr-webapps-code-deploy-templates type: github endpoint: defra - ref: main + ref: upgrade-net-8 extends: template: epr-build-pipeline.yaml@CommonTemplates diff --git a/pipelines/deployment-pipeline.yaml b/pipelines/deployment-pipeline.yaml index c3d91db..9733584 100644 --- a/pipelines/deployment-pipeline.yaml +++ b/pipelines/deployment-pipeline.yaml @@ -62,7 +62,7 @@ resources: name: defra/epr-webapps-code-deploy-templates type: github endpoint: defra - ref: main + ref: upgrade-net-8 # The repo will be reference the repo by a release tag (if the imageTag parameter contains 'release') otherwise it will pull down the main branch. - repository: ReleaseTags From 5ef921f7b18b766acba5a4b3ba1bd65a41e700b6 Mon Sep 17 00:00:00 2001 From: MasilEviden Date: Thu, 27 Jun 2024 09:51:33 +0100 Subject: [PATCH 5/6] Installed automapper and consolidated few packages --- .../EPR.ProducerContentValidation.Application.csproj | 4 ++-- ...R.ProducerContentValidation.FunctionApp.UnitTests.csproj | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj index 85862ef..0b7af5e 100644 --- a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj +++ b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj @@ -6,7 +6,7 @@ - + @@ -15,7 +15,7 @@ - + diff --git a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj index 2b43524..723cce6 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj @@ -14,10 +14,10 @@ - + - - + + From a0f32cd3ac87d947ade17464780b846b341feae2 Mon Sep 17 00:00:00 2001 From: MasilEviden Date: Thu, 27 Jun 2024 11:38:37 +0100 Subject: [PATCH 6/6] Updated all nuget packages --- ...entValidation.Application.UnitTests.csproj | 15 +++++++----- ...oducerContentValidation.Application.csproj | 24 +++++++++---------- ...entValidation.FunctionApp.UnitTests.csproj | 17 +++++++------ ...oducerContentValidation.FunctionApp.csproj | 12 +++++----- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj index 4d77af4..9a53f22 100644 --- a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj @@ -8,15 +8,18 @@ - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj index 0b7af5e..7e2686e 100644 --- a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj +++ b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj @@ -7,18 +7,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj index 723cce6..1a04807 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj @@ -1,4 +1,4 @@ - + false true @@ -6,16 +6,19 @@ - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - + + + diff --git a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj index 090329a..09cae52 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj @@ -7,14 +7,14 @@ net8.0 - + - + - - - - + + + +