From d00f75d0cb3fe8fd4927a11baba633849eb8a4e7 Mon Sep 17 00:00:00 2001 From: Kristian Bank Erbou Date: Fri, 13 Dec 2024 13:37:53 +0100 Subject: [PATCH] Bugfix: CD dispatch should dispatch to dh3-environments (#45) --- .github/workflows/cd.yml | 51 +++++++++++++++---- .../OrchestrationDescription.cs | 2 +- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 438878cc..f6ca4aee 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -33,12 +33,27 @@ jobs: # CD .NET # - dotnet_promote_prerelease: + promote_prerelease_core: needs: changes - if: ${{ needs.changes.outputs.nuget_packages == 'true'}} + if: ${{ fromJson(needs.changes.outputs.job_context).core == 'true' }} uses: Energinet-DataHub/.github/.github/workflows/promote-prerelease.yml@v14 with: - release_name_prefix: dotnet + release_name_prefix: process_manager_core + + promote_prerelease_orchestrations: + needs: changes + if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} + uses: Energinet-DataHub/.github/.github/workflows/promote-prerelease.yml@v14 + with: + release_name_prefix: process_manager_orchestrations + + promote_prerelease_dbmigrations: + needs: changes + if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} + uses: Energinet-DataHub/.github/.github/workflows/promote-prerelease.yml@v14 + with: + release_name_prefix: process_manager_dbmigrations + # # Dispatch deployment request @@ -46,9 +61,12 @@ jobs: # dispatch_deploment_event_core: - if: ${{ fromJson(needs.changes.outputs.job_context).core == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).core == 'true' }} runs-on: ubuntu-latest - needs: [dotnet_promote_prerelease, changes] + needs: [ + changes, + promote_prerelease_core + ] steps: - name: Find associated pull request uses: Energinet-DataHub/.github/.github/actions/find-related-pr-number@v14 @@ -70,9 +88,12 @@ jobs: client-payload: '{"pr_number": "${{ steps.find_pull_request.outputs.pull_request_number }}" }' # yamllint disable-line rule:quoted-strings dispatch_deploment_event_orchestrations: - if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} runs-on: ubuntu-latest - needs: [dotnet_promote_prerelease, changes] + needs: [ + changes, + promote_prerelease_orchestrations + ] steps: - name: Find associated pull request uses: Energinet-DataHub/.github/.github/actions/find-related-pr-number@v14 @@ -94,9 +115,12 @@ jobs: client-payload: '{"pr_number": "${{ steps.find_pull_request.outputs.pull_request_number }}"}' # yamllint disable-line rule:quoted-strings dispatch_deploment_event_dbmigrations: - if: ${{ fromJson(needs.changes.outputs.job_context).orchestrations == 'true' }} + if: ${{ fromJson(needs.changes.outputs.job_context).dbmigrations == 'true' }} runs-on: ubuntu-latest - needs: [dotnet_promote_prerelease, changes] + needs: [ + changes, + promote_prerelease_dbmigrations + ] steps: - name: Find associated pull request uses: Energinet-DataHub/.github/.github/actions/find-related-pr-number@v14 @@ -123,8 +147,13 @@ jobs: dispatch_failed: needs: [ - dotnet_promote_prerelease, - + changes, + promote_prerelease_core, + promote_prerelease_orchestrations, + promote_prerelease_dbmigrations, + dispatch_deploment_event_core, + dispatch_deploment_event_orchestrations, + dispatch_deploment_event_dbmigrations ] if: | always() && diff --git a/source/ProcessManager.Core/Domain/OrchestrationDescription/OrchestrationDescription.cs b/source/ProcessManager.Core/Domain/OrchestrationDescription/OrchestrationDescription.cs index 48837d79..9416b17e 100644 --- a/source/ProcessManager.Core/Domain/OrchestrationDescription/OrchestrationDescription.cs +++ b/source/ProcessManager.Core/Domain/OrchestrationDescription/OrchestrationDescription.cs @@ -19,7 +19,7 @@ namespace Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationDescripti /// /// Durable Functions orchestration description. /// It contains the information necessary to locate and execute a Durable Functions -/// orchestration. +/// orchestration /// public class OrchestrationDescription {