From 1b54792a3f62c33e93e0590eaab036a05657491d Mon Sep 17 00:00:00 2001 From: Stuart Ferguson Date: Sat, 25 Apr 2026 09:11:59 +0100 Subject: [PATCH] Update CI pipelines and Dockerfile for trace logs and user - Remove unit test step from createrelease.yml - Add trace log artifact upload to nightlybuild and pullrequest workflows - Remove USER 10001 directive from Dockerfile final stage --- .github/workflows/createrelease.yml | 7 ------- .github/workflows/nightlybuild.yml | 5 +++++ .github/workflows/pullrequest.yml | 5 +++++ MessagingService/Dockerfile | 1 - 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/createrelease.yml b/.github/workflows/createrelease.yml index 838710b..510d19d 100644 --- a/.github/workflows/createrelease.yml +++ b/.github/workflows/createrelease.yml @@ -25,13 +25,6 @@ jobs: - name: Build Code run: dotnet build MessagingService.sln --configuration Release - - name: Run Unit Tests - run: | - echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "MessagingService.BusinessLogic.Tests\MessagingService.BusinessLogic.Tests.csproj" - dotnet test "MessagingService.EmailAggregate.Tests\MessagingService.EmailAggregate.Tests.csproj" - dotnet test "MessagingService.Tests\MessagingService.Tests.csproj" - - name: Publish Images to Docker Hub - Pre Release if: ${{ github.event.release.prerelease == true }} run: | diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index ef14596..56d27d7 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -39,6 +39,11 @@ jobs: - name: Run Integration Tests run: dotnet test "MessagingService.IntegrationTests\MessagingService.IntegrationTests.csproj" + - uses: actions/upload-artifact@v4.4.0 + with: + name: tracelogs + path: /home/runner/trace/ + - uses: dacbd/create-issue-action@main if: ${{ failure() }} name: Create an issue on build failure diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8fc59aa..702a461 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -38,6 +38,11 @@ jobs: - name: Run Integration Tests run: dotnet test "MessagingService.IntegrationTests\MessagingService.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=integration-test-results.trx" + - uses: actions/upload-artifact@v4.4.0 + with: + name: tracelogs + path: /home/runner/trace/ + - name: Publish test results uses: dorny/test-reporter@v1 if: always() diff --git a/MessagingService/Dockerfile b/MessagingService/Dockerfile index 1de2615..6eb91dd 100644 --- a/MessagingService/Dockerfile +++ b/MessagingService/Dockerfile @@ -31,5 +31,4 @@ RUN dotnet publish "MessagingService.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -USER 10001 ENTRYPOINT ["dotnet", "MessagingService.dll"]