diff --git a/.azuredevops/pipelines/build-v2.yml b/.azuredevops/pipelines/build-v2.yml index 1f13d9e..cee140e 100644 --- a/.azuredevops/pipelines/build-v2.yml +++ b/.azuredevops/pipelines/build-v2.yml @@ -13,7 +13,7 @@ resources: name: cdr-auth-server ref: develop #################################################################################### - # For AuthServer if develop/main/release branch changes kickoff a build DataHolder + # For AuthServer if develop/main/release branch changes trigger a build of DataHolder #https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#triggers #################################################################################### trigger: @@ -37,7 +37,6 @@ variables: - name: baseSourceDirectory value: $(Build.SourcesDirectory)/sb-mock-data-holder/Source - pool: vmImage: ubuntu-latest @@ -53,7 +52,7 @@ jobs: - checkout: self - checkout: git://cdr-auth-server@refs/heads/develop persistCredentials: true - + ################################################################################################### # set the register tag to use based on the logic in the template file ################################################################################################### @@ -95,13 +94,20 @@ jobs: - script: | echo "Delete image:" docker image rm mock-data-holder-unit-tests -f + + echo "Clear docker build cache" + docker builder prune -a -f + + echo "Docker images after delete:" + docker image ls + docker system df displayName: 'Remove mock-data-holder-unit-tests container image' condition: always() ################################################################################################ # Switch AuthServer to required branch. ################################################################################################ - - powershell: | + - pwsh: | cd cdr-auth-server $branchRef = "" $authServerBranch = "" @@ -139,7 +145,7 @@ jobs: cd .. displayName: 'Switch cdr-auth-server code to required branch' - + ################################################################################################### # Build image ################################################################################################### @@ -151,7 +157,7 @@ jobs: sourceFolder: $(Build.SourcesDirectory)/cdr-auth-server contents: '**' targetFolder: $(baseSourceDirectory)/cdr-auth-server - + ################################################################################################### # Build Banking and Energy images ################################################################################################### @@ -166,6 +172,13 @@ jobs: displayName: Create Energy Image condition: always() + - script: | + echo "Clear docker build cache" + docker builder prune -a -f + docker system df + displayName: 'Remove container images that are no longer needed' + condition: always() + ################################################################################################### # Login to ACR and pull mock solution containers ################################################################################################### @@ -183,11 +196,13 @@ jobs: inputs: targetType: inline script: | - echo "SourceBranchName = $(Build.SourceBranchName) mockRegisterContainerTag=$(RegisterTag)" docker pull $(SharedAcrBaseUrl).azurecr.io/mock-register:$(RegisterTag) docker tag $(SharedAcrBaseUrl).azurecr.io/mock-register:$(RegisterTag) mock-register:latest + + # remove the original ACR image as we only need the re-tagged version for tests + docker image rm $(SharedAcrBaseUrl).azurecr.io/mock-register:$(RegisterTag) -f # List docker images - task: Docker@2 @@ -211,7 +226,7 @@ jobs: # Run Banking integration tests - script: | docker compose --file $(baseSourceDirectory)/DockerCompose/docker-compose.IntegrationTests.Banking.yml up --abort-on-container-exit --exit-code-from mock-data-holder-integration-tests - displayName: 'Integration Tests - Banking - Up' + displayName: 'Integration Tests - Banking - Up' condition: always() # Output Docker Logs @@ -225,7 +240,7 @@ jobs: # Remove integration tests - script: | - docker compose --file $(baseSourceDirectory)/DockerCompose/docker-compose.IntegrationTests.Banking.yml down + docker compose --file $(baseSourceDirectory)/DockerCompose/docker-compose.IntegrationTests.Banking.yml down displayName: 'Integration Tests - Banking - Down' condition: always() @@ -289,7 +304,7 @@ jobs: echo "Delete images:" docker image rm mcr.microsoft.com/mssql/server:2022-latest -f - docker image rm mock-register -f + docker image rm mock-register -f echo "Docker images after delete:" docker image ls @@ -307,14 +322,14 @@ jobs: inputs: repository: mock-data-holder command: save - arguments: --output $(build.artifactstagingdirectory)/mock-data-holder.image.tar mock-data-holder + arguments: --output $(Build.ArtifactStagingDirectory)/mock-data-holder.image.tar mock-data-holder addPipelineData: false # Publish docker image - task: PublishPipelineArtifact@1 displayName: Publish container images inputs: - path: $(build.artifactstagingdirectory) + path: $(Build.ArtifactStagingDirectory) artifact: Container Images ################################################################################################### @@ -429,14 +444,15 @@ jobs: # CdrAuthServer - script: | cd $(Build.SourcesDirectory)/sb-mock-data-holder/Source/cdr-auth-server/Source/CdrAuthServer.Repository + dotnet ef migrations bundle --context CdrAuthServerDatabaseContext --verbose --self-contained ls displayName: 'Run EF Migrations bundle (CdrAuthServer)' + failOnStderr: true condition: always() - publish: $(Build.SourcesDirectory)/sb-mock-data-holder/Source/cdr-auth-server/Source/CdrAuthServer.Repository/efbundle displayName: Publish EF Migration bundle (CdrAuthServer) - condition: always() artifact: Database Migration Scripts (CdrAuthServer) ################################################################################################### diff --git a/.azuredevops/pipelines/dotnet.yml b/.azuredevops/pipelines/dotnet-is-not-used.yml similarity index 98% rename from .azuredevops/pipelines/dotnet.yml rename to .azuredevops/pipelines/dotnet-is-not-used.yml index 6059a8a..8b48013 100644 --- a/.azuredevops/pipelines/dotnet.yml +++ b/.azuredevops/pipelines/dotnet-is-not-used.yml @@ -8,8 +8,11 @@ resources: trigger: - develop +variables: + - group: PT-Pipeline-Common + pool: - vmImage: windows-2019 + vmImage: $(Pipeline_Host_Image) steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index a4dad78..c454e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.0.3] - 2025-12-10 +### Changed +- Convert to Central Package management and patched vulnerabilities + +## [4.0.2] - 2025-10-15 +### Changed +- Updated Authorisation Server to include vulnerability patches + ## [4.0.1] - 2025-06-19 ### Changed diff --git a/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj b/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj index d0c432c..066b7b1 100644 --- a/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj +++ b/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj @@ -1,25 +1,25 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + \ No newline at end of file diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj b/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj index 0f20338..80272f3 100644 --- a/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj +++ b/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj @@ -1,33 +1,33 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + \ No newline at end of file diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj index e584fe7..3d11eba 100644 --- a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj +++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj @@ -1,76 +1,73 @@  - - false - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - Always - true - PreserveNewest - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - Always - - + + false + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + Always + true + PreserveNewest + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + Always + + \ No newline at end of file diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj b/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj index c6edcc9..f55501b 100644 --- a/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj +++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj @@ -1,56 +1,52 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - win-x64;linux-x64 - enable - True - - - - - - - - - - - - - Always - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + win-x64;linux-x64 + enable + True + + + + + + + + + + + + + Always + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + \ No newline at end of file diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj index 6c0e0a5..c244144 100644 --- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj +++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj @@ -1,100 +1,99 @@  - - false - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - Debug;Release;Shared - enable - enable - True - - - - - - - Always - - - Always - - - Always - - - Always - true - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - + + false + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + Debug;Release;Shared + enable + enable + True + + + + + + + Always + + + Always + + + Always + + + Always + true + PreserveNewest + + + + + + + + + + + + + + + + + + true + + + true + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + \ No newline at end of file diff --git a/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj b/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj index 7226790..b28fe58 100644 --- a/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj +++ b/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj @@ -1,40 +1,37 @@  - - enable - enable - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - True - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - Always - - + + enable + enable + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + True + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + Always + + \ No newline at end of file diff --git a/Source/DataHolder.sln b/Source/DataHolder.sln index 988e8b3..95886f5 100644 --- a/Source/DataHolder.sln +++ b/Source/DataHolder.sln @@ -70,6 +70,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .dockerignore = .dockerignore .editorconfig = .editorconfig Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props Dockerfile = Dockerfile Dockerfile.integration-tests = Dockerfile.integration-tests Dockerfile.unit-tests = Dockerfile.unit-tests diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 89d0f76..b36ad64 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,7 +1,7 @@ net8.0 - 4.0.1 + 4.0.3 true true true diff --git a/Source/Directory.Packages.props b/Source/Directory.Packages.props new file mode 100644 index 0000000..6e409f2 --- /dev/null +++ b/Source/Directory.Packages.props @@ -0,0 +1,54 @@ + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/Dockerfile b/Source/Dockerfile index 9960b8e..0b2e045 100644 --- a/Source/Dockerfile +++ b/Source/Dockerfile @@ -55,6 +55,7 @@ FROM build AS publish # cdr-auth-server code COPY ./cdr-auth-server/Source/Directory.Build.props /app/AuthServer/Directory.Build.props +COPY ./cdr-auth-server/Source/Directory.Packages.props /app/AuthServer/Directory.Packages.props COPY ./cdr-auth-server/Source/.editorconfig /app/AuthServer/.editorconfig COPY ./cdr-auth-server/Source/CdrAuthServer.Domain/. /app/AuthServer/CdrAuthServer.Domain COPY ./cdr-auth-server/Source/CdrAuthServer.Repository/. /app/AuthServer/CdrAuthServer.Repository @@ -63,6 +64,7 @@ COPY ./cdr-auth-server/Source/CdrAuthServer.Infrastructure/. /app/AuthServer/Cdr COPY ./cdr-auth-server/Source/CdrAuthServer.API.Logger/. /app/AuthServer/CdrAuthServer.API.Logger COPY ./Directory.Build.props /app/Directory.Build.props +COPY ./Directory.Packages.props /app/Directory.Packages.props COPY ./.editorconfig /app/.editorconfig COPY ./Shared/CDR.DataHolder.Admin.API/. /app/Shared/CDR.DataHolder.Admin.API COPY ./Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/. /app/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS @@ -86,7 +88,6 @@ COPY ./Energy/CDR.DataHolder.Energy.Repository/. /app/Energy/CDR.DataHolder.Ener COPY ./Energy/CDR.DataHolder.Energy.Resource.API/. /app/Energy/CDR.DataHolder.Energy.Resource.API COPY ./Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/. /app/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests - WORKDIR /app/AuthServer/CdrAuthServer RUN dotnet publish -c Release -o /app/publish/cdrauthserver diff --git a/Source/Dockerfile.integration-tests b/Source/Dockerfile.integration-tests index f481a99..99cc6f0 100644 --- a/Source/Dockerfile.integration-tests +++ b/Source/Dockerfile.integration-tests @@ -1,6 +1,8 @@ # Dockerfile for running integration tests # playwright jammy for .Net 8 -FROM mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy as build +# the image tag version should be the same as the Playwright package +# which is a transitive dependency from ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation +FROM mcr.microsoft.com/playwright/dotnet:v1.43.0-jammy as build ARG INTEGRATION_TESTS_LOCATION @@ -17,8 +19,6 @@ ENV ASPNETCORE_ENVIRONMENT=Release RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh # Copy source -COPY ./Directory.Build.props ./Directory.Build.props -COPY ./.editorconfig ./.editorconfig COPY . ./ # Install developer certificate diff --git a/Source/Dockerfile.unit-tests b/Source/Dockerfile.unit-tests index 6d285e7..0d6e8e9 100644 --- a/Source/Dockerfile.unit-tests +++ b/Source/Dockerfile.unit-tests @@ -1,6 +1,6 @@ # Dockerfile for running unit tests -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build WORKDIR /src EXPOSE 9999 EXPOSE 9998 @@ -12,10 +12,7 @@ ENV ASPNETCORE_ENVIRONMENT=Release RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh - # Copy source -COPY ./Directory.Build.props ./Directory.Build.props -COPY ./.editorconfig ./.editorconfig COPY . ./ # Install ca certificate diff --git a/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj b/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj index d0c432c..066b7b1 100644 --- a/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj +++ b/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj @@ -1,25 +1,25 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + \ No newline at end of file diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj b/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj index 5c169dc..32a89f5 100644 --- a/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj +++ b/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj @@ -1,38 +1,38 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + \ No newline at end of file diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj b/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj index 91101b8..4537232 100644 --- a/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj +++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj @@ -1,80 +1,76 @@  - - false - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - Always - true - PreserveNewest - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - Always - - + + false + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + Always + true + PreserveNewest + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + Always + + \ No newline at end of file diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj b/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj index 45a4cda..d714eb6 100644 --- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj +++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj @@ -1,56 +1,56 @@  - - win-x64;linux-x64 - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - - - - Always - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - + + win-x64;linux-x64 + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + + + + + Always + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + \ No newline at end of file diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj index 9d601a3..5d2f87b 100644 --- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj +++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj @@ -1,95 +1,95 @@  - - false - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - Debug;Release;Shared - enable - enable - True - - - - Always - - - Always - - - Always - - - - - - - - - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - + + false + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + Debug;Release;Shared + enable + enable + True + + + + Always + + + Always + + + Always + + + + + + + + + + + + + + + + + + + true + + + true + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj b/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj index 790b043..b5fc86a 100644 --- a/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj +++ b/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj @@ -1,48 +1,44 @@  - - win-x64;linux-x64 - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - Always - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - PreserveNewest - true - PreserveNewest - - + + win-x64;linux-x64 + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + Always + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + PreserveNewest + true + PreserveNewest + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj b/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj index 9e45ee9..2858e08 100644 --- a/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj +++ b/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj @@ -1,49 +1,45 @@  - - win-x64;linux-x64 - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - Always - - - - - Always - - + + win-x64;linux-x64 + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + Always + + + + + Always + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj b/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj index 45eaabe..a2cf821 100644 --- a/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj +++ b/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj @@ -1,49 +1,44 @@  - - net8.0 - win-x64;linux-x64 - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - Always - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - PreserveNewest - true - PreserveNewest - - + + net8.0 + win-x64;linux-x64 + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + Always + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + PreserveNewest + true + PreserveNewest + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj index bba157c..384d77c 100644 --- a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj @@ -1,59 +1,55 @@  - - win-x64;linux-x64 - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - Always - - - Always - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - Always - - - - - Always - - - Always - - + + win-x64;linux-x64 + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + Always + + + Always + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + Always + + + + + Always + + + Always + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj index f072617..c50f5f6 100644 --- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj @@ -1,52 +1,50 @@  - - false - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - Always - - - Always - - - Always - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + false + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + Always + + + Always + + + Always + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj index 8b72a09..49eb7bb 100644 --- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj @@ -1,35 +1,33 @@  - - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - enable - True - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - + + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + enable + True + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj index b5f7eee..80ec3a4 100644 --- a/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj @@ -1,26 +1,27 @@  - - enable - enable - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - True - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + enable + enable + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + True + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj b/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj index 332e8db..bb1d327 100644 --- a/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj @@ -1,26 +1,26 @@ - - enable - enable - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - True - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + enable + enable + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + True + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj b/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj index 2a3703d..3e54f31 100644 --- a/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj @@ -1,34 +1,23 @@  - - enable - enable - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - True - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + enable + enable + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + True + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + \ No newline at end of file diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj b/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj index 7617a80..95d07a9 100644 --- a/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj +++ b/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj @@ -1,28 +1,28 @@  - - enable - enable - $(TargetFrameworkVersion) - $(Version) - $(Version) - $(Version) - True - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + enable + enable + $(TargetFrameworkVersion) + $(Version) + $(Version) + $(Version) + True + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + \ No newline at end of file diff --git a/Source/copy-cdr-auth-server.ps1 b/Source/copy-cdr-auth-server.ps1 index ddf3526..8b0cda8 100644 --- a/Source/copy-cdr-auth-server.ps1 +++ b/Source/copy-cdr-auth-server.ps1 @@ -11,12 +11,7 @@ if ($host.UI.PromptForChoice("Confirm", "Copy files from ..\..\cdr-auth-server i exit 1 } -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer\. cdr-auth-server\Source\CdrAuthServer -Recurse -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Domain\. cdr-auth-server\Source\CdrAuthServer.Domain -Recurse -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Repository\. cdr-auth-server\Source\CdrAuthServer.Repository -Recurse -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Infrastructure\. cdr-auth-server\Source\CdrAuthServer.Infrastructure -Recurse -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.API.Logger\. cdr-auth-server\Source\CdrAuthServer.API.Logger -Recurse -copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.UI\. cdr-auth-server\Source\CdrAuthServer.UI -Recurse +$source = Resolve-Path ..\..\cdr-auth-server -copy-item ..\..\cdr-auth-server\Source\Directory.Build.props cdr-auth-server\Source\Directory.Build.props -copy-item ..\..\cdr-auth-server\Source\.editorconfig cdr-auth-server\Source\.editorconfig \ No newline at end of file +# Using git clone is much faster as it respects .gitignore to not copy compiled artefacts and other irrelevant files that may exist in $source +git clone $source \ No newline at end of file diff --git a/Source/run-integration-tests.ps1 b/Source/run-integration-tests.ps1 index 5a494c2..8330dad 100644 --- a/Source/run-integration-tests.ps1 +++ b/Source/run-integration-tests.ps1 @@ -10,11 +10,11 @@ Write-Output "⚠ WARNING: Integration tests for MockDataHolder will use the exi Write-Output "***********************************************************" # Run integration tests -docker-compose -f docker-compose.IntegrationTests.yml up --build --abort-on-container-exit --exit-code-from mock-data-holder-integration-tests +docker compose -f docker-compose.IntegrationTests.yml up --build --abort-on-container-exit --exit-code-from mock-data-holder-integration-tests $_lastExitCode = $LASTEXITCODE # Stop containers -docker-compose -f docker-compose.IntegrationTests.yml down +docker compose -f docker-compose.IntegrationTests.yml down if ($_lastExitCode -eq 0) { Write-Output "***********************************************************" diff --git a/Source/run-unit-tests.ps1 b/Source/run-unit-tests.ps1 index 428fccb..6afe689 100644 --- a/Source/run-unit-tests.ps1 +++ b/Source/run-unit-tests.ps1 @@ -8,11 +8,11 @@ Write-Output "MockDataHolder unit tests" Write-Output "***********************************************************" # Build and run containers - docker-compose -f docker-compose.UnitTests.yml up --build --abort-on-container-exit --exit-code-from mock-data-holder-unit-tests + docker compose -f docker-compose.UnitTests.yml up --build --abort-on-container-exit --exit-code-from mock-data-holder-unit-tests $_lastExitCode = $LASTEXITCODE # Stop containers -docker-compose -f docker-compose.UnitTests.yml down +docker compose -f docker-compose.UnitTests.yml down if ($_lastExitCode -eq 0) { Write-Output "***********************************************************"