Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas committed Dec 11, 2024
1 parent be2e40e commit fc0d4da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/ci-cd-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,35 @@ jobs:
with:
environment: "test"

dry-run-deploy-apps:
name: Dry run deploy apps
dry-run-deploy-infra:
name: Dry run deploy infrastructure
uses: ./.github/workflows/workflow-deploy-infra.yml
needs:
[
get-current-version,
check-for-changes,
generate-git-short-sha,
check-for-changes,
get-current-version,
build-infrastructure,
]
# we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps
if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasMigrationChanges == 'true') }}
uses: ./.github/workflows/workflow-deploy-apps.yml
if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
AZURE_SERVICE_BUS_NAMESPACE_NAME: ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }}
AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }}
AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }}
AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }}
AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }}
with:
environment: test
region: norwayeast
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }}
runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}
dryRun: true
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }}

delete-github-deployments:
name: Delete GitHub deployments
uses: ./.github/workflows/workflow-delete-deployments.yml
needs: [dry-run-deploy-apps]
needs: [dry-run-deploy-infra]
if: ${{ always() && !failure() && !cancelled() }}
with:
gitSha: ${{ github.event.pull_request.head.sha }}
4 changes: 4 additions & 0 deletions .github/workflows/workflow-deploy-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Upgrade bicep
run: |
az bicep upgrade
- name: Fetch secret keys from source Azure Key Vault
uses: azure/CLI@v2
id: keyvault-keys
Expand Down

0 comments on commit fc0d4da

Please sign in to comment.