From 135e46d3954c2bcc4076961f8974124c9e5febf3 Mon Sep 17 00:00:00 2001 From: Sigrid Bratsberg Date: Fri, 7 Feb 2025 13:40:56 +0100 Subject: [PATCH 1/2] 213 Upgrade to dotnet 9 --- .github/workflows/build-and-analyze.yml | 2 +- .github/workflows/codeql-analysis.yml | 4 ++-- Dockerfile | 4 ++-- README.md | 2 +- .../Altinn.FileScan.Functions.csproj | 12 ++++++------ src/Altinn.FileScan/Altinn.FileScan.csproj | 6 +++--- .../Altinn.FileScan.Functions.Tests.csproj | 8 ++++---- .../Altinn.FileScan.Tests.csproj | 8 ++++---- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-and-analyze.yml b/.github/workflows/build-and-analyze.yml index b6b73ce5..40e00d55 100644 --- a/.github/workflows/build-and-analyze.yml +++ b/.github/workflows/build-and-analyze.yml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: | - 8.0.x + 9.0.x - name: Set up Java uses: actions/setup-java@v4 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 65e25130..2698943c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,11 +31,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup .NET 8.0.* SDK + - name: Setup .NET 9.0.* SDK uses: actions/setup-dotnet@v4 with: dotnet-version: | - 8.0.x + 9.0.x 7.0.x 6.0.x diff --git a/Dockerfile b/Dockerfile index 997f4198..5c4075b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.405-alpine3.20 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0.102-alpine3.21 AS build # Copy event backend COPY src/Altinn.FileScan ./Altinn.FileScan @@ -9,7 +9,7 @@ WORKDIR Altinn.FileScan/ RUN dotnet build Altinn.FileScan.csproj -c Release -o /app_output RUN dotnet publish Altinn.FileScan.csproj -c Release -o /app_output -FROM mcr.microsoft.com/dotnet/aspnet:8.0.12-alpine3.20 AS final +FROM mcr.microsoft.com/dotnet/aspnet:9.0.1-alpine3.21 AS final EXPOSE 5200 WORKDIR /app COPY --from=build /app_output . diff --git a/README.md b/README.md index 1a554c2b..864b6cc1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ These instructions will get you a copy of the filescan component up and running ### Prerequisites -1. [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) +1. [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) 2. Newest [Git](https://git-scm.com/downloads) 3. A code editor - we like [Visual Studio Code](https://code.visualstudio.com/download) - Install [Azure Functions extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions). You can also install the [Azure Tools extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack), which is recommended for working with Azure resources. diff --git a/src/Altinn.FileScan.Functions/Altinn.FileScan.Functions.csproj b/src/Altinn.FileScan.Functions/Altinn.FileScan.Functions.csproj index 3a630c26..2be28a0b 100644 --- a/src/Altinn.FileScan.Functions/Altinn.FileScan.Functions.csproj +++ b/src/Altinn.FileScan.Functions/Altinn.FileScan.Functions.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 v4 Exe true @@ -13,15 +13,15 @@ - - - + + + - + - + diff --git a/src/Altinn.FileScan/Altinn.FileScan.csproj b/src/Altinn.FileScan/Altinn.FileScan.csproj index 35d04413..d032b9cb 100644 --- a/src/Altinn.FileScan/Altinn.FileScan.csproj +++ b/src/Altinn.FileScan/Altinn.FileScan.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable true @@ -16,10 +16,10 @@ - + - + diff --git a/test/Altinn.FileScan.Functions.Tests/Altinn.FileScan.Functions.Tests.csproj b/test/Altinn.FileScan.Functions.Tests/Altinn.FileScan.Functions.Tests.csproj index f487c2e6..70dc109b 100644 --- a/test/Altinn.FileScan.Functions.Tests/Altinn.FileScan.Functions.Tests.csproj +++ b/test/Altinn.FileScan.Functions.Tests/Altinn.FileScan.Functions.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable @@ -10,11 +10,11 @@ - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/Altinn.FileScan.Tests/Altinn.FileScan.Tests.csproj b/test/Altinn.FileScan.Tests/Altinn.FileScan.Tests.csproj index 8f9a6b4f..22e963b3 100644 --- a/test/Altinn.FileScan.Tests/Altinn.FileScan.Tests.csproj +++ b/test/Altinn.FileScan.Tests/Altinn.FileScan.Tests.csproj @@ -1,16 +1,16 @@  - net8.0 + net9.0 false - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive From eda66bc03b1e302967ef9d2bedcb5ad642ca5c5b Mon Sep 17 00:00:00 2001 From: Sigrid Bratsberg Date: Mon, 10 Feb 2025 08:36:19 +0100 Subject: [PATCH 2/2] Remove unused dotnet versions from workflow --- .github/workflows/codeql-analysis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2698943c..7ff42c3c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,8 +36,6 @@ jobs: with: dotnet-version: | 9.0.x - 7.0.x - 6.0.x - name: Initialize CodeQL uses: github/codeql-action/init@v3