Skip to content

Commit

Permalink
Merge branch 'main' into juj/ImplementParallelResultFetchingFromDatab…
Browse files Browse the repository at this point in the history
…ricks
  • Loading branch information
FirestarJes authored Sep 2, 2024
2 parents c929171 + 78cc795 commit 37e4be3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,21 @@ jobs:

dotnet_promote_prerelease:
needs: changes
if: ${{ needs.changes.outputs.dotnet == 'true' }}
if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }}
uses: Energinet-DataHub/.github/.github/workflows/promote-prerelease.yml@v13
with:
release_name_prefix: dotnet

#
# Dispatch deployment request
# Only dispatch if there are changes to either dotnet or database migrations. No need to deploy if only C4 model views are updated.
#

dispatch_deploment_event:
if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }}
runs-on: ubuntu-latest
needs: [changes, dotnet_promote_prerelease]
if: |
always() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
!(
needs.dotnet_promote_prerelease.result == 'skipped'
)
steps:
- run: echo "${{ toJSON(needs) }}"

- name: Find associated pull request
uses: Energinet-DataHub/.github/.github/actions/find-related-pr-number@v13
id: find_pull_request
Expand All @@ -73,7 +66,7 @@ jobs:
repository: ${{ vars.environment_repository_path }}
event-type: settlement-report-deployment-request-domain
# yamllint disable-line rule:quoted-strings
client-payload: '{"domain_pr": "${{ steps.find_pull_request.outputs.pull_request_number }}", "dotnet_deploy": "${{ needs.changes.outputs.dotnet }}"}'
client-payload: '{"pr_number": "${{ steps.find_pull_request.outputs.pull_request_number }}", "dotnet": "${{ needs.changes.outputs.dotnet }}", "db_migrations": "${{ needs.changes.outputs.db_migrations }}"}'

#
# Send notification to teams channel if deployment dispatch failed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

ci_dotnet:
needs: changes
if: ${{ needs.changes.outputs.dotnet == 'true' }}
if: ${{ needs.changes.outputs.dotnet == 'true' || needs.changes.outputs.db_migrations == 'true' }}
uses: ./.github/workflows/ci-dotnet.yml

render_c4model_views:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ on:
value: ${{ jobs.changes.outputs.dotnet }}
render_c4model_views:
value: ${{ jobs.changes.outputs.render_c4model_views }}
db_migrations:
value: ${{ jobs.changes.outputs.db_migrations }}

jobs:
changes:
Expand All @@ -36,6 +38,7 @@ jobs:
outputs:
dotnet: ${{ steps.filter.outputs.dotnet }}
render_c4model_views: ${{ steps.filter.outputs.render_c4model_views }}
db_migrations: ${{ steps.filter.outputs.db_migrations }}
steps:
# For pull requests it's not necessary to checkout the code because GitHub REST API is used to determine changes
- name: Checkout repository
Expand All @@ -52,7 +55,9 @@ jobs:
- '.github/workflows/cd.yml'
- '.github/workflows/ci-dotnet.yml'
- '.github/actions/dotnet-*/**'
- 'source/settlement-report/**'
- 'source/settlement-report/!(DatabaseMigration/**)**'
db_migrations:
- 'source/settlement-report/DatabaseMigration/**'
render_c4model_views:
- 'docs/diagrams/c4-model/views.dsl'
- 'docs/diagrams/c4-model/views.json'
Expand Down
6 changes: 2 additions & 4 deletions source/settlement-report/Test.Core/Test.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ limitations under the License.
<RootNamespace>Energinet.DataHub.SettlementReport.Test.Core</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Energinet.DataHub.Core.FunctionApp.TestCommon" Version="5.3.0" />
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="5.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Energinet.DataHub.Core.FunctionApp.TestCommon" Version="6.1.0" />
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="6.1.0" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.32.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime" Version="8.0.1" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 37e4be3

Please sign in to comment.