Skip to content

Commit

Permalink
added friendly names for all steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Physer committed Jun 7, 2024
1 parent fb6d770 commit 3a5b4ec
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/continuous-delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ permissions:
contents: read

jobs:
apply-pull-request-infrastructure:
apply-infrastructure:
name: Apply infrastructure
uses: ./.github/workflows/reusable-apply-infrastructure.yaml
with:
suffix: production
Expand All @@ -22,33 +23,37 @@ jobs:
secrets: inherit

build-cloud-application:
name: Build XPRTZ Cloud application
uses: ./.github/workflows/reusable-build-application.yaml
with:
application: cloud
needs: [apply-pull-request-infrastructure]
needs: [apply-infrastructure]

deploy-cloud-application:
name: Deploy XPRTZ Cloud application
uses: ./.github/workflows/reusable-deploy-application.yaml
with:
application: cloud
storageAccount: ${{ needs.apply-pull-request-infrastructure.outputs.cloudStorageAccount }}
resourceGroup: ${{ needs.apply-pull-request-infrastructure.outputs.resourceGroup }}
storageAccount: ${{ needs.apply-infrastructure.outputs.cloudStorageAccount }}
resourceGroup: ${{ needs.apply-infrastructure.outputs.resourceGroup }}
environment: production
needs: [apply-pull-request-infrastructure, build-cloud-application]
needs: [apply-infrastructure, build-cloud-application]
secrets: inherit

build-dotnet-application:
name: Build XPRTZ .NET application
uses: ./.github/workflows/reusable-build-application.yaml
with:
application: dotnet
needs: [apply-pull-request-infrastructure]
needs: [apply-infrastructure]

deploy-dotnet-application:
name: Deploy XPRTZ .NET application
uses: ./.github/workflows/reusable-deploy-application.yaml
with:
application: dotnet
storageAccount: ${{ needs.apply-pull-request-infrastructure.outputs.dotnetStorageAccount }}
resourceGroup: ${{ needs.apply-pull-request-infrastructure.outputs.resourceGroup }}
storageAccount: ${{ needs.apply-infrastructure.outputs.dotnetStorageAccount }}
resourceGroup: ${{ needs.apply-infrastructure.outputs.resourceGroup }}
environment: production
needs: [apply-pull-request-infrastructure, build-dotnet-application]
needs: [apply-infrastructure, build-dotnet-application]
secrets: inherit
28 changes: 17 additions & 11 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
branch_hash=($(sha1sum <<< ${{ github.head_ref }} | rev | cut -c 32- | rev))
echo -n "hash=$branch_hash" >> "$GITHUB_OUTPUT"
apply-pull-request-infrastructure:
apply-infrastructure:
name: Apply infrastructure
uses: ./.github/workflows/reusable-apply-infrastructure.yaml
with:
suffix: ${{ github.head_ref }}
Expand All @@ -35,46 +36,51 @@ jobs:
secrets: inherit

build-cloud-application:
name: Build XPRTZ Cloud application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-build-application.yaml
with:
application: cloud
needs: [apply-pull-request-infrastructure]
needs: [apply-infrastructure]

deploy-cloud-application:
name: Deploy XPRTZ Cloud application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-deploy-application.yaml
with:
application: cloud
storageAccount: ${{ needs.apply-pull-request-infrastructure.outputs.cloudStorageAccount }}
resourceGroup: ${{ needs.apply-pull-request-infrastructure.outputs.resourceGroup }}
storageAccount: ${{ needs.apply-infrastructure.outputs.cloudStorageAccount }}
resourceGroup: ${{ needs.apply-infrastructure.outputs.resourceGroup }}
environment: preview
needs: [apply-pull-request-infrastructure, build-cloud-application]
needs: [apply-infrastructure, build-cloud-application]
secrets: inherit

build-dotnet-application:
name: Build XPRTZ .NET application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-build-application.yaml
with:
application: dotnet
needs: [apply-pull-request-infrastructure]
needs: [apply-infrastructure]

deploy-dotnet-application:
name: Deploy XPRTZ .NET application
if: github.event.action != 'closed'
uses: ./.github/workflows/reusable-deploy-application.yaml
with:
application: dotnet
storageAccount: ${{ needs.apply-pull-request-infrastructure.outputs.dotnetStorageAccount }}
resourceGroup: ${{ needs.apply-pull-request-infrastructure.outputs.resourceGroup }}
storageAccount: ${{ needs.apply-infrastructure.outputs.dotnetStorageAccount }}
resourceGroup: ${{ needs.apply-infrastructure.outputs.resourceGroup }}
environment: preview
needs: [apply-pull-request-infrastructure, build-dotnet-application]
needs: [apply-infrastructure, build-dotnet-application]
secrets: inherit

remove-infrastructure:
name: Remove preview environment infrastructure
if: github.event.action == 'closed'
uses: ./.github/workflows/reusable-destroy-infrastructure.yaml
with:
environment: preview
resourcegroup: ${{ needs.apply-pull-request-infrastructure.outputs.resourceGroup }}
needs: [apply-pull-request-infrastructure]
resourcegroup: ${{ needs.apply-infrastructure.outputs.resourceGroup }}
needs: [apply-infrastructure]
secrets: inherit

0 comments on commit 3a5b4ec

Please sign in to comment.