Skip to content

Commit 21c894b

Browse files
authored
Merge pull request #40 from DEFRA/feature/cleanse-reporting-email
Cleanse reporting;
2 parents c92f655 + e3da9a0 commit 21c894b

File tree

148 files changed

+11114
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+11114
-77
lines changed

.github/workflows/check-pull-request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ jobs:
7777
with:
7878
compose-file: |
7979
./working-dir/docker-compose.yml
80-
./working-dir/docker-compose.override.yml
80+
./working-dir/docker-compose.ci.yml
81+
up-flags: "--build"
8182
- name: Make script executable
8283
run: chmod +x ./working-dir/wait-for-docker-logs.sh
8384
- name: Wait for localstack

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,6 @@ library.db
270270
/localstack_data/cache
271271
/coverage
272272
/coverage-report
273+
274+
/coverage-report-final
275+
/coverage-report-full

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ RUN apt update && \
1414
# Build stage image
1515
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
1616
ARG BUILD_CONFIGURATION=Release
17-
ARG TARGETARCH=x64
1817
ENV BUILD_CONFIGURATION=${BUILD_CONFIGURATION}
1918
WORKDIR /src
2019

@@ -23,18 +22,20 @@ COPY ["src/KeeperData.Bridge.Worker/KeeperData.Bridge.Worker.csproj", "KeeperDat
2322
COPY ["src/KeeperData.Infrastructure/KeeperData.Infrastructure.csproj", "KeeperData.Infrastructure/"]
2423
COPY ["src/KeeperData.Application/KeeperData.Application.csproj", "KeeperData.Application/"]
2524
COPY ["src/KeeperData.Core/KeeperData.Core.csproj", "KeeperData.Core/"]
25+
COPY ["src/KeeperData.Core.Reports/KeeperData.Core.Reports.csproj", "KeeperData.Core.Reports/"]
2626

27-
RUN dotnet restore "KeeperData.Bridge/KeeperData.Bridge.csproj" -r linux-${TARGETARCH} -v n
28-
RUN dotnet restore "KeeperData.Bridge.Worker/KeeperData.Bridge.Worker.csproj" -r linux-${TARGETARCH} -v n
29-
RUN dotnet restore "KeeperData.Infrastructure/KeeperData.Infrastructure.csproj" -r linux-${TARGETARCH} -v n
30-
RUN dotnet restore "KeeperData.Application/KeeperData.Application.csproj" -r linux-${TARGETARCH} -v n
31-
RUN dotnet restore "KeeperData.Core/KeeperData.Core.csproj" -r linux-${TARGETARCH} -v n
27+
RUN dotnet restore "KeeperData.Bridge/KeeperData.Bridge.csproj" -r linux-x64 -v n
28+
RUN dotnet restore "KeeperData.Bridge.Worker/KeeperData.Bridge.Worker.csproj" -r linux-x64 -v n
29+
RUN dotnet restore "KeeperData.Infrastructure/KeeperData.Infrastructure.csproj" -r linux-x64 -v n
30+
RUN dotnet restore "KeeperData.Application/KeeperData.Application.csproj" -r linux-x64 -v n
31+
RUN dotnet restore "KeeperData.Core/KeeperData.Core.csproj" -r linux-x64 -v n
32+
RUN dotnet restore "KeeperData.Core.Reports/KeeperData.Core.Reports.csproj" -r linux-x64 -v n
3233

3334
COPY ["src/", "."]
3435

3536
FROM build AS publish
3637
WORKDIR "/src/KeeperData.Bridge"
37-
RUN dotnet publish "KeeperData.Bridge.csproj" -v n -c ${BUILD_CONFIGURATION} -o /app/publish -r linux-${TARGETARCH} --no-restore /p:UseAppHost=false
38+
RUN dotnet publish "KeeperData.Bridge.csproj" -v n -c ${BUILD_CONFIGURATION} -o /app/publish -r linux-x64 --no-restore /p:UseAppHost=false
3839

3940
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
4041

compose/start-localstack.sh

100755100644
File mode changed.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
services:
22
keeperdata_bridge:
3-
build:
4-
args:
5-
TARGETARCH: x64
63
labels:
74
com.microsoft.visual-studio.project-name: "KeeperData.Bridge"
85
environment:
@@ -18,11 +15,3 @@ services:
1815
- AesSalt=LD8BB2NNze7qKbVyLutAfGBxhkAApR
1916
ports:
2017
- "5560"
21-
volumes:
22-
# Mac-specific paths for user secrets and HTTPS certificates
23-
- ~/.microsoft/usersecrets:/home/app/.microsoft/usersecrets:ro
24-
- ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro
25-
- ~/.aspnet/https:/home/app/.aspnet/https:ro
26-
- ~/.aspnet/https:/root/.aspnet/https:ro
27-
networks:
28-
- cdp-tenant

docker-compose.override.mac.arm.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker-compose.override.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,3 @@ services:
2020
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
2121
- ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro
2222
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
23-
networks:
24-
- cdp-tenant

src/KeeperData.Bridge.PerformanceTests/KeeperData.Bridge.PerformanceTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
<IsPackable>false</IsPackable>
99
<IsTestProject>true</IsTestProject>
10+
<UserSecretsId>KeeperData.Bridge-20241201</UserSecretsId>
1011
</PropertyGroup>
1112

1213
<ItemGroup>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Diagnostics.CodeAnalysis;
2+
using KeeperData.Bridge.Worker.Tasks;
3+
using Microsoft.Extensions.Logging;
4+
using Quartz;
5+
6+
namespace KeeperData.Bridge.Worker.Jobs;
7+
8+
[DisallowConcurrentExecution]
9+
[ExcludeFromCodeCoverage(Justification = "Quartz job wrapper - covered by integration tests.")]
10+
public class CleanseReportJob(
11+
ITaskRunCleanseReport taskRunCleanseReport,
12+
ILogger<CleanseReportJob> logger) : IJob
13+
{
14+
public async Task Execute(IJobExecutionContext context)
15+
{
16+
logger.LogInformation("CleanseReportJob started at {StartTime}", DateTime.UtcNow);
17+
18+
try
19+
{
20+
await taskRunCleanseReport.RunAsync(context.CancellationToken);
21+
22+
logger.LogInformation("CleanseReportJob completed at {EndTime}", DateTime.UtcNow);
23+
}
24+
catch (Exception ex)
25+
{
26+
logger.LogError(ex, "CleanseReportJob failed");
27+
throw;
28+
}
29+
}
30+
}

src/KeeperData.Bridge.Worker/Jobs/ImportBulkFilesJob.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
using System.Diagnostics.CodeAnalysis;
12
using KeeperData.Bridge.Worker.Tasks;
23
using Microsoft.Extensions.Logging;
34
using Quartz;
45

56
namespace KeeperData.Bridge.Worker.Jobs;
67

78
[DisallowConcurrentExecution]
9+
[ExcludeFromCodeCoverage(Justification = "Quartz job wrapper - covered by integration tests.")]
810
public class ImportBulkFilesJob(
911
ITaskProcessBulkFiles taskProcessBulkFiles,
1012
ILogger<ImportBulkFilesJob> logger) : IJob

0 commit comments

Comments
 (0)