From b69d2689abf9a0c513f34ccd3d342b30eaca96b3 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 14:14:41 +0100 Subject: [PATCH 001/136] Create workflow for monorepo CI build --- .../workflows/ci-orchestrator-monorepo.yml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/ci-orchestrator-monorepo.yml diff --git a/.github/workflows/ci-orchestrator-monorepo.yml b/.github/workflows/ci-orchestrator-monorepo.yml new file mode 100644 index 00000000..d278d557 --- /dev/null +++ b/.github/workflows/ci-orchestrator-monorepo.yml @@ -0,0 +1,68 @@ +# Copyright 2020 Energinet DataHub A/S +# +# Licensed under the Apache License, Version 2.0 (the "License2"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: CI orchestrator (mono-repo) + +on: + pull_request: + branches: + - main + +jobs: + # + # License and Markdown Check + # + ci_base: + uses: Energinet-DataHub/.github/.github/workflows/ci-base.yml@v14 + secrets: + dh3serviceaccount_privatekey: ${{ secrets.dh3serviceaccount_privatekey }} + + # + # Detect changes to start relevant workflows + # + changes: + uses: ./.github/workflows/detect-changes.yml + + # ci_dotnet: + # needs: changes + # if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }} + # uses: ./.github/workflows/ci-dotnet.yml + + # ci_processmanager_nuget: + # needs: changes + # if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} + # uses: ./.github/workflows/processmanager-client-bundle-publish.yml + # secrets: inherit + + # + # Branch policy status check + # + + # allow_merge_ci_orchestrator: + # runs-on: ubuntu-latest + # needs: + # [ + # ci_base, + # ci_dotnet, + # ci_processmanager_nuget, + # ] + # if: | + # always() + # steps: + # - name: Verify if merge is allowed + # run: | + # echo "${{ toJSON(needs) }}" + # if [[ ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} = true ]]; then + # echo "Failed" + # exit 1 + # fi From 013ee00774a234fae62ad38f29720268a5627f4a Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 14:28:43 +0100 Subject: [PATCH 002/136] Add detect-changes --- .../workflows/ci-orchestrator-monorepo.yml | 8 ++ .github/workflows/detect-changes.yml | 105 +++++++++++------- 2 files changed, 72 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci-orchestrator-monorepo.yml b/.github/workflows/ci-orchestrator-monorepo.yml index d278d557..852cfc66 100644 --- a/.github/workflows/ci-orchestrator-monorepo.yml +++ b/.github/workflows/ci-orchestrator-monorepo.yml @@ -32,6 +32,14 @@ jobs: # changes: uses: ./.github/workflows/detect-changes.yml + with: + solution_file: 'source/ProcessManager.sln' + hostnames: " + { + 'astra': 'ProcessManager.csproj', + 'orion': 'ProcessManager.Orchestrations.csproj', + 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' + }" # ci_dotnet: # needs: changes diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 7e121d55..203f2139 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -22,53 +22,76 @@ name: Detect changes on: workflow_call: + inputs: + solution_file: + required: true + type: string + hostnames: + required: true + type: string outputs: - dotnet: - value: ${{ jobs.changes.outputs.dotnet }} - db_migrations: - value: ${{ jobs.changes.outputs.db_migrations }} - processmanager_nuget: - value: ${{ jobs.changes.outputs.processmanager_nuget }} - render_c4model_views: - value: ${{ jobs.changes.outputs.render_c4model_views }} + affected_changes: + value: ${{ jobs.changes.outputs.affected_changes }} + job_context: + value: ${{ jobs.changes.outputs.job_context }} jobs: changes: - name: Determine relevant jobs + name: Detect changes runs-on: ubuntu-latest - # Set job outputs to values from filter step outputs: - dotnet: ${{ steps.filter.outputs.dotnet }} - db_migrations: ${{ steps.filter.outputs.db_migrations }} - processmanager_nuget: ${{ steps.filter.outputs.processmanager_nuget }} - render_c4model_views: ${{ steps.filter.outputs.render_c4model_views }} + affected_changes: ${{ steps.filter.outputs.affected_changes }} + job_context: "{ + 'astra': '${{ steps.filter.outputs.astra }}', + 'orion': '${{ steps.filter.outputs.orion }}', + 'dbmigrations': '${{ steps.filter.outputs.dbmigrations }}' + }" steps: - # For pull requests it's not necessary to checkout the code because GitHub REST API is used to determine changes - - name: Checkout repository - if: ${{ github.event_name != 'pull_request' }} - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history so that we can determine the base commit + + - uses: nrwl/nx-set-shas@v4 + id: set_shas - - name: Detect file changes - uses: dorny/paths-filter@v3 + - name: Run dotnet-affected + shell: pwsh id: filter - with: - filters: | - dotnet: - - '.github/actions/dotnet-*/**' - - '.github/workflows/**' - - 'source/**' - - 'source/!(DatabaseMigration/**)**' - - 'source/!(ProcessManager.Client/**)**' - db_migrations: - - 'source/DatabaseMigration/**' - processmanager_nuget: - - 'docs/ProcessManager.Client/**' - - 'docs/ProcessManager.Orchestrations.Abstractions/**' - - 'source/ProcessManager.Client*/**' - - 'source/ProcessManager.Abstractions*/**' - - 'source/ProcessManager.Orchestrations.Abstractions*/**' - - '.github/workflows/processmanager-client-bundle-publish.yml' - render_c4model_views: - - 'docs/diagrams/c4-model/views.dsl' - - 'docs/diagrams/c4-model/views.json' - - 'docs/diagrams/c4-model/model.dsl' + run: | + $hostNames = "${{ inputs.hostnames }}" | ConvertFrom-Json + $solutionPath = ${{github.workspace}}/${{inputs.solution_file}} + $workspacePath = ${{github.workspace}} + $fromSha = ${{steps.set_shas.outputs.base}} + $toSha = ${{steps.set_shas.outputs.head}} + + dotnet tool install dotnet-affected --global + dotnet affected --solution-path $solutionPath -p $workspacePath --from $baseSha --to $toSha --format traversal json + + if (Test-Path affected.proj) { + $affectedJson = Get-Content affected.json + $affectedJson | Write-Host + $affectedProjects = $affectedJson | ConvertFrom-Json + "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT + + foreach ($hostName in $hostNames) { + foreach ($project in $hostname.PSObject.Properties) { + #Write-Host $project.Name + foreach ($csprojFile in $project.Value) { + #Write-Host $csprojFile + + foreach ($affectedProjectFilePath in $affectedProjects.Filepath) { + if ($affectedProjectFilePath.Contains($csprojFile)) { + + # No less than 4 foreach loops, I know... + Write-Host "$($project.Name) is affected by a change in $affectedProjectFilePath" + + "$($project.Name)=true" >> $env:GITHUB_OUTPUT + } + } + } + } + } + } else { + Write-Host "No projects affected" + exit 0 + } \ No newline at end of file From 43049463c04d8c168f2a8341a6d079c3fe7a74fe Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 14:33:09 +0100 Subject: [PATCH 003/136] Fixes --- .../workflows/ci-orchestrator-monorepo.yml | 76 ------------------- .github/workflows/ci-orchestrator.yml | 35 +++++---- .github/workflows/detect-changes.yml | 8 +- 3 files changed, 26 insertions(+), 93 deletions(-) delete mode 100644 .github/workflows/ci-orchestrator-monorepo.yml diff --git a/.github/workflows/ci-orchestrator-monorepo.yml b/.github/workflows/ci-orchestrator-monorepo.yml deleted file mode 100644 index 852cfc66..00000000 --- a/.github/workflows/ci-orchestrator-monorepo.yml +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 2020 Energinet DataHub A/S -# -# Licensed under the Apache License, Version 2.0 (the "License2"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: CI orchestrator (mono-repo) - -on: - pull_request: - branches: - - main - -jobs: - # - # License and Markdown Check - # - ci_base: - uses: Energinet-DataHub/.github/.github/workflows/ci-base.yml@v14 - secrets: - dh3serviceaccount_privatekey: ${{ secrets.dh3serviceaccount_privatekey }} - - # - # Detect changes to start relevant workflows - # - changes: - uses: ./.github/workflows/detect-changes.yml - with: - solution_file: 'source/ProcessManager.sln' - hostnames: " - { - 'astra': 'ProcessManager.csproj', - 'orion': 'ProcessManager.Orchestrations.csproj', - 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' - }" - - # ci_dotnet: - # needs: changes - # if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }} - # uses: ./.github/workflows/ci-dotnet.yml - - # ci_processmanager_nuget: - # needs: changes - # if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} - # uses: ./.github/workflows/processmanager-client-bundle-publish.yml - # secrets: inherit - - # - # Branch policy status check - # - - # allow_merge_ci_orchestrator: - # runs-on: ubuntu-latest - # needs: - # [ - # ci_base, - # ci_dotnet, - # ci_processmanager_nuget, - # ] - # if: | - # always() - # steps: - # - name: Verify if merge is allowed - # run: | - # echo "${{ toJSON(needs) }}" - # if [[ ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} = true ]]; then - # echo "Failed" - # exit 1 - # fi diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index d70c634c..1a097e95 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -name: CI orchestrator +name: CI orchestrator (mono-repo) on: pull_request: @@ -24,6 +24,8 @@ jobs: # ci_base: uses: Energinet-DataHub/.github/.github/workflows/ci-base.yml@v14 + with: + skip_yaml_lint: true # TODO: Remove before merge secrets: dh3serviceaccount_privatekey: ${{ secrets.dh3serviceaccount_privatekey }} @@ -32,17 +34,25 @@ jobs: # changes: uses: ./.github/workflows/detect-changes.yml + with: + solution_file: 'source/ProcessManager.sln' + hostnames: " + { + 'astra': 'ProcessManager.csproj', + 'orion': 'ProcessManager.Orchestrations.csproj', + 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' + }" - ci_dotnet: - needs: changes - if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }} - uses: ./.github/workflows/ci-dotnet.yml + # ci_dotnet: + # needs: changes + # if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }} + # uses: ./.github/workflows/ci-dotnet.yml - ci_processmanager_nuget: - needs: changes - if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} - uses: ./.github/workflows/processmanager-client-bundle-publish.yml - secrets: inherit + # ci_processmanager_nuget: + # needs: changes + # if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} + # uses: ./.github/workflows/processmanager-client-bundle-publish.yml + # secrets: inherit # # Branch policy status check @@ -52,9 +62,8 @@ jobs: runs-on: ubuntu-latest needs: [ - ci_base, - ci_dotnet, - ci_processmanager_nuget, + ci_base + # TODO: Add more jobs here ] if: | always() diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 203f2139..e086ebeb 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -59,10 +59,10 @@ jobs: id: filter run: | $hostNames = "${{ inputs.hostnames }}" | ConvertFrom-Json - $solutionPath = ${{github.workspace}}/${{inputs.solution_file}} - $workspacePath = ${{github.workspace}} - $fromSha = ${{steps.set_shas.outputs.base}} - $toSha = ${{steps.set_shas.outputs.head}} + $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" + $workspacePath = "${{github.workspace}}" + $fromSha = "${{steps.set_shas.outputs.base}}" + $toSha = "${{steps.set_shas.outputs.head}}" dotnet tool install dotnet-affected --global dotnet affected --solution-path $solutionPath -p $workspacePath --from $baseSha --to $toSha --format traversal json From e355350d5d26b0bd2cb790b60fe81d20ae81f362 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 14:35:31 +0100 Subject: [PATCH 004/136] Doh! --- .github/workflows/detect-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index e086ebeb..59eeb1bf 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -65,7 +65,7 @@ jobs: $toSha = "${{steps.set_shas.outputs.head}}" dotnet tool install dotnet-affected --global - dotnet affected --solution-path $solutionPath -p $workspacePath --from $baseSha --to $toSha --format traversal json + dotnet affected --solution-path $solutionPath -p $workspacePath --from $fromSha --to $toSha --format traversal json if (Test-Path affected.proj) { $affectedJson = Get-Content affected.json From d59443be371192d1a70eeeb8d2bb6964c8c66ec7 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 16:03:28 +0100 Subject: [PATCH 005/136] Move detect-changes to testable action --- .../Find-AffectedProjects.Tests.ps1 | 54 ++++++++++++++ .../dotnet-affected/Find-AffectedProjects.ps1 | 52 ++++++++++++++ .github/actions/dotnet-affected/action.yml | 61 ++++++++++++++++ .github/workflows/detect-changes.yml | 72 +++++++++---------- 4 files changed, 200 insertions(+), 39 deletions(-) create mode 100644 .github/actions/dotnet-affected/Find-AffectedProjects.Tests.ps1 create mode 100644 .github/actions/dotnet-affected/Find-AffectedProjects.ps1 create mode 100644 .github/actions/dotnet-affected/action.yml diff --git a/.github/actions/dotnet-affected/Find-AffectedProjects.Tests.ps1 b/.github/actions/dotnet-affected/Find-AffectedProjects.Tests.ps1 new file mode 100644 index 00000000..43beee9a --- /dev/null +++ b/.github/actions/dotnet-affected/Find-AffectedProjects.Tests.ps1 @@ -0,0 +1,54 @@ +Describe "Find-AffectedProjects" { + BeforeAll { + . $PSScriptRoot/Find-AffectedProjects.ps1 + } + + Context "When no hosts are affected" { + + It 'should return nothing' { + $affectedProjectsJson = "[]" + + $hostNamesJson = "{ + 'foo': 'Bar.csproj', + 'bar': 'FooBar.csproj' + }" + + $expectedResult = "{ + 'foo': '', + 'bar': '' + }" | ConvertFrom-Json | ConvertTo-Json -Compress + + $affectedHosts = Find-AffectedHosts -AffectedProjects $affectedProjectsJson -HostNames $hostNamesJson + $affectedHosts | Should -Be $expectedResult + } + } + + Context "When one host is affected by changes" { + + It 'should return nothing' { + $affectedProjectsJson = "[ + { + 'Name': 'Bar', + 'Filepath': 'source/somePath/Bar.csproj' + }, + { + 'Name': 'BarBaz', + 'Filepath': 'source/somePath/BarBaz.csproj' + } + ]" + + $hostNamesJson = "{ + 'foo': 'Bar.csproj', + 'bar': 'FooBar.csproj' + }" + + $expectedResult = "{ + 'foo': 'true', + 'bar': '' + }" | ConvertFrom-Json | ConvertTo-Json -Compress + + $affectedHosts = Find-AffectedHosts -AffectedProjects $affectedProjectsJson -HostNames $hostNamesJson + $affectedHosts | Should -Be $expectedResult + } + } +} \ No newline at end of file diff --git a/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 new file mode 100644 index 00000000..83766f16 --- /dev/null +++ b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 @@ -0,0 +1,52 @@ +<# +.SYNOPSIS +Find affected hosts given a set of affected .NET project files + +.OUTPUTS +Hostnames that are affected +#> + +function Find-AffectedHosts { + param ( + $AffectedProjects, + $Hostnames + ) + + $hostnamesOutput = ($hostNames | ConvertFrom-Json) + + foreach ($hostName in ($Hostnames | ConvertFrom-Json)) { + foreach ($project in $hostname.PSObject.Properties) { + $hostnamesOutput.$($project.Name) = '' + + foreach ($csprojFile in $project.Value) { + foreach ($affectedProjectFilePath in ($affectedProjects | ConvertFrom-Json).Filepath) { + if ($affectedProjectFilePath.Contains($csprojFile)) { + + # No less than 4 foreach loops, I know... + Write-Host "$($project.Name) is affected by a change in $affectedProjectFilePath" + $hostnamesOutput.$($project.Name) = 'true' + } + } + } + } + } + + return $hostnamesOutput | ConvertTo-Json -Compress +} + +<# +.SYNOPSIS + +Install and run dotnet-affected +#> +function Write-AffectedProjectsFile { + param ( + $SolutionPath, + $WorkspacePath, + $FromSha, + $ToSha + ) + + dotnet tool install dotnet-affected --global + dotnet affected --solution-path $solutionPath -p $workspacePath --from $fromSha --to $toSha --format traversal json +} \ No newline at end of file diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml new file mode 100644 index 00000000..26741383 --- /dev/null +++ b/.github/actions/dotnet-affected/action.yml @@ -0,0 +1,61 @@ +# Copyright 2020 Energinet DataHub A/S +# +# Licensed under the Apache License, Version 2.0 (the "License2"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Find affected .NET projects +description: "Find affected .NET projects in a solution." + +inputs: + solution_file: + description: "The path to the solution file." + required: true + workspace_path: + description: "The path to the workspace." + required: true + from_sha: + description: "The commit SHA to compare from." + required: true + to_sha: + description: "The commit SHA to compare to." + required: true + host_names: + description: "Host names mapped to project names" + required: true + +runs: + using: composite + steps: + - name: Find affected projects + shell: pwsh + id: affected + run: | + . ./Find-AffectedProjectsFile.ps1 + + $hostNamesJson = "${{ inputs.hostnames }}" + $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" + $workspacePath = "${{github.workspace}}" + $fromSha = "${{steps.set_shas.outputs.base}}" + $toSha = "${{steps.set_shas.outputs.head}}" + $affectedProjectsFile = 'affected.json' + + # Install and run dotnet-affected, outputs a json file with affected projects + Write-AffectedProjectsFile -SolutionFile $solutionPath -WorkspacePath $workspacePath -FromSha $fromSha -ToSha $toSha + + if (Test-Path $AffectedProjectsFile) { + $affectedJson = Get-Content $AffectedProjectsFile + $affectedJson | Write-Host + "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT + + $job_context_output = Find-AffectedHosts -AffectedProjectsfile $affectedJson -HostNames $hostNamesJson + "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT + } diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 59eeb1bf..570c9ea4 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -33,7 +33,7 @@ on: affected_changes: value: ${{ jobs.changes.outputs.affected_changes }} job_context: - value: ${{ jobs.changes.outputs.job_context }} + value: ${{ jobs.changes.outputs.job_context_output }} jobs: changes: @@ -41,11 +41,7 @@ jobs: runs-on: ubuntu-latest outputs: affected_changes: ${{ steps.filter.outputs.affected_changes }} - job_context: "{ - 'astra': '${{ steps.filter.outputs.astra }}', - 'orion': '${{ steps.filter.outputs.orion }}', - 'dbmigrations': '${{ steps.filter.outputs.dbmigrations }}' - }" + job_context_output: ${{ steps.filter.outputs.job_context_output }} steps: - uses: actions/checkout@v4 with: @@ -55,43 +51,41 @@ jobs: id: set_shas - name: Run dotnet-affected - shell: pwsh + uses: ./.github/actions/dotnet-affected id: filter - run: | - $hostNames = "${{ inputs.hostnames }}" | ConvertFrom-Json - $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" - $workspacePath = "${{github.workspace}}" - $fromSha = "${{steps.set_shas.outputs.base}}" - $toSha = "${{steps.set_shas.outputs.head}}" + with: + solution_file: ${{ inputs.solution_file }} + workspace_path: ${{ github.workspace }} + from_sha: ${{ steps.set_shas.outputs.base }} + to_sha: ${{ steps.set_shas.outputs.head }} + host_names: ${{ inputs.hostnames }} + + # - name: Run dotnet-affected + # shell: pwsh + # id: filter + # run: | + # $hostNames = "${{ inputs.hostnames }}" + # $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" + # $workspacePath = "${{github.workspace}}" + # $fromSha = "${{steps.set_shas.outputs.base}}" + # $toSha = "${{steps.set_shas.outputs.head}}" + # $affectedProjectsFile = 'affected.json' - dotnet tool install dotnet-affected --global - dotnet affected --solution-path $solutionPath -p $workspacePath --from $fromSha --to $toSha --format traversal json + # . ./Find-AffectedProjectsFile.ps1 - if (Test-Path affected.proj) { - $affectedJson = Get-Content affected.json - $affectedJson | Write-Host - $affectedProjects = $affectedJson | ConvertFrom-Json - "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT + # # Install and run dotnet-affected + # Write-AffectedProjectsFile -SolutionFile $solutionPath -WorkspacePath $workspacePath -FromSha $fromSha -ToSha $toSha - foreach ($hostName in $hostNames) { - foreach ($project in $hostname.PSObject.Properties) { - #Write-Host $project.Name - foreach ($csprojFile in $project.Value) { - #Write-Host $csprojFile + # if (Test-Path $AffectedProjectsFile) { + # $affectedJson = Get-Content $AffectedProjectsFile + # $affectedJson | Write-Host + # $affectedProjects = $affectedJson | ConvertFrom-Json + # "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT + + # $job_context_output = Find-AffectedHosts -AffectedProjectsfile $affectedProjectsFile -HostNames ($hostNames | ConvertFrom-Json) + # "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT + # } - foreach ($affectedProjectFilePath in $affectedProjects.Filepath) { - if ($affectedProjectFilePath.Contains($csprojFile)) { - # No less than 4 foreach loops, I know... - Write-Host "$($project.Name) is affected by a change in $affectedProjectFilePath" - "$($project.Name)=true" >> $env:GITHUB_OUTPUT - } - } - } - } - } - } else { - Write-Host "No projects affected" - exit 0 - } \ No newline at end of file + \ No newline at end of file From dee1ecf70b592ccd13f41c6ba2c3a11b03e2a083 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 4 Dec 2024 16:06:18 +0100 Subject: [PATCH 006/136] Fix inputs --- .github/actions/dotnet-affected/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 26741383..8d55aeb1 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -41,11 +41,11 @@ runs: run: | . ./Find-AffectedProjectsFile.ps1 - $hostNamesJson = "${{ inputs.hostnames }}" + $hostNamesJson = "${{ inputs.host_names }}" $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" $workspacePath = "${{github.workspace}}" - $fromSha = "${{steps.set_shas.outputs.base}}" - $toSha = "${{steps.set_shas.outputs.head}}" + $fromSha = "${{ inputs.from_sha }}" + $toSha = "${{ inputs.to_sha}}" $affectedProjectsFile = 'affected.json' # Install and run dotnet-affected, outputs a json file with affected projects From 508b8e06fe1cad88349dca4d34ef3a89d9b62232 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:16:56 +0100 Subject: [PATCH 007/136] Fix path --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 8d55aeb1..44415dd6 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -39,7 +39,7 @@ runs: shell: pwsh id: affected run: | - . ./Find-AffectedProjectsFile.ps1 + . ${{ github.action_path }}/Find-AffectedProjectsFile.ps1 $hostNamesJson = "${{ inputs.host_names }}" $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" From 80aa7dd386b12e3d6e4ae636ebe2828c30d26847 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:19:39 +0100 Subject: [PATCH 008/136] kljh --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 44415dd6..bd3e3dbe 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -39,7 +39,7 @@ runs: shell: pwsh id: affected run: | - . ${{ github.action_path }}/Find-AffectedProjectsFile.ps1 + . ${{ github.action_path }}/Find-AffectedProjects.ps1 $hostNamesJson = "${{ inputs.host_names }}" $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" From f45b7d39c7e0cf239a7f2986616e14b3f05649c0 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:24:08 +0100 Subject: [PATCH 009/136] Debug print --- .github/actions/dotnet-affected/Find-AffectedProjects.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 index 83766f16..554e7755 100644 --- a/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 +++ b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 @@ -48,5 +48,7 @@ function Write-AffectedProjectsFile { ) dotnet tool install dotnet-affected --global + Write-Host "dotnet affected --solution-path $solutionPath -p $workspacePath --from $fromSha --to $toSha --format traversal json" + dotnet affected --solution-path $solutionPath -p $workspacePath --from $fromSha --to $toSha --format traversal json } \ No newline at end of file From c83dd1ae157495f8f2ee43ceb7806d80a55572a1 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:25:57 +0100 Subject: [PATCH 010/136] Doh! --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index bd3e3dbe..96a15e30 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -49,7 +49,7 @@ runs: $affectedProjectsFile = 'affected.json' # Install and run dotnet-affected, outputs a json file with affected projects - Write-AffectedProjectsFile -SolutionFile $solutionPath -WorkspacePath $workspacePath -FromSha $fromSha -ToSha $toSha + Write-AffectedProjectsFile -SolutionPath $solutionPath -WorkspacePath $workspacePath -FromSha $fromSha -ToSha $toSha if (Test-Path $AffectedProjectsFile) { $affectedJson = Get-Content $AffectedProjectsFile From e211d43ea55e9c6e7df3735b306fa57bd250d947 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:32:48 +0100 Subject: [PATCH 011/136] Will this work ? --- .github/actions/dotnet-affected/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 96a15e30..0a9927b4 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -37,7 +37,7 @@ runs: steps: - name: Find affected projects shell: pwsh - id: affected + #id: filter run: | . ${{ github.action_path }}/Find-AffectedProjects.ps1 @@ -58,4 +58,9 @@ runs: $job_context_output = Find-AffectedHosts -AffectedProjectsfile $affectedJson -HostNames $hostNamesJson "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT + } else { + # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details + if $LASTEXITCODE -eq 166 { + exit 0 + } } From 92824207470dfbba26fb0458f1f0e603b0051699 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:35:16 +0100 Subject: [PATCH 012/136] lkj --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 0a9927b4..28e805c1 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -60,7 +60,7 @@ runs: "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT } else { # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details - if $LASTEXITCODE -eq 166 { + if ($LASTEXITCODE -eq 166) { exit 0 } } From 89a794b9e33974c6f9f72b6e3cf0d05f94ccbb0a Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:36:40 +0100 Subject: [PATCH 013/136] Introduce change --- source/ProcessManager/Scheduler/SchedulerHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager/Scheduler/SchedulerHandler.cs b/source/ProcessManager/Scheduler/SchedulerHandler.cs index c5daaab2..778ac888 100644 --- a/source/ProcessManager/Scheduler/SchedulerHandler.cs +++ b/source/ProcessManager/Scheduler/SchedulerHandler.cs @@ -46,7 +46,7 @@ await _command } catch (Exception ex) { - // Log error if orchestration instance did not start successfully. + // Log error if orchestration instance did not start successfully // Does not throw exception since we want to continue processing the next scheduled orchestration instance. _logger.LogError( ex, From 20663a2955d9131d93622ac403423fc381087ef2 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:39:18 +0100 Subject: [PATCH 014/136] =?UTF-8?q?=C3=A6lkj?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/dotnet-affected/Find-AffectedProjects.ps1 | 6 ++++++ .github/actions/dotnet-affected/action.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 index 554e7755..aa4d72a5 100644 --- a/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 +++ b/.github/actions/dotnet-affected/Find-AffectedProjects.ps1 @@ -8,7 +8,9 @@ Hostnames that are affected function Find-AffectedHosts { param ( + [Parameter(Mandatory)] $AffectedProjects, + [Parameter(Mandatory)] $Hostnames ) @@ -41,9 +43,13 @@ Install and run dotnet-affected #> function Write-AffectedProjectsFile { param ( + [Parameter(Mandatory)] $SolutionPath, + [Parameter(Mandatory)] $WorkspacePath, + [Parameter(Mandatory)] $FromSha, + [Parameter(Mandatory)] $ToSha ) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 28e805c1..f2983ac0 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -56,7 +56,7 @@ runs: $affectedJson | Write-Host "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT - $job_context_output = Find-AffectedHosts -AffectedProjectsfile $affectedJson -HostNames $hostNamesJson + $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT } else { # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details From 6fdbc41af57b64db634c95f496e07b7579f3243b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:42:12 +0100 Subject: [PATCH 015/136] Debug print --- .github/workflows/detect-changes.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 570c9ea4..fd339e42 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -59,6 +59,11 @@ jobs: from_sha: ${{ steps.set_shas.outputs.base }} to_sha: ${{ steps.set_shas.outputs.head }} host_names: ${{ inputs.hostnames }} + + - name: Print affected changes + run: | + echo Affected changes: ${{ steps.filter.outputs.affected_changes }} + echo Job context: ${{ steps.filter.outputs.job_context_output }} # - name: Run dotnet-affected # shell: pwsh From 7578038c573dc940e2c58c060d30d56d8f285564 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:43:56 +0100 Subject: [PATCH 016/136] Set output vars --- .github/actions/dotnet-affected/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index f2983ac0..3e651eb4 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -31,6 +31,9 @@ inputs: host_names: description: "Host names mapped to project names" required: true +outputs: + affected_changes: ${{ steps.filter.outputs.affected_changes }} + job_context_output: ${{ steps.filter.outputs.job_context_output }} runs: using: composite From baf31fa90a6c282d2a9b894fe9c401c4203cb731 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:44:08 +0100 Subject: [PATCH 017/136] Forgot filter --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 3e651eb4..1e398de5 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -40,7 +40,7 @@ runs: steps: - name: Find affected projects shell: pwsh - #id: filter + id: filter run: | . ${{ github.action_path }}/Find-AffectedProjects.ps1 From a31adabd9fc28dac984eb1c1c9f7f8adef8ef244 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 10:46:54 +0100 Subject: [PATCH 018/136] Fix output values --- .github/actions/dotnet-affected/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 1e398de5..3e692d87 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -32,8 +32,12 @@ inputs: description: "Host names mapped to project names" required: true outputs: - affected_changes: ${{ steps.filter.outputs.affected_changes }} - job_context_output: ${{ steps.filter.outputs.job_context_output }} + affected_changes: + description: "The affected projects, if any" + value: ${{ steps.filter.outputs.affected_changes }} + job_context_output: + description: "The job context output, if any" + value: ${{ steps.filter.outputs.job_context_output }} runs: using: composite From d76ae05cb72f64bd51f87ffe80ad37af1e53a868 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:20:59 +0100 Subject: [PATCH 019/136] Remove commented-out code --- .github/workflows/detect-changes.yml | 31 ---------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index fd339e42..c63d4378 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -59,37 +59,6 @@ jobs: from_sha: ${{ steps.set_shas.outputs.base }} to_sha: ${{ steps.set_shas.outputs.head }} host_names: ${{ inputs.hostnames }} - - - name: Print affected changes - run: | - echo Affected changes: ${{ steps.filter.outputs.affected_changes }} - echo Job context: ${{ steps.filter.outputs.job_context_output }} - - # - name: Run dotnet-affected - # shell: pwsh - # id: filter - # run: | - # $hostNames = "${{ inputs.hostnames }}" - # $solutionPath = "${{github.workspace}}/${{inputs.solution_file}}" - # $workspacePath = "${{github.workspace}}" - # $fromSha = "${{steps.set_shas.outputs.base}}" - # $toSha = "${{steps.set_shas.outputs.head}}" - # $affectedProjectsFile = 'affected.json' - - # . ./Find-AffectedProjectsFile.ps1 - - # # Install and run dotnet-affected - # Write-AffectedProjectsFile -SolutionFile $solutionPath -WorkspacePath $workspacePath -FromSha $fromSha -ToSha $toSha - - # if (Test-Path $AffectedProjectsFile) { - # $affectedJson = Get-Content $AffectedProjectsFile - # $affectedJson | Write-Host - # $affectedProjects = $affectedJson | ConvertFrom-Json - # "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT - - # $job_context_output = Find-AffectedHosts -AffectedProjectsfile $affectedProjectsFile -HostNames ($hostNames | ConvertFrom-Json) - # "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT - # } From 0b01f6f3a523e1442009170e5869908341ca0076 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:21:20 +0100 Subject: [PATCH 020/136] Use mountains for hostnames --- .github/actions/dotnet-affected/action.yml | 2 +- .github/workflows/ci-dotnet.yml | 90 +++++++++++----------- .github/workflows/ci-orchestrator.yml | 42 ++++++---- 3 files changed, 76 insertions(+), 58 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 3e692d87..16b0eca4 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -35,7 +35,7 @@ outputs: affected_changes: description: "The affected projects, if any" value: ${{ steps.filter.outputs.affected_changes }} - job_context_output: + job_context: description: "The job context output, if any" value: ${{ steps.filter.outputs.job_context_output }} diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index a217a34a..08e956d2 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -15,53 +15,55 @@ name: CI dotnet on: - workflow_call: {} + workflow_call: + inputs: + release_name: + description: The name of the artifact + required: true + type: string + project_file: + description: The context of the job + type: string + required: true jobs: - # Build all projects within solution - dotnet_ci_build: - uses: Energinet-DataHub/.github/.github/workflows/dotnet-build-prerelease.yml@v14 - with: - solution_file_path: source/ProcessManager.sln + build_artifact: + name: Build artifact ${{ inputs.release_name }} + runs-on: ubuntu-latest + env: + RELEASE_FOLDER_PATH: ${{ github.workspace }}/output + RELEASE_VERSION: ${{ inputs.release_name }}_${{ github.event.pull_request.number }} + steps: + - uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ env.RELEASE_VERSION }}-${{ inputs.release_name }} # Cache per PR - # Tests that require the integration test environment - # DO NOT add ProcessManager.Client tests, they must be executed as part of the "publish" workflow" - integration_tests: - strategy: - fail-fast: false - matrix: - tests_filter_expression: - - name: ProcessManager Tests - paths: \source\ProcessManager.Tests\bin\Release\net8.0\Energinet.DataHub.ProcessManager.Tests.dll - filter: empty # Means skip - use_azure_functions_tools: true - contentroot_variable_name: empty # Means skip + - name: Checkout repository + uses: actions/checkout@v4 - - name: ProcessManager Orchestrations Tests - paths: \source\ProcessManager.Orchestrations.Tests\bin\Release\net8.0\Energinet.DataHub.ProcessManager.Orchestrations.Tests.dll - filter: empty # Means skip - use_azure_functions_tools: true - contentroot_variable_name: empty # Means skip + - name: Build ${{ inputs.release_name }} + run: | + dotnet publish \ + '${{ github.workspace }}/${{ inputs.project_file }}' \ + --configuration Release \ + --output '${{ env.RELEASE_FOLDER_PATH }}' - - name: ProcessManager Core Tests - paths: \source\ProcessManager.Core.Tests\bin\Release\net8.0\Energinet.DataHub.ProcessManager.Core.Tests.dll - filter: empty # Means skip - use_azure_functions_tools: true - contentroot_variable_name: empty # Means skip + - name: Zip files for prerelease + if: ${{ github.event_name == 'pull_request' }} + uses: thedoctor0/zip-release@0.6.2 + with: + type: zip + filename: ${{ env.RELEASE_VERSION }}.zip + directory: ${{ env.RELEASE_FOLDER_PATH }} - uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@v14 - with: - download_attempt_limit: 20 - azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} - azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} - azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} - azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} - environment: AzureAuth - run_integration_tests: true - # Matrix parameters - job_name: ${{ matrix.tests_filter_expression.name }} - tests_dll_file_path: ${{ matrix.tests_filter_expression.paths }} - tests_filter_expression: ${{ matrix.tests_filter_expression.filter }} - use_azure_functions_tools: ${{ matrix.tests_filter_expression.use_azure_functions_tools }} - aspnetcore_test_contentroot_variable_name: ${{ matrix.tests_filter_expression.contentroot_variable_name }} - aspnetcore_test_contentroot_variable_value: ${{ matrix.tests_filter_expression.contentroot_variable_value }} + - name: Create pre-release + if: ${{ github.event_name == 'pull_request' }} + uses: Energinet-Datahub/.github/.github/actions/github-create-release@v14 + with: + repo_token: ${{ github.token }} + automatic_release_tag: ${{ env.RELEASE_VERSION }} + prerelease: true + title: ${{ env.RELEASE_VERSION }} + files: | + ${{ env.RELEASE_FOLDER_PATH }}/${{ env.RELEASE_VERSION }}.zip diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 1a097e95..d292a9dc 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -36,23 +36,37 @@ jobs: uses: ./.github/workflows/detect-changes.yml with: solution_file: 'source/ProcessManager.sln' + # Hostnames = famous mountains hostnames: " { - 'astra': 'ProcessManager.csproj', - 'orion': 'ProcessManager.Orchestrations.csproj', + 'everest': 'ProcessManager.csproj', + 'montblanc': 'ProcessManager.Orchestrations.csproj', 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" - # ci_dotnet: - # needs: changes - # if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }} - # uses: ./.github/workflows/ci-dotnet.yml + ci_dotnet_everest: + if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_everest + project_file: source/ProcessManager/ProcessManager.csproj + + ci_dotnet_montblanc: + if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_montblanc + project_file: source/ProcessManager/ProcessManager.csproj - # ci_processmanager_nuget: - # needs: changes - # if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} - # uses: ./.github/workflows/processmanager-client-bundle-publish.yml - # secrets: inherit + ci_dotnet_dbmigrations: + if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_dbmigrations + project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj # # Branch policy status check @@ -62,8 +76,10 @@ jobs: runs-on: ubuntu-latest needs: [ - ci_base - # TODO: Add more jobs here + ci_base, + ci_dotnet_everest, + ci_dotnet_montblanc, + ci_dotnet_dbmigrations ] if: | always() From ad8062edd94550df60726fa2a0eba747bad4c32c Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:23:24 +0100 Subject: [PATCH 021/136] Fix output variable name --- .github/actions/dotnet-affected/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 16b0eca4..03a4ee87 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -64,7 +64,7 @@ runs: "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson - "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT + "job_context=$job_context_output" >> $env:GITHUB_OUTPUT } else { # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details if ($LASTEXITCODE -eq 166) { From 4e647370addb8bf5ee1ab054d3ccf75d641642b1 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:28:57 +0100 Subject: [PATCH 022/136] Reduce variance --- .github/workflows/ci-orchestrator.yml | 49 ++++++++++++++------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index d292a9dc..1e5c3bab 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -44,29 +44,29 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" - ci_dotnet_everest: - if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} - needs: changes - uses: ./.github/workflows/ci-dotnet.yml - with: - release_name: process_manager_everest - project_file: source/ProcessManager/ProcessManager.csproj + # ci_dotnet_everest: + # if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} + # needs: changes + # uses: ./.github/workflows/ci-dotnet.yml + # with: + # release_name: process_manager_everest + # project_file: source/ProcessManager/ProcessManager.csproj - ci_dotnet_montblanc: - if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} - needs: changes - uses: ./.github/workflows/ci-dotnet.yml - with: - release_name: process_manager_montblanc - project_file: source/ProcessManager/ProcessManager.csproj + # ci_dotnet_montblanc: + # if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} + # needs: changes + # uses: ./.github/workflows/ci-dotnet.yml + # with: + # release_name: process_manager_montblanc + # project_file: source/ProcessManager/ProcessManager.csproj - ci_dotnet_dbmigrations: - if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} - needs: changes - uses: ./.github/workflows/ci-dotnet.yml - with: - release_name: process_manager_dbmigrations - project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj + # ci_dotnet_dbmigrations: + # if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} + # needs: changes + # uses: ./.github/workflows/ci-dotnet.yml + # with: + # release_name: process_manager_dbmigrations + # project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj # # Branch policy status check @@ -77,9 +77,10 @@ jobs: needs: [ ci_base, - ci_dotnet_everest, - ci_dotnet_montblanc, - ci_dotnet_dbmigrations + changes, + # ci_dotnet_everest, + # ci_dotnet_montblanc, + # ci_dotnet_dbmigrations ] if: | always() From 94947a3044a4152e3569e9db13d658114e27c64d Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:31:34 +0100 Subject: [PATCH 023/136] jhg --- .github/actions/dotnet-affected/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 03a4ee87..3e692d87 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -35,7 +35,7 @@ outputs: affected_changes: description: "The affected projects, if any" value: ${{ steps.filter.outputs.affected_changes }} - job_context: + job_context_output: description: "The job context output, if any" value: ${{ steps.filter.outputs.job_context_output }} @@ -64,7 +64,7 @@ runs: "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson - "job_context=$job_context_output" >> $env:GITHUB_OUTPUT + "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT } else { # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details if ($LASTEXITCODE -eq 166) { From a02e02ffbc0ec7b8e3d557db444bbcf55b854ce5 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:32:40 +0100 Subject: [PATCH 024/136] build everest --- .github/workflows/ci-orchestrator.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 1e5c3bab..b09cbe72 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -44,13 +44,13 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" - # ci_dotnet_everest: - # if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} - # needs: changes - # uses: ./.github/workflows/ci-dotnet.yml - # with: - # release_name: process_manager_everest - # project_file: source/ProcessManager/ProcessManager.csproj + ci_dotnet_everest: + if: ${{ fromJson(needs.changes.outputs.job_context_output).everest == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_everest + project_file: source/ProcessManager/ProcessManager.csproj # ci_dotnet_montblanc: # if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} From c3d24ddb351ff495a963bbe9a19fa4e4e3a520e8 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:35:15 +0100 Subject: [PATCH 025/136] Print debug --- .github/workflows/ci-orchestrator.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index b09cbe72..946baa4f 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -44,6 +44,15 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" + print_context: + runs-on: ubuntu-latest + needs: changes + steps: + - name: Print context + run: | + echo "--> ${{ needs.changes.outputs.job_context_output }}" + echo "--> ${{ needs.changes.outputs.affected_changes }}" + ci_dotnet_everest: if: ${{ fromJson(needs.changes.outputs.job_context_output).everest == 'true' }} needs: changes From a2dfe2aa28e9bad46f4d0bef22d96e131f623bfa Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:39:05 +0100 Subject: [PATCH 026/136] Print debug log --- .github/actions/dotnet-affected/action.yml | 13 +++++++++++++ .github/workflows/ci-orchestrator.yml | 12 ++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 3e692d87..6aa82d17 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -31,6 +31,10 @@ inputs: host_names: description: "Host names mapped to project names" required: true + print_debug_output: + description: "Enable debug logging" + required: false + default: "false" outputs: affected_changes: description: "The affected projects, if any" @@ -71,3 +75,12 @@ runs: exit 0 } } + + - name: Debug output + shell: bash + if: ${{ inputs.print_debug_output == 'true' }} + run: | + echo "Debug output:" + echo "Affected projects: ${{ steps.filter.outputs.affected_changes }}" + echo '' + echo "Job context: ${{ steps.filter.outputs.job_context_output }}" diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 946baa4f..bcbfb13c 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -35,6 +35,7 @@ jobs: changes: uses: ./.github/workflows/detect-changes.yml with: + print_debug_output: 'true' # TODO: Remove before merge solution_file: 'source/ProcessManager.sln' # Hostnames = famous mountains hostnames: " @@ -44,17 +45,8 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" - print_context: - runs-on: ubuntu-latest - needs: changes - steps: - - name: Print context - run: | - echo "--> ${{ needs.changes.outputs.job_context_output }}" - echo "--> ${{ needs.changes.outputs.affected_changes }}" - ci_dotnet_everest: - if: ${{ fromJson(needs.changes.outputs.job_context_output).everest == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml with: From feae94eafa487ee4f94fe7b62e6cf2afd261680a Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:41:30 +0100 Subject: [PATCH 027/136] now we're getting there --- .github/actions/dotnet-affected/action.yml | 8 ++++---- .github/workflows/detect-changes.yml | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 6aa82d17..a0fe75a3 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -39,9 +39,9 @@ outputs: affected_changes: description: "The affected projects, if any" value: ${{ steps.filter.outputs.affected_changes }} - job_context_output: + job_context: description: "The job context output, if any" - value: ${{ steps.filter.outputs.job_context_output }} + value: ${{ steps.filter.outputs.job_context }} runs: using: composite @@ -68,7 +68,7 @@ runs: "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson - "job_context_output=$job_context_output" >> $env:GITHUB_OUTPUT + "job_context=$job_context_output" >> $env:GITHUB_OUTPUT } else { # See https://github.com/leonardochaia/dotnet-affected?tab=readme-ov-file#dont-buildtestdeploy-when-no-projects-have-changed for details if ($LASTEXITCODE -eq 166) { @@ -83,4 +83,4 @@ runs: echo "Debug output:" echo "Affected projects: ${{ steps.filter.outputs.affected_changes }}" echo '' - echo "Job context: ${{ steps.filter.outputs.job_context_output }}" + echo "Job context: ${{ steps.filter.outputs.job_context }}" diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index c63d4378..91130eda 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -29,11 +29,14 @@ on: hostnames: required: true type: string + print_debug_output: + required: false + type: string outputs: affected_changes: value: ${{ jobs.changes.outputs.affected_changes }} job_context: - value: ${{ jobs.changes.outputs.job_context_output }} + value: ${{ jobs.changes.outputs.job_context }} jobs: changes: @@ -41,7 +44,7 @@ jobs: runs-on: ubuntu-latest outputs: affected_changes: ${{ steps.filter.outputs.affected_changes }} - job_context_output: ${{ steps.filter.outputs.job_context_output }} + job_context: ${{ steps.filter.outputs.job_context }} steps: - uses: actions/checkout@v4 with: @@ -59,7 +62,7 @@ jobs: from_sha: ${{ steps.set_shas.outputs.base }} to_sha: ${{ steps.set_shas.outputs.head }} host_names: ${{ inputs.hostnames }} - + print_debug_output: ${{ inputs.print_debug_output }} \ No newline at end of file From e106bcc7400437a91657311d867e190ac4236150 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:43:07 +0100 Subject: [PATCH 028/136] Fix plings --- .github/actions/dotnet-affected/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index a0fe75a3..d3100d2e 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -76,11 +76,11 @@ runs: } } - - name: Debug output + - name: Print debug output shell: bash if: ${{ inputs.print_debug_output == 'true' }} run: | echo "Debug output:" - echo "Affected projects: ${{ steps.filter.outputs.affected_changes }}" + echo Affected projects: '${{ steps.filter.outputs.affected_changes }}' echo '' - echo "Job context: ${{ steps.filter.outputs.job_context }}" + echo Job context: '${{ steps.filter.outputs.job_context }}' From b34082508fe5198f907e34a8ec398eefa10b2bb9 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:43:39 +0100 Subject: [PATCH 029/136] Fix title --- .github/workflows/ci-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 08e956d2..c8b3ea3a 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -28,7 +28,7 @@ on: jobs: build_artifact: - name: Build artifact ${{ inputs.release_name }} + name: Build ${{ inputs.release_name }} runs-on: ubuntu-latest env: RELEASE_FOLDER_PATH: ${{ github.workspace }}/output From fae315bafc05a56d8e071d3f8fba9aba8bf2f902 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:44:42 +0100 Subject: [PATCH 030/136] Remote write-host --- .github/actions/dotnet-affected/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index d3100d2e..4a1a6fb2 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -64,7 +64,6 @@ runs: if (Test-Path $AffectedProjectsFile) { $affectedJson = Get-Content $AffectedProjectsFile - $affectedJson | Write-Host "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson From c0f35998f74c7781536dbf838dbd8860eddb7a9f Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:45:17 +0100 Subject: [PATCH 031/136] Comment in montblanc and dbmigrations --- .github/workflows/ci-orchestrator.yml | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index bcbfb13c..4a8a921a 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -53,21 +53,21 @@ jobs: release_name: process_manager_everest project_file: source/ProcessManager/ProcessManager.csproj - # ci_dotnet_montblanc: - # if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} - # needs: changes - # uses: ./.github/workflows/ci-dotnet.yml - # with: - # release_name: process_manager_montblanc - # project_file: source/ProcessManager/ProcessManager.csproj + ci_dotnet_montblanc: + if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_montblanc + project_file: source/ProcessManager/ProcessManager.csproj - # ci_dotnet_dbmigrations: - # if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} - # needs: changes - # uses: ./.github/workflows/ci-dotnet.yml - # with: - # release_name: process_manager_dbmigrations - # project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj + ci_dotnet_dbmigrations: + if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} + needs: changes + uses: ./.github/workflows/ci-dotnet.yml + with: + release_name: process_manager_dbmigrations + project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj # # Branch policy status check @@ -79,9 +79,9 @@ jobs: [ ci_base, changes, - # ci_dotnet_everest, - # ci_dotnet_montblanc, - # ci_dotnet_dbmigrations + ci_dotnet_everest, + ci_dotnet_montblanc, + ci_dotnet_dbmigrations ] if: | always() From 52f05751c65eecb393cd5d7d7f92dbdf57bbb559 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:52:23 +0100 Subject: [PATCH 032/136] Run tests --- .github/workflows/ci-dotnet-runtests.yml | 59 ++++++++++++++++++++++++ .github/workflows/ci-orchestrator.yml | 6 +++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/ci-dotnet-runtests.yml diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml new file mode 100644 index 00000000..a325c32a --- /dev/null +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -0,0 +1,59 @@ +# Copyright 2020 Energinet DataHub A/S +# +# Licensed under the Apache License, Version 2.0 (the "License2"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: CI dotnet tests + +on: + workflow_call: + inputs: + affected_changes: + description: Affected projects + required: true + type: string + +jobs: + build_matrix: + name: Build matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Find testprojects in affected projects + id: set-matrix + shell: pwsh + run: | + $affectedProjects = '${{ inputs.affected_changes }}' | ConvertFrom-Json + $matrix = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress + "matrix=$matrix" >> $env:GITHUB_OUTPUT + + print_matrix: + name: Print matrix + runs-on: ubuntu-latest + needs: build_matrix + steps: + - name: Print + run: | + echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" + + run_tests_in_project: + name: Run test + runs-on: ubuntu-latest + needs: build_matrix + strategy: + matrix: + project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + steps: + - name: Build and run tests + run: | + echo "Build and run tests in ${{ matrix.project }}" diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 4a8a921a..f5255c9f 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -69,6 +69,12 @@ jobs: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj + ci_run_tests: + needs: changes + uses: ./.github/workflows/ci-dotnet-runtests.yml + with: + affected_changes: ${{ needs.changes.outputs.affected_changes }} + # # Branch policy status check # From a6afebe9acfee948a7fd06535eeb2460b8569752 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 11:53:00 +0100 Subject: [PATCH 033/136] Add ci_run_tests to allow_merge --- .github/workflows/ci-orchestrator.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index f5255c9f..9a2b5d6c 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -87,7 +87,8 @@ jobs: changes, ci_dotnet_everest, ci_dotnet_montblanc, - ci_dotnet_dbmigrations + ci_dotnet_dbmigrations, + ci_run_tests ] if: | always() From ad764aec40116478aad4c48c3bbb2f6016cf4eaf Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 13:57:22 +0100 Subject: [PATCH 034/136] New matrix --- .github/workflows/ci-dotnet-runtests.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index a325c32a..fd483382 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -34,8 +34,20 @@ jobs: shell: pwsh run: | $affectedProjects = '${{ inputs.affected_changes }}' | ConvertFrom-Json - $matrix = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress - "matrix=$matrix" >> $env:GITHUB_OUTPUT + # $matrix = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress + + #I couldn't find a better way to lowercase keys in a hashtable + $matrix = @() + foreach ($project in $affectedProjects) { + if ($project.Name -like '*Tests*') { + $matrix += [PSCustomObject]@{ + name = $project.Name + filepath = $project.FilePath + } + } + } + + "matrix=($matrix | ConvertTo-Json)" >> $env:GITHUB_OUTPUT print_matrix: name: Print matrix @@ -47,13 +59,14 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Run test + name: Test ${{needs.build_matrix.outputs.matrix.name}} runs-on: ubuntu-latest needs: build_matrix strategy: matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + name: ${{fromJson(needs.build_matrix.outputs.matrix.name)}} + filepath: ${{fromJson(needs.build_matrix.outputs.matrix.filepath)}} steps: - name: Build and run tests run: | - echo "Build and run tests in ${{ matrix.project }}" + echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.filepath }}" From 54a3d67e1a651e087e58115c99a6cf64c6f25e70 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:01:55 +0100 Subject: [PATCH 035/136] adf --- .github/workflows/ci-dotnet-runtests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index fd483382..99033e7d 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -64,9 +64,8 @@ jobs: needs: build_matrix strategy: matrix: - name: ${{fromJson(needs.build_matrix.outputs.matrix.name)}} - filepath: ${{fromJson(needs.build_matrix.outputs.matrix.filepath)}} + project: ${{fromJson(needs.build_matrix.outputs.matrix)}} steps: - name: Build and run tests run: | - echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.filepath }}" + echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.name }}" From 290b953106f15b8922b76390b38296b10568ffde Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:03:33 +0100 Subject: [PATCH 036/136] Convert to json --- .github/workflows/ci-dotnet-runtests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 99033e7d..ca75f9af 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -46,8 +46,8 @@ jobs: } } } - - "matrix=($matrix | ConvertTo-Json)" >> $env:GITHUB_OUTPUT + $matrixJson = $matrix | ConvertTo-Json + "matrix=$matrixJson" >> $env:GITHUB_OUTPUT print_matrix: name: Print matrix From c321692439e7174408da6f7ecb8f26a1eca64584 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:06:05 +0100 Subject: [PATCH 037/136] Print JSON --- .github/workflows/ci-dotnet-runtests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index ca75f9af..3c246e38 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -47,6 +47,8 @@ jobs: } } $matrixJson = $matrix | ConvertTo-Json + + Write-Host "Matrix JSON: $matrixJson" "matrix=$matrixJson" >> $env:GITHUB_OUTPUT print_matrix: From be99a564c39ab7e19de55c68095e52490f9553bd Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:07:04 +0100 Subject: [PATCH 038/136] Compress JSON --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 3c246e38..506a3270 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -46,7 +46,7 @@ jobs: } } } - $matrixJson = $matrix | ConvertTo-Json + $matrixJson = $matrix | ConvertTo-Json -Compress Write-Host "Matrix JSON: $matrixJson" "matrix=$matrixJson" >> $env:GITHUB_OUTPUT From aa9f6a79945da8c9aa18efc1342736332a80b48d Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:09:10 +0100 Subject: [PATCH 039/136] lkn --- .github/workflows/ci-dotnet-runtests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 506a3270..daa23c51 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -61,7 +61,7 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Test ${{needs.build_matrix.outputs.matrix.name}} + name: Test ${{needs.build_matrix.outputs.matrix.project.name}} runs-on: ubuntu-latest needs: build_matrix strategy: @@ -70,4 +70,4 @@ jobs: steps: - name: Build and run tests run: | - echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.name }}" + echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.project.filepath }}" From e10a2fe07334b36576c64d253e1c05c3d02db274 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:11:38 +0100 Subject: [PATCH 040/136] .jb --- .github/workflows/ci-dotnet-runtests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index daa23c51..aebca867 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -61,13 +61,12 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Test ${{needs.build_matrix.outputs.matrix.project.name}} + name: Test ${{needs.build_matrix.outputs.matrix.name}} runs-on: ubuntu-latest needs: build_matrix strategy: - matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.build_matrix.outputs.matrix)}} steps: - name: Build and run tests run: | - echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.project.filepath }}" + echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.filepath }}" From 5794584dccc05170b763629204380f4511ad2937 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:13:39 +0100 Subject: [PATCH 041/136] -klm --- .github/workflows/ci-dotnet-runtests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index aebca867..f3fdde55 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -61,12 +61,14 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Test ${{needs.build_matrix.outputs.matrix.name}} + name: Test ${{needs.build_matrix.outputs.matrix.project.name}} runs-on: ubuntu-latest needs: build_matrix strategy: - matrix: ${{fromJson(needs.build_matrix.outputs.matrix)}} + matrix: + project: ${{fromJson(needs.build_matrix.outputs.matrix)}} steps: - name: Build and run tests run: | - echo "Build and run tests in ${{ needs.build_matrix.outputs.matrix.filepath }}" + echo "Build and run tests in ${{ matrix.project.name }}" + echo "Filepath: ${{ matrix.project.filepath }}" \ No newline at end of file From eec7fdcdc43ccf0efe6495a4b3f42b6c977405bd Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:18:34 +0100 Subject: [PATCH 042/136] =?UTF-8?q?=C3=A6l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f3fdde55..b65ee8fe 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -61,7 +61,7 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Test ${{needs.build_matrix.outputs.matrix.project.name}} + name: Run tests in ${{ matrix.project }} runs-on: ubuntu-latest needs: build_matrix strategy: From 55640e96e2726e8c998e54386db2bea63d8eb067 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:19:39 +0100 Subject: [PATCH 043/136] =?UTF-8?q?=C3=A6lj?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index b65ee8fe..f50c1098 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -61,7 +61,7 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" run_tests_in_project: - name: Run tests in ${{ matrix.project }} + name: Run tests in ${{ matrix.project.name }} runs-on: ubuntu-latest needs: build_matrix strategy: From 06f1c20e5e5af61b69481137eec4dcf6fb904984 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:22:47 +0100 Subject: [PATCH 044/136] Print debug output --- .github/workflows/ci-dotnet-runtests.yml | 5 +++++ .github/workflows/ci-orchestrator.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f50c1098..6eb646ba 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -21,6 +21,10 @@ on: description: Affected projects required: true type: string + print_debug_output: + description: Enable debug logging + required: false + type: string jobs: build_matrix: @@ -52,6 +56,7 @@ jobs: "matrix=$matrixJson" >> $env:GITHUB_OUTPUT print_matrix: + if: ${{ inputs.print_debug_output == 'true' }} name: Print matrix runs-on: ubuntu-latest needs: build_matrix diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 9a2b5d6c..74afc5d7 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -73,6 +73,7 @@ jobs: needs: changes uses: ./.github/workflows/ci-dotnet-runtests.yml with: + print_debug_output: 'true' # TODO: Remove before merge affected_changes: ${{ needs.changes.outputs.affected_changes }} # From 65595aa59a7739e25754a6bf48db7ec848a53811 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:27:29 +0100 Subject: [PATCH 045/136] Build and merge artifact --- .github/workflows/ci-dotnet-runtests.yml | 46 +++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 6eb646ba..d99ca03c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -65,15 +65,53 @@ jobs: run: | echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" - run_tests_in_project: + build_tests_in_project: name: Run tests in ${{ matrix.project.name }} runs-on: ubuntu-latest needs: build_matrix strategy: + fail-fast: false matrix: project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + env: + RELEASE_VERSION: dotnet_${{ github.event.pull_request.number }} + outputpath: ${{ github.workspace }}/source/Tests/bin/Release/net8.0 steps: - - name: Build and run tests + # - name: Build and run tests + # run: | + # echo "Build and run tests in ${{ matrix.project.name }}" + # echo "Filepath: ${{ matrix.project.filepath }}" + + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ env.RELEASE_VERSION }}-${{ matrix.project.name}} # Cache per PR + + - name: Build ${{ matrix.project.name }} run: | - echo "Build and run tests in ${{ matrix.project.name }}" - echo "Filepath: ${{ matrix.project.filepath }}" \ No newline at end of file + dotnet publish \ + '${{ matrix.project.filepath }}' \ + --configuration Release \ + --output '${{ env.outputpath }}' + + ls source/Tests/bin/Release/net8.0 + + - uses: actions/upload-artifact@v4 + with: + name: pm-tests-${{ matrix.project.name }} + path: ${{ env.outputpath }}/* + + merge: + runs-on: ubuntu-latest + needs: build_tests_in_project + name: Merge test artifacts + steps: + - name: Merge artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: pm-tests-outputs + delete-merged: true + retention-days: 7 \ No newline at end of file From dc8c24554e48fe5520bfb194d71b6cf6eb0914eb Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:28:47 +0100 Subject: [PATCH 046/136] Change name --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index d99ca03c..60748d41 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -66,7 +66,7 @@ jobs: echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" build_tests_in_project: - name: Run tests in ${{ matrix.project.name }} + name: Build ${{ matrix.project.name }} runs-on: ubuntu-latest needs: build_matrix strategy: From c5a26c00ec520cc34392f3ab788ea6799cb9e412 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:36:34 +0100 Subject: [PATCH 047/136] Fix build error --- .github/workflows/ci-dotnet-runtests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 60748d41..3becb83f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -96,6 +96,7 @@ jobs: '${{ matrix.project.filepath }}' \ --configuration Release \ --output '${{ env.outputpath }}' + -p:ErrorOnDuplicatePublishOutputFiles=false ls source/Tests/bin/Release/net8.0 From 4da7f66b1dcfe68e199e8db5d88dc7add4c959a4 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:37:04 +0100 Subject: [PATCH 048/136] Add comment --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 3becb83f..238cbc79 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -96,7 +96,7 @@ jobs: '${{ matrix.project.filepath }}' \ --configuration Release \ --output '${{ env.outputpath }}' - -p:ErrorOnDuplicatePublishOutputFiles=false + -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" ls source/Tests/bin/Release/net8.0 From 772509e3b5843c53a7760bf9cc3c38c25cd6e267 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:42:40 +0100 Subject: [PATCH 049/136] Doh ! --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 238cbc79..c01c33d7 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -95,7 +95,7 @@ jobs: dotnet publish \ '${{ matrix.project.filepath }}' \ --configuration Release \ - --output '${{ env.outputpath }}' + --output '${{ env.outputpath }}' \ -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" ls source/Tests/bin/Release/net8.0 From 4bbbac6f7ec7c5336471102ef36c2f72c5403c87 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 14:44:03 +0100 Subject: [PATCH 050/136] Remove commented-out code --- .github/workflows/ci-dotnet-runtests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index c01c33d7..082b6908 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -77,11 +77,6 @@ jobs: RELEASE_VERSION: dotnet_${{ github.event.pull_request.number }} outputpath: ${{ github.workspace }}/source/Tests/bin/Release/net8.0 steps: - # - name: Build and run tests - # run: | - # echo "Build and run tests in ${{ matrix.project.name }}" - # echo "Filepath: ${{ matrix.project.filepath }}" - - name: Checkout repository uses: actions/checkout@v4 From 39b3369c4e4c40b6a9d9ca7bfbeb5204ea522c25 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 15:01:58 +0100 Subject: [PATCH 051/136] try this --- .github/workflows/ci-orchestrator.yml | 6 ++++++ .github/workflows/detect-changes.yml | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 74afc5d7..7e9059ff 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -45,6 +45,12 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" + ci_processmanager_nuget: + needs: changes + if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} + uses: ./.github/workflows/processmanager-client-bundle-publish.yml + secrets: inherit + ci_dotnet_everest: if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} needs: changes diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 91130eda..59fff615 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -33,6 +33,8 @@ on: required: false type: string outputs: + nuget_packages: + value: ${{ jobs.changes.outputs.nuget_packages }} affected_changes: value: ${{ jobs.changes.outputs.affected_changes }} job_context: @@ -43,6 +45,7 @@ jobs: name: Detect changes runs-on: ubuntu-latest outputs: + nuget_packages: ${{ steps.filter_nuget.outputs.nuget_packages }} affected_changes: ${{ steps.filter.outputs.affected_changes }} job_context: ${{ steps.filter.outputs.job_context }} steps: @@ -64,5 +67,18 @@ jobs: host_names: ${{ inputs.hostnames }} print_debug_output: ${{ inputs.print_debug_output }} + - name: Detect Nuget changes + uses: dorny/paths-filter@v3 + id: filter_nuget + with: + filters: | + nuget_packages: + - 'docs/ProcessManager.Client/**' + - 'docs/ProcessManager.Orchestrations.Abstractions/**' + - 'source/ProcessManager.Client*/**' + - 'source/ProcessManager.Abstractions*/**' + - 'source/ProcessManager.Orchestrations.Abstractions*/**' + - '.github/workflows/processmanager-client-bundle-publish.yml' + \ No newline at end of file From 1809496b9da087624afeb77733e3cee7fa5a89ce Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 15:03:23 +0100 Subject: [PATCH 052/136] Kick Nuget build --- source/ProcessManager.Client/IProcessManagerClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.Client/IProcessManagerClient.cs b/source/ProcessManager.Client/IProcessManagerClient.cs index 75ffaf91..0169e072 100644 --- a/source/ProcessManager.Client/IProcessManagerClient.cs +++ b/source/ProcessManager.Client/IProcessManagerClient.cs @@ -10,7 +10,7 @@ // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and -// limitations under the License. +// limitations under the License using Energinet.DataHub.ProcessManager.Abstractions.Api.Model; using Energinet.DataHub.ProcessManager.Abstractions.Api.Model.OrchestrationInstance; From 14a607338f9e7f6f2cfe6e8857e8ab930e35e70f Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 6 Dec 2024 15:05:05 +0100 Subject: [PATCH 053/136] Dont screw with license lines --- .github/workflows/ci-orchestrator.yml | 2 +- source/ProcessManager.Client/IProcessManagerClient.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 7e9059ff..e74cb49b 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -47,7 +47,7 @@ jobs: ci_processmanager_nuget: needs: changes - if: ${{ needs.changes.outputs.processmanager_nuget == 'true' }} + if: ${{ needs.changes.outputs.nuget_packages == 'true' }} uses: ./.github/workflows/processmanager-client-bundle-publish.yml secrets: inherit diff --git a/source/ProcessManager.Client/IProcessManagerClient.cs b/source/ProcessManager.Client/IProcessManagerClient.cs index 0169e072..1499644d 100644 --- a/source/ProcessManager.Client/IProcessManagerClient.cs +++ b/source/ProcessManager.Client/IProcessManagerClient.cs @@ -10,7 +10,7 @@ // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and -// limitations under the License +// limitations under the License. using Energinet.DataHub.ProcessManager.Abstractions.Api.Model; using Energinet.DataHub.ProcessManager.Abstractions.Api.Model.OrchestrationInstance; @@ -18,7 +18,7 @@ namespace Energinet.DataHub.ProcessManager.Client; /// -/// Client for using the Process Manager / Orchestrations API. +/// Client for using the Process Manager / Orchestrations API /// public interface IProcessManagerClient { From 210e83a5cb42bf1571849fbee3c094ccb845c908 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 09:14:46 +0100 Subject: [PATCH 054/136] Run integration tests --- .github/workflows/ci-dotnet-runtests.yml | 33 ++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 082b6908..3f4c892c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -100,7 +100,7 @@ jobs: name: pm-tests-${{ matrix.project.name }} path: ${{ env.outputpath }}/* - merge: + merge_tets_artifacts: runs-on: ubuntu-latest needs: build_tests_in_project name: Merge test artifacts @@ -110,4 +110,33 @@ jobs: with: name: pm-tests-outputs delete-merged: true - retention-days: 7 \ No newline at end of file + retention-days: 7 + + integration_tests: + needs: [ + build_matrix, + build_tests_in_project, + merge_tets_artifacts + ] + strategy: + fail-fast: false + matrix: + project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + + uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@kerbou/2524-build-brs-pipeline + with: + download_artifact_name: pm-tests-outputs + download_attempt_limit: 20 + azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} + azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} + azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} + azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} + environment: AzureAuth + run_integration_tests: true + # Matrix parameters + job_name: ${{ matrix.project.name }} + tests_dll_file_path: /${{ matrix.project.name }}.dll + tests_filter_expression: empty # Means skip + use_azure_functions_tools: true + aspnetcore_test_contentroot_variable_name: empty + aspnetcore_test_contentroot_variable_value: empty \ No newline at end of file From 68d11eb924c53b3a48a9923f51a48955204d6067 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 09:30:43 +0100 Subject: [PATCH 055/136] Fix assemblyname --- .github/workflows/ci-dotnet-runtests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 3f4c892c..fac3cc20 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -40,13 +40,14 @@ jobs: $affectedProjects = '${{ inputs.affected_changes }}' | ConvertFrom-Json # $matrix = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress - #I couldn't find a better way to lowercase keys in a hashtable + # I couldn't find a better way to lowercase keys in a hashtable $matrix = @() foreach ($project in $affectedProjects) { if ($project.Name -like '*Tests*') { $matrix += [PSCustomObject]@{ - name = $project.Name - filepath = $project.FilePath + name = $project.Name + filepath = $project.FilePath + assembly_name = "Energinet.DataHub.$($project.Name).dll" } } } @@ -135,7 +136,7 @@ jobs: run_integration_tests: true # Matrix parameters job_name: ${{ matrix.project.name }} - tests_dll_file_path: /${{ matrix.project.name }}.dll + tests_dll_file_path: /${{ matrix.project.assembly_name }} tests_filter_expression: empty # Means skip use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty From 17bc086af3a6fd03062b802ab1614cfacac85041 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 09:30:51 +0100 Subject: [PATCH 056/136] Bump Nuget version to 0.14.1 --- docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md | 4 ++++ .../ProcessManager.Abstractions.csproj | 2 +- source/ProcessManager.Client/ProcessManager.Client.csproj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md b/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md index cc4739fc..1b6157a3 100644 --- a/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md +++ b/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md @@ -1,5 +1,9 @@ # ProcessManager.Client Release Notes +## Version 0.14.1 + +- No functional change. + ## Version 0.14.0 - Support start/schedule orchestration instance with no input parameter. diff --git a/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj b/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj index 88689707..216ba19c 100644 --- a/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj +++ b/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Abstractions - 0.14.0$(VersionSuffix) + 0.14.1$(VersionSuffix) DH3 Process Manager Abstractions library Energinet-DataHub Energinet-DataHub diff --git a/source/ProcessManager.Client/ProcessManager.Client.csproj b/source/ProcessManager.Client/ProcessManager.Client.csproj index 0a70b645..ff01460c 100644 --- a/source/ProcessManager.Client/ProcessManager.Client.csproj +++ b/source/ProcessManager.Client/ProcessManager.Client.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Client - 0.14.0$(VersionSuffix) + 0.14.1$(VersionSuffix) DH3 Process Manager Client library Energinet-DataHub Energinet-DataHub From 8786de5501bdf3e9e970333c1b886c874244d8f1 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 09:52:07 +0100 Subject: [PATCH 057/136] Run tests --- .github/workflows/ci-dotnet-runtests.yml | 47 ++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index fac3cc20..5b18436f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -45,9 +45,10 @@ jobs: foreach ($project in $affectedProjects) { if ($project.Name -like '*Tests*') { $matrix += [PSCustomObject]@{ - name = $project.Name - filepath = $project.FilePath - assembly_name = "Energinet.DataHub.$($project.Name).dll" + name = $project.Name + filepath = $project.FilePath + assembly_name = "Energinet.DataHub.$($project.Name).dll" + dotnet_version = "net8.0" } } } @@ -75,8 +76,8 @@ jobs: matrix: project: ${{fromJson(needs.build_matrix.outputs.matrix)}} env: - RELEASE_VERSION: dotnet_${{ github.event.pull_request.number }} - outputpath: ${{ github.workspace }}/source/Tests/bin/Release/net8.0 + #RELEASE_VERSION: dotnet_${{ github.event.pull_request.number }} + OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -91,33 +92,33 @@ jobs: dotnet publish \ '${{ matrix.project.filepath }}' \ --configuration Release \ - --output '${{ env.outputpath }}' \ + --output '${{ env.OUTPUT_PATH }}' \ -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" - ls source/Tests/bin/Release/net8.0 + ls ${{ env.OUTPUT_PATH}} - uses: actions/upload-artifact@v4 with: - name: pm-tests-${{ matrix.project.name }} - path: ${{ env.outputpath }}/* + retention-days: 2 + name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + path: ${{ env.OUTPUT_PATH }}/* - merge_tets_artifacts: - runs-on: ubuntu-latest - needs: build_tests_in_project - name: Merge test artifacts - steps: - - name: Merge artifacts - uses: actions/upload-artifact/merge@v4 - with: - name: pm-tests-outputs - delete-merged: true - retention-days: 7 + # merge_test_artifacts: + # runs-on: ubuntu-latest + # needs: build_tests_in_project + # name: Merge test artifacts + # steps: + # - name: Merge artifacts + # uses: actions/upload-artifact/merge@v4 + # with: + # name: pm-tests-outputs + # delete-merged: true + # retention-days: 7 integration_tests: needs: [ build_matrix, - build_tests_in_project, - merge_tets_artifacts + build_tests_in_project ] strategy: fail-fast: false @@ -126,7 +127,7 @@ jobs: uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@kerbou/2524-build-brs-pipeline with: - download_artifact_name: pm-tests-outputs + download_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} download_attempt_limit: 20 azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} From 491648af3aabd3ec9ec12b3975574c12e15d72d4 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 10:17:56 +0100 Subject: [PATCH 058/136] Add project_name --- .github/workflows/ci-dotnet-runtests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 5b18436f..7110dba8 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -128,6 +128,7 @@ jobs: uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@kerbou/2524-build-brs-pipeline with: download_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + project_name: ${{ matrix.project.name }} download_attempt_limit: 20 azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} From bc40a8b24328a95e980cb42313a54cc179dc4e95 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 10:20:26 +0100 Subject: [PATCH 059/136] Remove debug print --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 7110dba8..b4c77435 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -95,7 +95,7 @@ jobs: --output '${{ env.OUTPUT_PATH }}' \ -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" - ls ${{ env.OUTPUT_PATH}} + # ls ${{ env.OUTPUT_PATH}} - uses: actions/upload-artifact@v4 with: From 13b61f9a7d463c52903e082343786061d39972d1 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:05:08 +0100 Subject: [PATCH 060/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index b4c77435..5be8dbd3 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -102,7 +102,7 @@ jobs: retention-days: 2 name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - + # merge_test_artifacts: # runs-on: ubuntu-latest # needs: build_tests_in_project From 1fa7fa3a657ee83fef185fab85412aa3d3e70821 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:20:10 +0100 Subject: [PATCH 061/136] Skip steps --- .github/workflows/ci-dotnet-runtests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 5be8dbd3..e413a368 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -102,7 +102,7 @@ jobs: retention-days: 2 name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - + # merge_test_artifacts: # runs-on: ubuntu-latest # needs: build_tests_in_project @@ -135,11 +135,11 @@ jobs: azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth - run_integration_tests: true - # Matrix parameters - job_name: ${{ matrix.project.name }} - tests_dll_file_path: /${{ matrix.project.assembly_name }} + run_integration_tests: false # TODO Flip to true to run tests tests_filter_expression: empty # Means skip - use_azure_functions_tools: true + use_azure_functions_tools: false # TODO Flip to true to run tests aspnetcore_test_contentroot_variable_name: empty - aspnetcore_test_contentroot_variable_value: empty \ No newline at end of file + aspnetcore_test_contentroot_variable_value: empty + # Matrix parameters + job_name: ${{ matrix.project.name }} + tests_dll_file_path: /${{ matrix.project.assembly_name }} \ No newline at end of file From a90438b5a1b3b024c8d167b03c52dc8ffd16809e Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:23:03 +0100 Subject: [PATCH 062/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index e413a368..29f3dd61 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -137,7 +137,7 @@ jobs: environment: AzureAuth run_integration_tests: false # TODO Flip to true to run tests tests_filter_expression: empty # Means skip - use_azure_functions_tools: false # TODO Flip to true to run tests + use_azure_functions_tools: false # TODO Flip to true to run tests. aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty # Matrix parameters From ba0e5d4f10bebf8c14bfe820fcb90585af28ac64 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:27:18 +0100 Subject: [PATCH 063/136] Enable integration tests again --- .github/workflows/ci-dotnet-runtests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 29f3dd61..5bff0db4 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -135,9 +135,9 @@ jobs: azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth - run_integration_tests: false # TODO Flip to true to run tests + run_integration_tests: true tests_filter_expression: empty # Means skip - use_azure_functions_tools: false # TODO Flip to true to run tests. + use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty # Matrix parameters From 439545b97176a7b6d914303d8c5998ce7733e836 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:31:00 +0100 Subject: [PATCH 064/136] Set relative path correct --- .github/workflows/ci-dotnet-runtests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 5bff0db4..3aca3c6f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -76,7 +76,6 @@ jobs: matrix: project: ${{fromJson(needs.build_matrix.outputs.matrix)}} env: - #RELEASE_VERSION: dotnet_${{ github.event.pull_request.number }} OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} steps: - name: Checkout repository @@ -124,7 +123,6 @@ jobs: fail-fast: false matrix: project: ${{fromJson(needs.build_matrix.outputs.matrix)}} - uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@kerbou/2524-build-brs-pipeline with: download_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} @@ -142,4 +140,4 @@ jobs: aspnetcore_test_contentroot_variable_value: empty # Matrix parameters job_name: ${{ matrix.project.name }} - tests_dll_file_path: /${{ matrix.project.assembly_name }} \ No newline at end of file + tests_dll_file_path: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}}/${{ matrix.project.assembly_name }} \ No newline at end of file From 88be4d1a3ac1ea0ddee47850a28c0a0a6d64129b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:42:26 +0100 Subject: [PATCH 065/136] Bump version --- .../ReleaseNotes/ReleaseNotes.md | 4 ++++ .../ProcessManager.Orchestrations.Abstractions.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md b/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md index ff0f1f0b..086f42e8 100644 --- a/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md +++ b/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md @@ -1,5 +1,9 @@ # ProcessManager.Orchestrations.Abstractions Release Notes +## Version 0.1.1 + +- No functional change + ## Version 0.1.0 - Support start/schedule orchestration instance with no input parameter. diff --git a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj index e2613138..52023de4 100644 --- a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj +++ b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Orchestrations.Abstractions - 0.1.0$(VersionSuffix) + 0.1.1$(VersionSuffix) DH3 Process Manager Orchestrations Abstractions library Energinet-DataHub Energinet-DataHub From 0ea1c710814292e510df0b4803fa732870092370 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 12:47:56 +0100 Subject: [PATCH 066/136] Create database artifact --- source/ProcessManager.DatabaseMigration/DbUpgrader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.DatabaseMigration/DbUpgrader.cs b/source/ProcessManager.DatabaseMigration/DbUpgrader.cs index f9b5e320..d088bd83 100644 --- a/source/ProcessManager.DatabaseMigration/DbUpgrader.cs +++ b/source/ProcessManager.DatabaseMigration/DbUpgrader.cs @@ -27,7 +27,7 @@ public static DatabaseUpgradeResult DatabaseUpgrade(string connectionString) EnsureDatabase.For.SqlDatabase(connectionString); // We create the schema in code to ensure we can create the 'SchemaVersions' - // table within the schema. + // table within the schema var schemaName = "pm"; CreateSchema(connectionString, schemaName); From 2f5d5dd87237bd445e03f8ca336ee83e42cf9768 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:00:27 +0100 Subject: [PATCH 067/136] Add nuget to allow_merge --- .github/workflows/ci-orchestrator.yml | 1 + .../processmanager-client-bundle-publish.yml | 19 ------------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index e74cb49b..07fee674 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -95,6 +95,7 @@ jobs: ci_dotnet_everest, ci_dotnet_montblanc, ci_dotnet_dbmigrations, + ci_processmanager_nuget, ci_run_tests ] if: | diff --git a/.github/workflows/processmanager-client-bundle-publish.yml b/.github/workflows/processmanager-client-bundle-publish.yml index 8a5cd29b..850b9f85 100644 --- a/.github/workflows/processmanager-client-bundle-publish.yml +++ b/.github/workflows/processmanager-client-bundle-publish.yml @@ -156,22 +156,3 @@ jobs: content_changed: ${{ steps.changed-content-orchestrations.outputs.any_changed }} nuget_token: ${{ secrets.nuget_token }} nupkg_recurse_path: source/ProcessManager.Orchestrations.Abstractions - - # - # Branch policy status check - # - - allow_merge: - runs-on: ubuntu-latest - needs: [build_and_publish] - if: | - always() - steps: - - name: Verify if merge is allowed - run: | - echo "${{ toJSON(needs) }}" - - if [[ ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} = true ]]; then - echo "Failed" - exit 1 - fi From 984cdcc86e082603991df8ed4bc90f30e01f89b8 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:04:08 +0100 Subject: [PATCH 068/136] Fix cache key --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 3aca3c6f..f8feac01 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -84,7 +84,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ env.RELEASE_VERSION }}-${{ matrix.project.name}} # Cache per PR + key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR - name: Build ${{ matrix.project.name }} run: | From 93de3b35d904af3cca78c46578f02690b17b6323 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:09:34 +0100 Subject: [PATCH 069/136] Attempt to fix path --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f8feac01..c916386b 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -140,4 +140,4 @@ jobs: aspnetcore_test_contentroot_variable_value: empty # Matrix parameters job_name: ${{ matrix.project.name }} - tests_dll_file_path: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}}/${{ matrix.project.assembly_name }} \ No newline at end of file + tests_dll_file_path: /source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}}/${{ matrix.project.assembly_name }} \ No newline at end of file From 45f7b155076eabc3a4ba6569dbae89b8e2f2ff89 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:18:54 +0100 Subject: [PATCH 070/136] Use backslash... --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index c916386b..c82f5a5f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -140,4 +140,4 @@ jobs: aspnetcore_test_contentroot_variable_value: empty # Matrix parameters job_name: ${{ matrix.project.name }} - tests_dll_file_path: /source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}}/${{ matrix.project.assembly_name }} \ No newline at end of file + tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 39fbaf97d2d0577a5cc84b462fa4598014b41f35 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:19:11 +0100 Subject: [PATCH 071/136] Delete dead code --- .github/workflows/ci-dotnet-runtests.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index c82f5a5f..27702932 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -102,18 +102,6 @@ jobs: name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - # merge_test_artifacts: - # runs-on: ubuntu-latest - # needs: build_tests_in_project - # name: Merge test artifacts - # steps: - # - name: Merge artifacts - # uses: actions/upload-artifact/merge@v4 - # with: - # name: pm-tests-outputs - # delete-merged: true - # retention-days: 7 - integration_tests: needs: [ build_matrix, From f201c49218310227b2574cd6ee0bf3ee244c812e Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:47:24 +0100 Subject: [PATCH 072/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 27702932..7a145ba7 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -126,6 +126,6 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty - # Matrix parameters + # Matrix parameters. job_name: ${{ matrix.project.name }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 8f28bc3dba4445453436c740945d809316195e12 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 13:55:08 +0100 Subject: [PATCH 073/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 7a145ba7..27702932 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -126,6 +126,6 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty - # Matrix parameters. + # Matrix parameters job_name: ${{ matrix.project.name }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From ce74566b5ae28e4603c6e8a69bf201a758b53719 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 14:29:48 +0100 Subject: [PATCH 074/136] Fix relative path --- .../Fixtures/OrchestrationsAppManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs b/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs index bebf1d05..3345dec8 100644 --- a/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs +++ b/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs @@ -237,7 +237,7 @@ private FunctionAppHostSettings CreateAppHostSettings( var appHostSettings = new FunctionAppHostConfigurationBuilder() .CreateFunctionAppHostSettings(); - appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}\\bin\\{buildConfiguration}\\net8.0"; + appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}.Tests\\bin\\{buildConfiguration}\\net8.0"; appHostSettings.Port = _appPort; // It seems the host + worker is not ready if we use the default startup log message, so we override it here From 3bb6724e196696f9f269328010ea7507c3417817 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 14:35:12 +0100 Subject: [PATCH 075/136] Add dot --- source/ProcessManager.Client/IProcessManagerClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.Client/IProcessManagerClient.cs b/source/ProcessManager.Client/IProcessManagerClient.cs index 1499644d..75ffaf91 100644 --- a/source/ProcessManager.Client/IProcessManagerClient.cs +++ b/source/ProcessManager.Client/IProcessManagerClient.cs @@ -18,7 +18,7 @@ namespace Energinet.DataHub.ProcessManager.Client; /// -/// Client for using the Process Manager / Orchestrations API +/// Client for using the Process Manager / Orchestrations API. /// public interface IProcessManagerClient { From be68ab15f70a5ad3682f27a2e879e88519369087 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 14:37:16 +0100 Subject: [PATCH 076/136] Add Tests --- .../ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs b/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs index ad766b3e..381137ed 100644 --- a/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs +++ b/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs @@ -173,7 +173,7 @@ private FunctionAppHostSettings CreateAppHostSettings(string csprojName) var appHostSettings = new FunctionAppHostConfigurationBuilder() .CreateFunctionAppHostSettings(); - appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}\\bin\\{buildConfiguration}\\net8.0"; + appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}.Tests\\bin\\{buildConfiguration}\\net8.0"; appHostSettings.Port = _appPort; // It seems the host + worker is not ready if we use the default startup log message, so we override it here From c62006f2937e8da51c0b9f001e3fd206e8aa3294 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 14:37:49 +0100 Subject: [PATCH 077/136] Add dot --- source/ProcessManager/Scheduler/SchedulerHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager/Scheduler/SchedulerHandler.cs b/source/ProcessManager/Scheduler/SchedulerHandler.cs index 778ac888..c5daaab2 100644 --- a/source/ProcessManager/Scheduler/SchedulerHandler.cs +++ b/source/ProcessManager/Scheduler/SchedulerHandler.cs @@ -46,7 +46,7 @@ await _command } catch (Exception ex) { - // Log error if orchestration instance did not start successfully + // Log error if orchestration instance did not start successfully. // Does not throw exception since we want to continue processing the next scheduled orchestration instance. _logger.LogError( ex, From 59d96edc660485882774d1ccd77ee89c4556eaca Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Mon, 9 Dec 2024 14:46:04 +0100 Subject: [PATCH 078/136] Revert paths --- .../Fixtures/OrchestrationsAppManager.cs | 2 +- .../ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs b/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs index 3345dec8..bebf1d05 100644 --- a/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs +++ b/source/ProcessManager.Orchestrations.Tests/Fixtures/OrchestrationsAppManager.cs @@ -237,7 +237,7 @@ private FunctionAppHostSettings CreateAppHostSettings( var appHostSettings = new FunctionAppHostConfigurationBuilder() .CreateFunctionAppHostSettings(); - appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}.Tests\\bin\\{buildConfiguration}\\net8.0"; + appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}\\bin\\{buildConfiguration}\\net8.0"; appHostSettings.Port = _appPort; // It seems the host + worker is not ready if we use the default startup log message, so we override it here diff --git a/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs b/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs index 381137ed..ad766b3e 100644 --- a/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs +++ b/source/ProcessManager.Tests/Fixtures/ProcessManagerAppManager.cs @@ -173,7 +173,7 @@ private FunctionAppHostSettings CreateAppHostSettings(string csprojName) var appHostSettings = new FunctionAppHostConfigurationBuilder() .CreateFunctionAppHostSettings(); - appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}.Tests\\bin\\{buildConfiguration}\\net8.0"; + appHostSettings.FunctionApplicationPath = $"..\\..\\..\\..\\{csprojName}\\bin\\{buildConfiguration}\\net8.0"; appHostSettings.Port = _appPort; // It seems the host + worker is not ready if we use the default startup log message, so we override it here From 9202fa95f8f94eb76201ebc2f9e9d03d0857e3f6 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:05:52 +0100 Subject: [PATCH 079/136] Pretty print matrix --- .github/workflows/ci-dotnet-runtests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 27702932..3c257696 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -50,11 +50,20 @@ jobs: assembly_name = "Energinet.DataHub.$($project.Name).dll" dotnet_version = "net8.0" } + + // We need to add the function app project to the matrix as well because it may be needed by TestCommon when running integrationtests + $sut = $project.Name -replace ".Tests", "" + $sutFilePath = + $matrix += [PSCustomObject]@{ + name = $sut + filepath = $project.FilePath + assembly_name = "Energinet.DataHub.$($project.Name).dll" + dotnet_version = "net8.0" + } } } $matrixJson = $matrix | ConvertTo-Json -Compress - Write-Host "Matrix JSON: $matrixJson" "matrix=$matrixJson" >> $env:GITHUB_OUTPUT print_matrix: @@ -65,7 +74,7 @@ jobs: steps: - name: Print run: | - echo "Matrix: ${{needs.build_matrix.outputs.matrix}}" + echo "Matrix: ${{needs.build_matrix.outputs.matrix}} | ConvertFrom-Json | ConvertTo-Json" build_tests_in_project: name: Build ${{ matrix.project.name }} From 594d77cbb7fbc8562ff86b5b76f5684941368f9b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:09:11 +0100 Subject: [PATCH 080/136] Build SUT project as well --- .github/workflows/ci-dotnet-runtests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 3c257696..bb9d487c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -53,11 +53,11 @@ jobs: // We need to add the function app project to the matrix as well because it may be needed by TestCommon when running integrationtests $sut = $project.Name -replace ".Tests", "" - $sutFilePath = + $sutFilePath = $project.FilePath -replace ".Tests", "" $matrix += [PSCustomObject]@{ name = $sut - filepath = $project.FilePath - assembly_name = "Energinet.DataHub.$($project.Name).dll" + filepath = $sutFilePath + assembly_name = "Energinet.DataHub.$($sut).dll" dotnet_version = "net8.0" } } From 6c7647d355195a8f5dde217737161b7776bc4ce3 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:12:20 +0100 Subject: [PATCH 081/136] Fix comment --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index bb9d487c..67deecbb 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -51,7 +51,7 @@ jobs: dotnet_version = "net8.0" } - // We need to add the function app project to the matrix as well because it may be needed by TestCommon when running integrationtests + # We need to add the function app project to the matrix as well because it may be needed by TestCommon when running integrationtests $sut = $project.Name -replace ".Tests", "" $sutFilePath = $project.FilePath -replace ".Tests", "" $matrix += [PSCustomObject]@{ From 21c22d99513076e4f33b25b63bc144aeef15326c Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:17:26 +0100 Subject: [PATCH 082/136] Fix subsystemtest project build failure --- .github/workflows/ci-dotnet-runtests.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 67deecbb..99f3f9c6 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -51,15 +51,19 @@ jobs: dotnet_version = "net8.0" } - # We need to add the function app project to the matrix as well because it may be needed by TestCommon when running integrationtests + # We need to add the test project's 'twin' project to the matrix as well because it may be needed by TestCommon when running integrationtests $sut = $project.Name -replace ".Tests", "" $sutFilePath = $project.FilePath -replace ".Tests", "" - $matrix += [PSCustomObject]@{ - name = $sut - filepath = $sutFilePath - assembly_name = "Energinet.DataHub.$($sut).dll" - dotnet_version = "net8.0" - } + + # Some projects such as 'SubsystemTests' do not have a 'twin' project we need to build + if (Test-Path $sutFilePath) { + $matrix += [PSCustomObject]@{ + name = $sut + filepath = $sutFilePath + assembly_name = "Energinet.DataHub.$($sut).dll" + dotnet_version = "net8.0" + } + } } } $matrixJson = $matrix | ConvertTo-Json -Compress From 330cc12d86dad5ccba6b507dfc02bf777e6331f8 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:20:41 +0100 Subject: [PATCH 083/136] Fix pretty print --- .github/workflows/ci-dotnet-runtests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 99f3f9c6..af4ad893 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -77,8 +77,10 @@ jobs: needs: build_matrix steps: - name: Print + shell: pwsh run: | - echo "Matrix: ${{needs.build_matrix.outputs.matrix}} | ConvertFrom-Json | ConvertTo-Json" + Write-Host "Matrix: " + Write-Host "(${{needs.build_matrix.outputs.matrix}} | ConvertFrom-Json | ConvertTo-Json)" build_tests_in_project: name: Build ${{ matrix.project.name }} From 22e2c3437a78b039c5451f89a4b02ee8a2b80440 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:22:09 +0100 Subject: [PATCH 084/136] Add debug info --- .github/workflows/ci-dotnet-runtests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index af4ad893..ae14eeb0 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -63,6 +63,8 @@ jobs: assembly_name = "Energinet.DataHub.$($sut).dll" dotnet_version = "net8.0" } + } else { + Write-Host "No twin project found in path $sutFilePath" } } } From 82637fb4bd43a668dadabe54c287d5abb3d334ec Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:28:03 +0100 Subject: [PATCH 085/136] Elementary... --- .github/workflows/ci-dotnet-runtests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index ae14eeb0..f3df3157 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -33,6 +33,9 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Find testprojects in affected projects id: set-matrix shell: pwsh From c4fc7c34682c3c72427ee635093911e886cc5176 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 10:41:35 +0100 Subject: [PATCH 086/136] Print matrix --- .github/workflows/ci-dotnet-runtests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f3df3157..cf3b5be3 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -84,8 +84,9 @@ jobs: - name: Print shell: pwsh run: | - Write-Host "Matrix: " - Write-Host "(${{needs.build_matrix.outputs.matrix}} | ConvertFrom-Json | ConvertTo-Json)" + Write-Host 'Print matrix' + $matrix = '${{needs.build_matrix.outputs.matrix}}' | ConvertFrom-Json | ConvertTo-Json + Write-Host $matrix build_tests_in_project: name: Build ${{ matrix.project.name }} From 3ad84a6d3e271815ee60cb8e0b40c8307badb569 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 11:30:18 +0100 Subject: [PATCH 087/136] Check that everything builds --- .github/workflows/ci-dotnet-runtests.yml | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index cf3b5be3..0cbc36b8 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -123,30 +123,30 @@ jobs: name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - integration_tests: - needs: [ - build_matrix, - build_tests_in_project - ] - strategy: - fail-fast: false - matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix)}} - uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test.yml@kerbou/2524-build-brs-pipeline - with: - download_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - project_name: ${{ matrix.project.name }} - download_attempt_limit: 20 - azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} - azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} - azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} - azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} - environment: AzureAuth - run_integration_tests: true - tests_filter_expression: empty # Means skip - use_azure_functions_tools: true - aspnetcore_test_contentroot_variable_name: empty - aspnetcore_test_contentroot_variable_value: empty - # Matrix parameters - job_name: ${{ matrix.project.name }} - tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file + # integration_tests: + # needs: [ + # build_matrix, + # build_tests_in_project + # ] + # strategy: + # fail-fast: false + # matrix: + # project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + # uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline + # with: + # azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} + # azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} + # azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} + # azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} + # environment: AzureAuth + # run_integration_tests: true + # tests_filter_expression: empty # Means skip + # use_azure_functions_tools: true + # aspnetcore_test_contentroot_variable_name: empty + # aspnetcore_test_contentroot_variable_value: empty + # # Matrix parameters + # testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + # testproject_sut_artifact_name: pm-tests-${{ matrix.project.sut_name }}-${{ github.event.pull_request.number }} + + # testproject_name: ${{ matrix.project.name }} + # tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 7d8e35c29c3cf13fb59d1afaf136c8e8c1f3deb0 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 11:51:00 +0100 Subject: [PATCH 088/136] Save space --- .github/workflows/ci-dotnet-runtests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 0cbc36b8..46ee0023 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -122,6 +122,7 @@ jobs: retention-days: 2 name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* + compression-level: 9 # integration_tests: # needs: [ From 7e2cc5b685313be237bce0d89f84144207143132 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 11:54:18 +0100 Subject: [PATCH 089/136] More compression = no difference --- .github/workflows/ci-dotnet-runtests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 46ee0023..0cbc36b8 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -122,7 +122,6 @@ jobs: retention-days: 2 name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - compression-level: 9 # integration_tests: # needs: [ From f5abad29b1dcee70ece7e6a35f22bf1cc5b2fac4 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:06:47 +0100 Subject: [PATCH 090/136] Run tests --- .github/workflows/ci-dotnet-runtests.yml | 85 +++++++++++++----------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 0cbc36b8..d4cdc9ab 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -31,7 +31,8 @@ jobs: name: Build matrix runs-on: ubuntu-latest outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + matrix_builds: ${{ steps.set-matrix.outputs.matrix_builds }} + matrix_tests: ${{ steps.set-matrix.outputs.matrix_tests }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -41,26 +42,32 @@ jobs: shell: pwsh run: | $affectedProjects = '${{ inputs.affected_changes }}' | ConvertFrom-Json - # $matrix = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress + # $matrixBuilds = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress # I couldn't find a better way to lowercase keys in a hashtable - $matrix = @() + $matrixBuilds = @() + $matrixTests = @() + foreach ($project in $affectedProjects) { if ($project.Name -like '*Tests*') { - $matrix += [PSCustomObject]@{ + $matrixObj = [PSCustomObject]@{ name = $project.Name + name_sut = $project.Name -replace ".Tests", "" filepath = $project.FilePath assembly_name = "Energinet.DataHub.$($project.Name).dll" dotnet_version = "net8.0" - } + } + $matrixBuilds += $matrixObj + $matrixTests += $matrixObj - # We need to add the test project's 'twin' project to the matrix as well because it may be needed by TestCommon when running integrationtests + # We need to add the test project's 'twin' project to the matrix_build output as well because it may be needed by TestCommon when running integrationtests + # which is why we create an artifact with the System Under Test (SUT) that can be downloaded and and copied to the correct relative path expected by TestCommon during test execution $sut = $project.Name -replace ".Tests", "" $sutFilePath = $project.FilePath -replace ".Tests", "" # Some projects such as 'SubsystemTests' do not have a 'twin' project we need to build if (Test-Path $sutFilePath) { - $matrix += [PSCustomObject]@{ + $matrixBuilds += [PSCustomObject]@{ name = $sut filepath = $sutFilePath assembly_name = "Energinet.DataHub.$($sut).dll" @@ -71,9 +78,11 @@ jobs: } } } - $matrixJson = $matrix | ConvertTo-Json -Compress + $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress + $matrixTestsJson = $matrixTests | ConvertTo-Json -Compress - "matrix=$matrixJson" >> $env:GITHUB_OUTPUT + "matrix_builds=$matrixBuildsJson" >> $env:GITHUB_OUTPUT + "matrix_tests=$matrixTestsJson" >> $env:GITHUB_OUTPUT print_matrix: if: ${{ inputs.print_debug_output == 'true' }} @@ -85,8 +94,8 @@ jobs: shell: pwsh run: | Write-Host 'Print matrix' - $matrix = '${{needs.build_matrix.outputs.matrix}}' | ConvertFrom-Json | ConvertTo-Json - Write-Host $matrix + $matrixBuilds = '${{needs.build_matrix.outputs.matrix_builds}}' | ConvertFrom-Json | ConvertTo-Json + Write-Host $matrixBuilds build_tests_in_project: name: Build ${{ matrix.project.name }} @@ -95,7 +104,7 @@ jobs: strategy: fail-fast: false matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix)}} + project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} env: OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} steps: @@ -123,30 +132,28 @@ jobs: name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - # integration_tests: - # needs: [ - # build_matrix, - # build_tests_in_project - # ] - # strategy: - # fail-fast: false - # matrix: - # project: ${{fromJson(needs.build_matrix.outputs.matrix)}} - # uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline - # with: - # azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} - # azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} - # azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} - # azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} - # environment: AzureAuth - # run_integration_tests: true - # tests_filter_expression: empty # Means skip - # use_azure_functions_tools: true - # aspnetcore_test_contentroot_variable_name: empty - # aspnetcore_test_contentroot_variable_value: empty - # # Matrix parameters - # testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - # testproject_sut_artifact_name: pm-tests-${{ matrix.project.sut_name }}-${{ github.event.pull_request.number }} - - # testproject_name: ${{ matrix.project.name }} - # tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file + integration_tests: + needs: [ + build_matrix, + build_tests_in_project + ] + strategy: + fail-fast: false + matrix: + project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} + uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline + with: + azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} + azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} + azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} + azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} + environment: AzureAuth + run_integration_tests: true + tests_filter_expression: empty # Means skip + use_azure_functions_tools: true + aspnetcore_test_contentroot_variable_name: empty + aspnetcore_test_contentroot_variable_value: empty + # Matrix parameters + testproject_sut_artifact_name: ${{ matrix.project.name_sut }} + testproject_name: ${{ matrix.project.name }} + tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 2b64e67c9085502c5fa4e0591b10d30d3636dc48 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:08:03 +0100 Subject: [PATCH 091/136] Bump 0.14.1 --> 0.14.2 --- docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md | 4 ++++ .../ProcessManager.Abstractions.csproj | 2 +- source/ProcessManager.Client/ProcessManager.Client.csproj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md b/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md index eb861d3a..95030b63 100644 --- a/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md +++ b/docs/ProcessManager.Client/ReleaseNotes/ReleaseNotes.md @@ -1,5 +1,9 @@ # ProcessManager.Client Release Notes +## Version 0.14.2 + +- No functional change + ## Version 0.14.1 - Rename service bus client options diff --git a/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj b/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj index 216ba19c..b0e0ef6e 100644 --- a/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj +++ b/source/ProcessManager.Abstractions/ProcessManager.Abstractions.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Abstractions - 0.14.1$(VersionSuffix) + 0.14.2$(VersionSuffix) DH3 Process Manager Abstractions library Energinet-DataHub Energinet-DataHub diff --git a/source/ProcessManager.Client/ProcessManager.Client.csproj b/source/ProcessManager.Client/ProcessManager.Client.csproj index ff01460c..699ab84c 100644 --- a/source/ProcessManager.Client/ProcessManager.Client.csproj +++ b/source/ProcessManager.Client/ProcessManager.Client.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Client - 0.14.1$(VersionSuffix) + 0.14.2$(VersionSuffix) DH3 Process Manager Client library Energinet-DataHub Energinet-DataHub From 742a866e90c35ed3cfaf26e1846c05a37fd11432 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:13:03 +0100 Subject: [PATCH 092/136] Fix names --- .github/workflows/ci-dotnet-runtests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index d4cdc9ab..f2e74c81 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -154,6 +154,8 @@ jobs: aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty # Matrix parameters - testproject_sut_artifact_name: ${{ matrix.project.name_sut }} + testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} testproject_name: ${{ matrix.project.name }} + testproject_sut_artifact_name: pm-tests-${{ matrix.project.name_sut }}-${{ github.event.pull_request.number }} + testproject_sut_name: ${{ matrix.project.name_sut }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 6af37335010f3f6abb6b98ba3c402fac4b9bfc7d Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:17:48 +0100 Subject: [PATCH 093/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f2e74c81..16d71e21 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -149,7 +149,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip + tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From a7163fd8813c27d88c99f83450c01bdc63e9b052 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:30:16 +0100 Subject: [PATCH 094/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 16d71e21..f2e74c81 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -149,7 +149,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip. + tests_filter_expression: empty # Means skip use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From c0f219f09fb1be10a704f2038da28be8cfe83c47 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:34:21 +0100 Subject: [PATCH 095/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f2e74c81..16d71e21 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -149,7 +149,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip + tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From ec95e07ce4712b96e74961df60984902eaeaad49 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 12:45:05 +0100 Subject: [PATCH 096/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 16d71e21..f2e74c81 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -149,7 +149,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip. + tests_filter_expression: empty # Means skip use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From e0586d869ef26991b2269d6d9c9d6fdb59cdc16c Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 13:12:05 +0100 Subject: [PATCH 097/136] Add orchestrations always --- .github/workflows/ci-dotnet-runtests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f2e74c81..2892d177 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -78,6 +78,18 @@ jobs: } } } + + # Always add Orchestrations, as test projects rely on them during test execution + # It's very, very ugly. + if (($matrixBuilds | Where-Object { $_.name -ne 'ProcessManager.Orchestrations' })) { + $matrixBuilds += [PSCustomObject]@{ + name = "ProcessManager.Orchestrations" + filepath = "${{ github.workspace }}/source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj" + assembly_name = "Energinet.DataHub.ProcessManager.Orchestrations.dll" + dotnet_version = "net8.0" + } + } + $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress $matrixTestsJson = $matrixTests | ConvertTo-Json -Compress From 6c5288b445b2c1d85c303fa3064b2362fe7efa91 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 13:20:05 +0100 Subject: [PATCH 098/136] Invert if --- .github/workflows/ci-dotnet-runtests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 2892d177..62aafa64 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -81,7 +81,8 @@ jobs: # Always add Orchestrations, as test projects rely on them during test execution # It's very, very ugly. - if (($matrixBuilds | Where-Object { $_.name -ne 'ProcessManager.Orchestrations' })) { + $orchestrationsExist = ($matrixBuilds | Where-Object { $_.name -eq 'ProcessManager.Orchestrations' }) + if (!$orchestrationsExist) { $matrixBuilds += [PSCustomObject]@{ name = "ProcessManager.Orchestrations" filepath = "${{ github.workspace }}/source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj" From 4a1f979a077abff6c5caee0140f2577a0b334ae7 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 13:30:21 +0100 Subject: [PATCH 099/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 62aafa64..b607859f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -162,7 +162,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip + tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From 90cdc44b3e3417cd6000f54bf05d30069b3fa5e6 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 13:40:38 +0100 Subject: [PATCH 100/136] Add properties --- .github/workflows/ci-dotnet-runtests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index b607859f..e9a76f98 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -171,4 +171,6 @@ jobs: testproject_name: ${{ matrix.project.name }} testproject_sut_artifact_name: pm-tests-${{ matrix.project.name_sut }}-${{ github.event.pull_request.number }} testproject_sut_name: ${{ matrix.project.name_sut }} + testproject_orchestrations_name: ProcessManager.Orchestrations + testproject_orchestrations_artifact_name: pm-tests-ProcessManager.Orchestrations-${{ github.event.pull_request.number }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From ce77542da87ddb445c0395a4a58e2d503c8a3e8b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 14:37:28 +0100 Subject: [PATCH 101/136] Add ProcessManager to build always --- .github/workflows/ci-dotnet-runtests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index e9a76f98..4be57ca7 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -91,6 +91,16 @@ jobs: } } + $processManagerExist = ($matrixBuilds | Where-Object { $_.name -eq 'ProcessManager' }) + if (!$processManagerExist) { + $matrixBuilds += [PSCustomObject]@{ + name = "ProcessManager" + filepath = "${{ github.workspace }}/source/ProcessManager/ProcessManager.csproj" + assembly_name = "Energinet.DataHub.ProcessManager.dll" + dotnet_version = "net8.0" + } + } + $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress $matrixTestsJson = $matrixTests | ConvertTo-Json -Compress From dbc00cff71d249721ab59dbe257c43e34b2cf3e5 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 14:38:50 +0100 Subject: [PATCH 102/136] Add names --- .github/workflows/ci-dotnet-runtests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 4be57ca7..84e2651f 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -183,4 +183,6 @@ jobs: testproject_sut_name: ${{ matrix.project.name_sut }} testproject_orchestrations_name: ProcessManager.Orchestrations testproject_orchestrations_artifact_name: pm-tests-ProcessManager.Orchestrations-${{ github.event.pull_request.number }} + testproject_processmanager_name: ProcessManager + testproject_processmanager_artifact_name: pm-tests-ProcessManager-${{ github.event.pull_request.number }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 4c0be0cb4a88752c2ff4dff792e9d81583958ac5 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 14:43:51 +0100 Subject: [PATCH 103/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 84e2651f..6a1fc373 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -172,7 +172,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip. + tests_filter_expression: empty # Means skip use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From 2135bce8018e2b5c0993095694ef26e991f40758 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 14:44:44 +0100 Subject: [PATCH 104/136] Move params --- .github/workflows/ci-dotnet-runtests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 6a1fc373..bad7e467 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -176,13 +176,13 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty + testproject_orchestrations_name: ProcessManager.Orchestrations + testproject_orchestrations_artifact_name: pm-tests-ProcessManager.Orchestrations-${{ github.event.pull_request.number }} + testproject_processmanager_name: ProcessManager + testproject_processmanager_artifact_name: pm-tests-ProcessManager-${{ github.event.pull_request.number }} # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} testproject_name: ${{ matrix.project.name }} testproject_sut_artifact_name: pm-tests-${{ matrix.project.name_sut }}-${{ github.event.pull_request.number }} testproject_sut_name: ${{ matrix.project.name_sut }} - testproject_orchestrations_name: ProcessManager.Orchestrations - testproject_orchestrations_artifact_name: pm-tests-ProcessManager.Orchestrations-${{ github.event.pull_request.number }} - testproject_processmanager_name: ProcessManager - testproject_processmanager_artifact_name: pm-tests-ProcessManager-${{ github.event.pull_request.number }} tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From d7ee05ee1cab80e8a14e9a5fc268ca81d452f626 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 14:46:04 +0100 Subject: [PATCH 105/136] Add comment --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index bad7e467..55ccdfc6 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -79,7 +79,7 @@ jobs: } } - # Always add Orchestrations, as test projects rely on them during test execution + # Always add Orchestrations and Process Manager, as test projects rely on them during test execution # It's very, very ugly. $orchestrationsExist = ($matrixBuilds | Where-Object { $_.name -eq 'ProcessManager.Orchestrations' }) if (!$orchestrationsExist) { From e1445c76efcdd80350c6fae68daafbfaaacdd73b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:23:23 +0100 Subject: [PATCH 106/136] Build only changed artifacts --- .github/workflows/ci-dotnet-runtests.yml | 107 ++++++----------------- 1 file changed, 28 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 55ccdfc6..116ff5e2 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -46,66 +46,20 @@ jobs: # I couldn't find a better way to lowercase keys in a hashtable $matrixBuilds = @() - $matrixTests = @() foreach ($project in $affectedProjects) { if ($project.Name -like '*Tests*') { - $matrixObj = [PSCustomObject]@{ + $matrixBuilds += [PSCustomObject]@{ name = $project.Name - name_sut = $project.Name -replace ".Tests", "" filepath = $project.FilePath assembly_name = "Energinet.DataHub.$($project.Name).dll" dotnet_version = "net8.0" } - $matrixBuilds += $matrixObj - $matrixTests += $matrixObj - - # We need to add the test project's 'twin' project to the matrix_build output as well because it may be needed by TestCommon when running integrationtests - # which is why we create an artifact with the System Under Test (SUT) that can be downloaded and and copied to the correct relative path expected by TestCommon during test execution - $sut = $project.Name -replace ".Tests", "" - $sutFilePath = $project.FilePath -replace ".Tests", "" - - # Some projects such as 'SubsystemTests' do not have a 'twin' project we need to build - if (Test-Path $sutFilePath) { - $matrixBuilds += [PSCustomObject]@{ - name = $sut - filepath = $sutFilePath - assembly_name = "Energinet.DataHub.$($sut).dll" - dotnet_version = "net8.0" - } - } else { - Write-Host "No twin project found in path $sutFilePath" - } } - } - - # Always add Orchestrations and Process Manager, as test projects rely on them during test execution - # It's very, very ugly. - $orchestrationsExist = ($matrixBuilds | Where-Object { $_.name -eq 'ProcessManager.Orchestrations' }) - if (!$orchestrationsExist) { - $matrixBuilds += [PSCustomObject]@{ - name = "ProcessManager.Orchestrations" - filepath = "${{ github.workspace }}/source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj" - assembly_name = "Energinet.DataHub.ProcessManager.Orchestrations.dll" - dotnet_version = "net8.0" - } - } - - $processManagerExist = ($matrixBuilds | Where-Object { $_.name -eq 'ProcessManager' }) - if (!$processManagerExist) { - $matrixBuilds += [PSCustomObject]@{ - name = "ProcessManager" - filepath = "${{ github.workspace }}/source/ProcessManager/ProcessManager.csproj" - assembly_name = "Energinet.DataHub.ProcessManager.dll" - dotnet_version = "net8.0" - } - } + } $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress - $matrixTestsJson = $matrixTests | ConvertTo-Json -Compress - "matrix_builds=$matrixBuildsJson" >> $env:GITHUB_OUTPUT - "matrix_tests=$matrixTestsJson" >> $env:GITHUB_OUTPUT print_matrix: if: ${{ inputs.print_debug_output == 'true' }} @@ -155,34 +109,29 @@ jobs: name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - integration_tests: - needs: [ - build_matrix, - build_tests_in_project - ] - strategy: - fail-fast: false - matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} - uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline - with: - azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} - azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} - azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} - azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} - environment: AzureAuth - run_integration_tests: true - tests_filter_expression: empty # Means skip - use_azure_functions_tools: true - aspnetcore_test_contentroot_variable_name: empty - aspnetcore_test_contentroot_variable_value: empty - testproject_orchestrations_name: ProcessManager.Orchestrations - testproject_orchestrations_artifact_name: pm-tests-ProcessManager.Orchestrations-${{ github.event.pull_request.number }} - testproject_processmanager_name: ProcessManager - testproject_processmanager_artifact_name: pm-tests-ProcessManager-${{ github.event.pull_request.number }} - # Matrix parameters - testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - testproject_name: ${{ matrix.project.name }} - testproject_sut_artifact_name: pm-tests-${{ matrix.project.name_sut }}-${{ github.event.pull_request.number }} - testproject_sut_name: ${{ matrix.project.name_sut }} - tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file + # integration_tests: + # needs: [ + # build_matrix, + # build_tests_in_project + # ] + # strategy: + # fail-fast: false + # matrix: + # project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} + # uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline + # with: + # azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} + # azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} + # azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} + # azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} + # environment: AzureAuth + # run_integration_tests: true + # tests_filter_expression: empty # Means skip + # use_azure_functions_tools: true + # aspnetcore_test_contentroot_variable_name: empty + # aspnetcore_test_contentroot_variable_value: empty + + # # Matrix parameters + # testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + # testproject_name: ${{ matrix.project.name }} + # tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 08b36777cd30d180e5d455b3c7688684948bfb56 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:25:54 +0100 Subject: [PATCH 107/136] Bump 0.2.1 --> 0.2.2 --- .../ReleaseNotes/ReleaseNotes.md | 4 ++++ .../ProcessManager.Orchestrations.Abstractions.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md b/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md index aca4a642..8597449a 100644 --- a/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md +++ b/docs/ProcessManager.Orchestrations.Abstractions/ReleaseNotes/ReleaseNotes.md @@ -1,5 +1,9 @@ # ProcessManager.Orchestrations.Abstractions Release Notes +## Version 0.2.2 + +- No functional change + ## Version 0.2.1 - Updated `Brs_021_ForwardMeteredData_V1` unique name to `Brs_021_ForwardMeteredData` diff --git a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj index f7bcca3a..e336ae8d 100644 --- a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj +++ b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Orchestrations.Abstractions - 0.2.1$(VersionSuffix) + 0.2.2$(VersionSuffix) DH3 Process Manager Orchestrations Abstractions library Energinet-DataHub Energinet-DataHub From 4ca26edc338c52c256d0ca766bdd30dea198092c Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:30:39 +0100 Subject: [PATCH 108/136] Run tests --- .github/workflows/ci-dotnet-runtests.yml | 50 ++++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 116ff5e2..13a32ba5 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -109,29 +109,29 @@ jobs: name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} path: ${{ env.OUTPUT_PATH }}/* - # integration_tests: - # needs: [ - # build_matrix, - # build_tests_in_project - # ] - # strategy: - # fail-fast: false - # matrix: - # project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} - # uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline - # with: - # azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} - # azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} - # azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} - # azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} - # environment: AzureAuth - # run_integration_tests: true - # tests_filter_expression: empty # Means skip - # use_azure_functions_tools: true - # aspnetcore_test_contentroot_variable_name: empty - # aspnetcore_test_contentroot_variable_value: empty + integration_tests: + needs: [ + build_matrix, + build_tests_in_project + ] + strategy: + fail-fast: false + matrix: + project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} + uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline + with: + azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} + azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} + azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} + azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} + environment: AzureAuth + run_integration_tests: true + tests_filter_expression: empty # Means skip + use_azure_functions_tools: true + aspnetcore_test_contentroot_variable_name: empty + aspnetcore_test_contentroot_variable_value: empty - # # Matrix parameters - # testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - # testproject_name: ${{ matrix.project.name }} - # tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file + # Matrix parameters + testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + testproject_name: ${{ matrix.project.name }} + tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file From 31ee48bb472984a032e023763ecb6ecb38b68963 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:32:32 +0100 Subject: [PATCH 109/136] kick ci --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 13a32ba5..02235af0 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -126,7 +126,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip + tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From b9b3f9dd720173508ebc127befc7af4e2007a2d6 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:37:50 +0100 Subject: [PATCH 110/136] Add solutionfile --- .github/workflows/ci-dotnet-runtests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 02235af0..c975d3a4 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -130,6 +130,7 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty + solution_file_path: source/ProcessManager.sln # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} From a9dbaf1f6bb7cb1930148f0cf2e0339b98808d56 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:40:40 +0100 Subject: [PATCH 111/136] No need to build projects --- .github/workflows/ci-dotnet-runtests.yml | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index c975d3a4..10cfcf15 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -88,26 +88,26 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR + # - uses: actions/cache@v4 + # with: + # path: ~/.nuget/packages + # key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR - - name: Build ${{ matrix.project.name }} - run: | - dotnet publish \ - '${{ matrix.project.filepath }}' \ - --configuration Release \ - --output '${{ env.OUTPUT_PATH }}' \ - -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" + # - name: Build ${{ matrix.project.name }} + # run: | + # dotnet publish \ + # '${{ matrix.project.filepath }}' \ + # --configuration Release \ + # --output '${{ env.OUTPUT_PATH }}' \ + # -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" - # ls ${{ env.OUTPUT_PATH}} + # # ls ${{ env.OUTPUT_PATH}} - - uses: actions/upload-artifact@v4 - with: - retention-days: 2 - name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - path: ${{ env.OUTPUT_PATH }}/* + # - uses: actions/upload-artifact@v4 + # with: + # retention-days: 2 + # name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + # path: ${{ env.OUTPUT_PATH }}/* integration_tests: needs: [ From eee81e949d993f1f1e5b6de46a884e6d3ea23ac1 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:42:26 +0100 Subject: [PATCH 112/136] Add pings --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 10cfcf15..f33cd43c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -130,7 +130,7 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty - solution_file_path: source/ProcessManager.sln + solution_file_path: 'source/ProcessManager.sln' # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} From 01ea4ac99b2dca4950dae8f2a2f6f7d4823af20a Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:42:38 +0100 Subject: [PATCH 113/136] Flip --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f33cd43c..44d44eea 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -130,7 +130,7 @@ jobs: use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty - solution_file_path: 'source/ProcessManager.sln' + solution_file_path: 'source\ProcessManager.sln' # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} From 2d2c69d614646bd95f3a70e2d75c8c1dee55e928 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:45:53 +0100 Subject: [PATCH 114/136] doh --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 44d44eea..ed99a09c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -117,7 +117,7 @@ jobs: strategy: fail-fast: false matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix_tests)}} + project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline with: azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} From c407d39950b6ca1575ad4a4e2a72086f922c1a21 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Tue, 10 Dec 2024 15:47:52 +0100 Subject: [PATCH 115/136] Skip building anything --- .github/workflows/ci-dotnet-runtests.yml | 63 ++++++++++++------------ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index ed99a09c..887d5704 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -74,45 +74,44 @@ jobs: $matrixBuilds = '${{needs.build_matrix.outputs.matrix_builds}}' | ConvertFrom-Json | ConvertTo-Json Write-Host $matrixBuilds - build_tests_in_project: - name: Build ${{ matrix.project.name }} - runs-on: ubuntu-latest - needs: build_matrix - strategy: - fail-fast: false - matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} - env: - OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} - steps: - - name: Checkout repository - uses: actions/checkout@v4 + # build_tests_in_project: + # name: Build ${{ matrix.project.name }} + # runs-on: ubuntu-latest + # needs: build_matrix + # strategy: + # fail-fast: false + # matrix: + # project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} + # env: + # OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 - # - uses: actions/cache@v4 - # with: - # path: ~/.nuget/packages - # key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR + # - uses: actions/cache@v4 + # with: + # path: ~/.nuget/packages + # key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR - # - name: Build ${{ matrix.project.name }} - # run: | - # dotnet publish \ - # '${{ matrix.project.filepath }}' \ - # --configuration Release \ - # --output '${{ env.OUTPUT_PATH }}' \ - # -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" + # - name: Build ${{ matrix.project.name }} + # run: | + # dotnet publish \ + # '${{ matrix.project.filepath }}' \ + # --configuration Release \ + # --output '${{ env.OUTPUT_PATH }}' \ + # -p:ErrorOnDuplicatePublishOutputFiles=false # To avoid the error "Found multiple publish output files with the same relative path" - # # ls ${{ env.OUTPUT_PATH}} + # # ls ${{ env.OUTPUT_PATH}} - # - uses: actions/upload-artifact@v4 - # with: - # retention-days: 2 - # name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} - # path: ${{ env.OUTPUT_PATH }}/* + # - uses: actions/upload-artifact@v4 + # with: + # retention-days: 2 + # name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} + # path: ${{ env.OUTPUT_PATH }}/* integration_tests: needs: [ - build_matrix, - build_tests_in_project + build_matrix ] strategy: fail-fast: false From c6ca96a88e89ea31eb5ed77b2d4529852b8c2ec6 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 08:03:32 +0100 Subject: [PATCH 116/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 887d5704..83f3eb7e 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -125,7 +125,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip. + tests_filter_expression: empty # Means skip use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From 3ae9096ee9102056461377a260bcc4fd04f3581b Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 10:20:13 +0100 Subject: [PATCH 117/136] Add cachekey prefix --- .github/workflows/ci-dotnet-runtests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 83f3eb7e..6d89052c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -33,6 +33,7 @@ jobs: outputs: matrix_builds: ${{ steps.set-matrix.outputs.matrix_builds }} matrix_tests: ${{ steps.set-matrix.outputs.matrix_tests }} + cache_key_prefix: nuget-pr${{ github.event.pull_request.number }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -91,7 +92,7 @@ jobs: # - uses: actions/cache@v4 # with: # path: ~/.nuget/packages - # key: ${{ runner.os }}-nuget-${{ github.event.pull_request.number }}-${{ matrix.project.name}} # Cache per PR + # key: ${{ needs.build_matrix.outputs.cache_key_prefix }}-${{ hashFiles('**/*.csproj') }} # - name: Build ${{ matrix.project.name }} # run: | @@ -130,6 +131,7 @@ jobs: aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty solution_file_path: 'source\ProcessManager.sln' + nuget_cache_key_prefix: ${{ needs.build_matrix.outputs.cache_key_prefix }} # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} From 40e61997c4ba34fd7cd3b56f5f7bcfde7d8f6a91 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 10:31:45 +0100 Subject: [PATCH 118/136] Use same cache key --- .github/workflows/ci-dotnet-runtests.yml | 7 +++++-- .github/workflows/ci-dotnet.yml | 13 +++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 6d89052c..b69b516b 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -25,6 +25,10 @@ on: description: Enable debug logging required: false type: string + nuget_cache_key_prefix: + description: Cache key prefix + required: true + type: string jobs: build_matrix: @@ -33,7 +37,6 @@ jobs: outputs: matrix_builds: ${{ steps.set-matrix.outputs.matrix_builds }} matrix_tests: ${{ steps.set-matrix.outputs.matrix_tests }} - cache_key_prefix: nuget-pr${{ github.event.pull_request.number }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -131,7 +134,7 @@ jobs: aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty solution_file_path: 'source\ProcessManager.sln' - nuget_cache_key_prefix: ${{ needs.build_matrix.outputs.cache_key_prefix }} + nuget_cache_key_prefix: ${{ inputs.nuget_cache_key_prefix }} # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index c8b3ea3a..78573535 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -25,6 +25,11 @@ on: description: The context of the job type: string required: true + nuget_cache_key_prefix: + description: Cache key prefix + required: false + type: string + default: nuget-pr${{ github.event.pull_request.number }} jobs: build_artifact: @@ -34,13 +39,13 @@ jobs: RELEASE_FOLDER_PATH: ${{ github.workspace }}/output RELEASE_VERSION: ${{ inputs.release_name }}_${{ github.event.pull_request.number }} steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ env.RELEASE_VERSION }}-${{ inputs.release_name }} # Cache per PR - - - name: Checkout repository - uses: actions/checkout@v4 + key: ${{ inputs.nuget_cache_key_prefix }}-${{ hashFiles('**/*.csproj') }} # Cache per PR - name: Build ${{ inputs.release_name }} run: | From 0397d930de3cf6fe74f2273dcc5f36303c0df123 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 10:32:33 +0100 Subject: [PATCH 119/136] Add default --- .github/workflows/ci-dotnet-runtests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index b69b516b..10d72fae 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -27,8 +27,9 @@ on: type: string nuget_cache_key_prefix: description: Cache key prefix - required: true + required: false type: string + default: nuget-pr${{ github.event.pull_request.number }} jobs: build_matrix: From 4cb2e8420f352e4a6cd2f226bfad5741fa9ac6a3 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 11:10:18 +0100 Subject: [PATCH 120/136] Kick CI --- .github/workflows/ci-dotnet-runtests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 10d72fae..6b819e9b 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -130,7 +130,7 @@ jobs: azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth run_integration_tests: true - tests_filter_expression: empty # Means skip + tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty From f496463581ad6e1eedce86c518e841b6b29f7553 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 11:24:50 +0100 Subject: [PATCH 121/136] Remove comment --- .github/workflows/ci-orchestrator.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 07fee674..dca7be88 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -37,7 +37,6 @@ jobs: with: print_debug_output: 'true' # TODO: Remove before merge solution_file: 'source/ProcessManager.sln' - # Hostnames = famous mountains hostnames: " { 'everest': 'ProcessManager.csproj', From e74b95c07b97fdac9eeaca74dad590fa352d1a21 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 11:53:18 +0100 Subject: [PATCH 122/136] Remove debug print --- .github/workflows/ci-orchestrator.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index dca7be88..5f3ac00a 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -35,7 +35,6 @@ jobs: changes: uses: ./.github/workflows/detect-changes.yml with: - print_debug_output: 'true' # TODO: Remove before merge solution_file: 'source/ProcessManager.sln' hostnames: " { @@ -78,7 +77,6 @@ jobs: needs: changes uses: ./.github/workflows/ci-dotnet-runtests.yml with: - print_debug_output: 'true' # TODO: Remove before merge affected_changes: ${{ needs.changes.outputs.affected_changes }} # From 53f3b54430800664c4e61cce5e621f601572cefd Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 14:10:27 +0100 Subject: [PATCH 123/136] Fix cachekeys. PR feedback --- .github/workflows/ci-dotnet-runtests.yml | 12 ++++++++---- .github/workflows/ci-dotnet.yml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 6b819e9b..f441767c 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -30,6 +30,11 @@ on: required: false type: string default: nuget-pr${{ github.event.pull_request.number }} + dotnet_version: + description: The version of dotnet to use + required: false + type: string + default: 'net8.0' jobs: build_matrix: @@ -47,7 +52,6 @@ jobs: shell: pwsh run: | $affectedProjects = '${{ inputs.affected_changes }}' | ConvertFrom-Json - # $matrixBuilds = $affectedProjects | Where-Object {$_.Name -like '*Tests*'} | Select-Object -ExpandProperty Filepath | ConvertTo-Json -Compress # I couldn't find a better way to lowercase keys in a hashtable $matrixBuilds = @() @@ -58,7 +62,7 @@ jobs: name = $project.Name filepath = $project.FilePath assembly_name = "Energinet.DataHub.$($project.Name).dll" - dotnet_version = "net8.0" + dotnet_version = "${{ inputs.dotnet_version }}" } } } @@ -96,7 +100,7 @@ jobs: # - uses: actions/cache@v4 # with: # path: ~/.nuget/packages - # key: ${{ needs.build_matrix.outputs.cache_key_prefix }}-${{ hashFiles('**/*.csproj') }} + # key: ${{ inputs.nuget_cache_key_prefix }}-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} # - name: Build ${{ matrix.project.name }} # run: | @@ -122,7 +126,7 @@ jobs: fail-fast: false matrix: project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} - uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@kerbou/2524-build-brs-pipeline + uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@v14 with: azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} azure_integrationtest_subscription_id: ${{ vars.integration_test_azure_subscription_id }} diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 78573535..72fb9cc1 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ inputs.nuget_cache_key_prefix }}-${{ hashFiles('**/*.csproj') }} # Cache per PR + key: ${{ inputs.nuget_cache_key_prefix }}-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} - name: Build ${{ inputs.release_name }} run: | From fbca041db38349c49cca06b2c36f380af3f944ae Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 14:11:54 +0100 Subject: [PATCH 124/136] Enable YAML lint --- .github/workflows/ci-orchestrator.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 5f3ac00a..bca6cea9 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -24,8 +24,6 @@ jobs: # ci_base: uses: Energinet-DataHub/.github/.github/workflows/ci-base.yml@v14 - with: - skip_yaml_lint: true # TODO: Remove before merge secrets: dh3serviceaccount_privatekey: ${{ secrets.dh3serviceaccount_privatekey }} From 5b9cd0d431ecd0071e6fdcdf176d077db3a64971 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 14:19:08 +0100 Subject: [PATCH 125/136] Fix yaml --- .github/actions/dotnet-affected/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index 4a1a6fb2..b38900a5 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -17,22 +17,22 @@ description: "Find affected .NET projects in a solution." inputs: solution_file: - description: "The path to the solution file." + description: The path to the solution file required: true workspace_path: - description: "The path to the workspace." + description: The path to the workspace required: true from_sha: - description: "The commit SHA to compare from." + description: The commit SHA to compare from required: true to_sha: - description: "The commit SHA to compare to." + description: The commit SHA to compare to required: true host_names: - description: "Host names mapped to project names" + description: Host names mapped to project names required: true print_debug_output: - description: "Enable debug logging" + description: Enable debug logging required: false default: "false" outputs: From bc1f40c921979aa388da1559e1f1f13f0e644973 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 14:21:26 +0100 Subject: [PATCH 126/136] fix yaml --- .github/workflows/ci-dotnet-runtests.yml | 16 ++++++++-------- .github/workflows/ci-dotnet.yml | 2 +- .github/workflows/ci-orchestrator.yml | 2 +- .github/workflows/detect-changes.yml | 7 ++----- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index f441767c..50258bc9 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -34,7 +34,7 @@ on: description: The version of dotnet to use required: false type: string - default: 'net8.0' + default: net8.0 jobs: build_matrix: @@ -65,7 +65,7 @@ jobs: dotnet_version = "${{ inputs.dotnet_version }}" } } - } + } $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress "matrix_builds=$matrixBuildsJson" >> $env:GITHUB_OUTPUT @@ -89,8 +89,8 @@ jobs: # needs: build_matrix # strategy: # fail-fast: false - # matrix: - # project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} + # matrix: + # project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} # env: # OUTPUT_PATH: ${{ github.workspace }}/source/${{ matrix.project.name}}/bin/Release/${{matrix.project.dotnet_version}} # steps: @@ -125,7 +125,7 @@ jobs: strategy: fail-fast: false matrix: - project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} + project: ${{fromJson(needs.build_matrix.outputs.matrix_builds)}} uses: Energinet-DataHub/.github/.github/workflows/dotnet-postbuild-test-monorepo.yml@v14 with: azure_integrationtest_tenant_id: ${{ vars.integration_test_azure_tenant_id }} @@ -133,14 +133,14 @@ jobs: azure_integrationtest_spn_id: ${{ vars.integration_test_azure_spn_id_oidc }} azure_keyvault_url: ${{ vars.integration_test_azure_keyvault_url }} environment: AzureAuth - run_integration_tests: true + run_integration_tests: true tests_filter_expression: empty # Means skip. use_azure_functions_tools: true aspnetcore_test_contentroot_variable_name: empty aspnetcore_test_contentroot_variable_value: empty - solution_file_path: 'source\ProcessManager.sln' + solution_file_path: source\ProcessManager.sln nuget_cache_key_prefix: ${{ inputs.nuget_cache_key_prefix }} - + # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} testproject_name: ${{ matrix.project.name }} diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 72fb9cc1..56778114 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ inputs.nuget_cache_key_prefix }}-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} + key: ${{ inputs.nuget_cache_key_prefix }}-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} - name: Build ${{ inputs.release_name }} run: | diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index bca6cea9..1e4805a9 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -33,7 +33,7 @@ jobs: changes: uses: ./.github/workflows/detect-changes.yml with: - solution_file: 'source/ProcessManager.sln' + solution_file: source/ProcessManager.sln hostnames: " { 'everest': 'ProcessManager.csproj', diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 59fff615..6f684929 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 # Fetch all history so that we can determine the base commit + fetch-depth: 0 # Fetch all history so that we can determine the base commit - uses: nrwl/nx-set-shas@v4 id: set_shas @@ -78,7 +78,4 @@ jobs: - 'source/ProcessManager.Client*/**' - 'source/ProcessManager.Abstractions*/**' - 'source/ProcessManager.Orchestrations.Abstractions*/**' - - '.github/workflows/processmanager-client-bundle-publish.yml' - - - \ No newline at end of file + - '.github/workflows/processmanager-client-bundle-publish.yml' \ No newline at end of file From 486d75c7d1f7c901fd8f6df2e5a2c38db60208b4 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 14:23:39 +0100 Subject: [PATCH 127/136] Fix yaml --- .github/actions/dotnet-affected/action.yml | 8 ++++---- .github/workflows/ci-dotnet-runtests.yml | 4 ++-- .github/workflows/detect-changes.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/dotnet-affected/action.yml b/.github/actions/dotnet-affected/action.yml index b38900a5..784f8200 100644 --- a/.github/actions/dotnet-affected/action.yml +++ b/.github/actions/dotnet-affected/action.yml @@ -13,7 +13,7 @@ # limitations under the License. name: Find affected .NET projects -description: "Find affected .NET projects in a solution." +description: Find affected .NET projects in a solution inputs: solution_file: @@ -37,10 +37,10 @@ inputs: default: "false" outputs: affected_changes: - description: "The affected projects, if any" + description: The affected projects, if any value: ${{ steps.filter.outputs.affected_changes }} job_context: - description: "The job context output, if any" + description: The job context output, if any value: ${{ steps.filter.outputs.job_context }} runs: @@ -65,7 +65,7 @@ runs: if (Test-Path $AffectedProjectsFile) { $affectedJson = Get-Content $AffectedProjectsFile "affected_changes=$affectedJson" >> $env:GITHUB_OUTPUT - + $job_context_output = Find-AffectedHosts -AffectedProjects $affectedJson -HostNames $hostNamesJson "job_context=$job_context_output" >> $env:GITHUB_OUTPUT } else { diff --git a/.github/workflows/ci-dotnet-runtests.yml b/.github/workflows/ci-dotnet-runtests.yml index 50258bc9..49fea2a5 100644 --- a/.github/workflows/ci-dotnet-runtests.yml +++ b/.github/workflows/ci-dotnet-runtests.yml @@ -65,7 +65,7 @@ jobs: dotnet_version = "${{ inputs.dotnet_version }}" } } - } + } $matrixBuildsJson = $matrixBuilds | ConvertTo-Json -Compress "matrix_builds=$matrixBuildsJson" >> $env:GITHUB_OUTPUT @@ -144,4 +144,4 @@ jobs: # Matrix parameters testproject_artifact_name: pm-tests-${{ matrix.project.name }}-${{ github.event.pull_request.number }} testproject_name: ${{ matrix.project.name }} - tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} \ No newline at end of file + tests_dll_file_path: \source\${{ matrix.project.name}}\bin\Release\${{matrix.project.dotnet_version}}\${{ matrix.project.assembly_name }} diff --git a/.github/workflows/detect-changes.yml b/.github/workflows/detect-changes.yml index 6f684929..34e123f4 100644 --- a/.github/workflows/detect-changes.yml +++ b/.github/workflows/detect-changes.yml @@ -78,4 +78,4 @@ jobs: - 'source/ProcessManager.Client*/**' - 'source/ProcessManager.Abstractions*/**' - 'source/ProcessManager.Orchestrations.Abstractions*/**' - - '.github/workflows/processmanager-client-bundle-publish.yml' \ No newline at end of file + - '.github/workflows/processmanager-client-bundle-publish.yml' From 9db06661ad5ec0173958b69a7669d11f86bc84e8 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 15:42:33 +0100 Subject: [PATCH 128/136] Change names from mountains to versioned names --- .github/workflows/ci-orchestrator.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 1e4805a9..927a3c09 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -36,9 +36,9 @@ jobs: solution_file: source/ProcessManager.sln hostnames: " { - 'everest': 'ProcessManager.csproj', - 'montblanc': 'ProcessManager.Orchestrations.csproj', - 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' + 'processmanager_v1': 'ProcessManager.csproj', + 'orchestrations_v1': 'ProcessManager.Orchestrations.csproj', + 'dbmigrations_v1': 'ProcessManager.DatabaseMigration.csproj' }" ci_processmanager_nuget: From 213accd297c34a48470587fa0d406d15a332110a Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 15:46:22 +0100 Subject: [PATCH 129/136] Build versions --- .github/workflows/ci-dotnet.yml | 6 +++++- .github/workflows/ci-orchestrator.yml | 15 +++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 56778114..495a29e1 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -25,6 +25,10 @@ on: description: The context of the job type: string required: true + version: + description: The version of the artifact + required: true + type: string nuget_cache_key_prefix: description: Cache key prefix required: false @@ -37,7 +41,7 @@ jobs: runs-on: ubuntu-latest env: RELEASE_FOLDER_PATH: ${{ github.workspace }}/output - RELEASE_VERSION: ${{ inputs.release_name }}_${{ github.event.pull_request.number }} + RELEASE_VERSION: ${{ inputs.release_name }}_v${{ inputs.version }}_${{ github.event.pull_request.number }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 927a3c09..56719d24 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -36,9 +36,9 @@ jobs: solution_file: source/ProcessManager.sln hostnames: " { - 'processmanager_v1': 'ProcessManager.csproj', - 'orchestrations_v1': 'ProcessManager.Orchestrations.csproj', - 'dbmigrations_v1': 'ProcessManager.DatabaseMigration.csproj' + 'processmanager': 'ProcessManager.csproj', + 'orchestrations': 'ProcessManager.Orchestrations.csproj', + 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" ci_processmanager_nuget: @@ -48,20 +48,22 @@ jobs: secrets: inherit ci_dotnet_everest: - if: ${{ fromJson(needs.changes.outputs.job_context).everest == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).processmanager == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml with: release_name: process_manager_everest project_file: source/ProcessManager/ProcessManager.csproj + version: '1' ci_dotnet_montblanc: - if: ${{ fromJson(needs.changes.outputs.job_context).montblanc == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml with: release_name: process_manager_montblanc project_file: source/ProcessManager/ProcessManager.csproj + version: '1' ci_dotnet_dbmigrations: if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} @@ -70,7 +72,8 @@ jobs: with: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj - + version: '1' + ci_run_tests: needs: changes uses: ./.github/workflows/ci-dotnet-runtests.yml From 6840b33b42c5fe60c9510c2d70219a6261e618b8 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 15:47:57 +0100 Subject: [PATCH 130/136] Fix jobnames --- .github/workflows/ci-orchestrator.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 56719d24..bae71597 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -47,7 +47,7 @@ jobs: uses: ./.github/workflows/processmanager-client-bundle-publish.yml secrets: inherit - ci_dotnet_everest: + ci_processmanager: if: ${{ fromJson(needs.changes.outputs.job_context).processmanager == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml @@ -56,7 +56,7 @@ jobs: project_file: source/ProcessManager/ProcessManager.csproj version: '1' - ci_dotnet_montblanc: + ci_orchestrations: if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml @@ -65,7 +65,7 @@ jobs: project_file: source/ProcessManager/ProcessManager.csproj version: '1' - ci_dotnet_dbmigrations: + ci_dbmigrations: if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml @@ -73,7 +73,7 @@ jobs: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj version: '1' - + ci_run_tests: needs: changes uses: ./.github/workflows/ci-dotnet-runtests.yml @@ -90,10 +90,10 @@ jobs: [ ci_base, changes, - ci_dotnet_everest, - ci_dotnet_montblanc, - ci_dotnet_dbmigrations, ci_processmanager_nuget, + ci_processmanager, + ci_orchestrations, + ci_dbmigrations, ci_run_tests ] if: | From 559c434649762d45feb7c239c437da5a87b988d7 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 15:48:51 +0100 Subject: [PATCH 131/136] Fix yaml --- .github/workflows/ci-orchestrator.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index bae71597..bb7739bb 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -54,7 +54,7 @@ jobs: with: release_name: process_manager_everest project_file: source/ProcessManager/ProcessManager.csproj - version: '1' + version: 1 ci_orchestrations: if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} @@ -63,7 +63,7 @@ jobs: with: release_name: process_manager_montblanc project_file: source/ProcessManager/ProcessManager.csproj - version: '1' + version: 1 ci_dbmigrations: if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} @@ -72,7 +72,7 @@ jobs: with: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj - version: '1' + version: 1 ci_run_tests: needs: changes From b35284669a8dfa6a4216dca55cd907d2e993f38d Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Wed, 11 Dec 2024 15:52:21 +0100 Subject: [PATCH 132/136] Fix --- .github/workflows/ci-orchestrator.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index bb7739bb..1bcf824f 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -52,7 +52,7 @@ jobs: needs: changes uses: ./.github/workflows/ci-dotnet.yml with: - release_name: process_manager_everest + release_name: process_manager project_file: source/ProcessManager/ProcessManager.csproj version: 1 @@ -61,8 +61,8 @@ jobs: needs: changes uses: ./.github/workflows/ci-dotnet.yml with: - release_name: process_manager_montblanc - project_file: source/ProcessManager/ProcessManager.csproj + release_name: process_manager_orchestrations + project_file: source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj version: 1 ci_dbmigrations: From 2f075df9fca9b2f2b452ae3bee7384ef0fd6b7d7 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Thu, 12 Dec 2024 09:25:26 +0100 Subject: [PATCH 133/136] Adjust naming --- .github/workflows/ci-orchestrator.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 1bcf824f..ffa24857 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -36,7 +36,7 @@ jobs: solution_file: source/ProcessManager.sln hostnames: " { - 'processmanager': 'ProcessManager.csproj', + 'core': 'ProcessManager.csproj', 'orchestrations': 'ProcessManager.Orchestrations.csproj', 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" @@ -48,11 +48,11 @@ jobs: secrets: inherit ci_processmanager: - if: ${{ fromJson(needs.changes.outputs.job_context).processmanager == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).core == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml with: - release_name: process_manager + release_name: process_manager_core project_file: source/ProcessManager/ProcessManager.csproj version: 1 From 7c830e4f61f666a1f1b9c1491caed748d879a855 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Thu, 12 Dec 2024 09:28:53 +0100 Subject: [PATCH 134/136] Add names --- .github/workflows/ci-orchestrator.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index ffa24857..9b515d7a 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -41,16 +41,18 @@ jobs: 'dbmigrations': 'ProcessManager.DatabaseMigration.csproj' }" - ci_processmanager_nuget: + ci_nuget: needs: changes if: ${{ needs.changes.outputs.nuget_packages == 'true' }} uses: ./.github/workflows/processmanager-client-bundle-publish.yml + name: Build NuGet packages secrets: inherit - ci_processmanager: + ci_core: if: ${{ fromJson(needs.changes.outputs.job_context).core == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml + name: Build Core with: release_name: process_manager_core project_file: source/ProcessManager/ProcessManager.csproj @@ -60,6 +62,7 @@ jobs: if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml + name: Build Orchestrations with: release_name: process_manager_orchestrations project_file: source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj @@ -69,6 +72,7 @@ jobs: if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} needs: changes uses: ./.github/workflows/ci-dotnet.yml + name: Build database migrations with: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj @@ -77,6 +81,7 @@ jobs: ci_run_tests: needs: changes uses: ./.github/workflows/ci-dotnet-runtests.yml + name: Run tests with: affected_changes: ${{ needs.changes.outputs.affected_changes }} @@ -90,8 +95,8 @@ jobs: [ ci_base, changes, - ci_processmanager_nuget, - ci_processmanager, + ci_nuget, + ci_core, ci_orchestrations, ci_dbmigrations, ci_run_tests From 3b9c3c345062f384940a02296e9e6321fd6cd3cf Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Thu, 12 Dec 2024 10:32:35 +0100 Subject: [PATCH 135/136] Remove version tag --- .github/workflows/ci-dotnet.yml | 6 +----- .github/workflows/ci-orchestrator.yml | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 495a29e1..56778114 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -25,10 +25,6 @@ on: description: The context of the job type: string required: true - version: - description: The version of the artifact - required: true - type: string nuget_cache_key_prefix: description: Cache key prefix required: false @@ -41,7 +37,7 @@ jobs: runs-on: ubuntu-latest env: RELEASE_FOLDER_PATH: ${{ github.workspace }}/output - RELEASE_VERSION: ${{ inputs.release_name }}_v${{ inputs.version }}_${{ github.event.pull_request.number }} + RELEASE_VERSION: ${{ inputs.release_name }}_${{ github.event.pull_request.number }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 9b515d7a..f05a1181 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -56,7 +56,6 @@ jobs: with: release_name: process_manager_core project_file: source/ProcessManager/ProcessManager.csproj - version: 1 ci_orchestrations: if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} @@ -66,7 +65,6 @@ jobs: with: release_name: process_manager_orchestrations project_file: source/ProcessManager.Orchestrations/ProcessManager.Orchestrations.csproj - version: 1 ci_dbmigrations: if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} @@ -76,7 +74,6 @@ jobs: with: release_name: process_manager_dbmigrations project_file: source/ProcessManager.DatabaseMigration/ProcessManager.DatabaseMigration.csproj - version: 1 ci_run_tests: needs: changes From ffacfac4bd14cfd14eb81378ca4100fd7479c948 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Thu, 12 Dec 2024 14:45:52 +0100 Subject: [PATCH 136/136] Bump version tag --- .../ProcessManager.Orchestrations.Abstractions.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj index e336ae8d..e8442efd 100644 --- a/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj +++ b/source/ProcessManager.Orchestrations.Abstractions/ProcessManager.Orchestrations.Abstractions.csproj @@ -7,7 +7,7 @@ Energinet.DataHub.ProcessManager.Orchestrations.Abstractions - 0.2.2$(VersionSuffix) + 0.2.3$(VersionSuffix) DH3 Process Manager Orchestrations Abstractions library Energinet-DataHub Energinet-DataHub