Skip to content

Commit

Permalink
Update lza-deployment.yml
Browse files Browse the repository at this point in the history
removed tear down option as it is breaking the pipeline
  • Loading branch information
kpantos authored Mar 26, 2024
1 parent a63d4fd commit 1787c48
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/lza-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,39 +97,39 @@ jobs:
spokeResourceGroupName: ${{ steps.deployment.outputs.spokeResourceGroupName }}
hubResourceGroupName: ${{ steps.deployment.outputs.hubResourceGroupName }}

teardown:
runs-on: ubuntu-latest
needs: [deploy]
env:
ENABLE_TEARDOWN: true
# teardown:
# runs-on: ubuntu-latest
# needs: [deploy]
# env:
# ENABLE_TEARDOWN: true

steps:
- uses: trstringer/manual-approval@v1
name: Manual Approval of tear-down
if: vars.ENABLE_TEARDOWN == 'true'
with:
secret: ${{ github.TOKEN }}
timeout-minutes: 120
approvers: thotheod,aarthiem,kpantos
minimum-approvals: 1
issue-title: "Deployed ACA-LZA GitHubAction-${{ github.run_number }}"
issue-body: "Please approve or deny the tear-down of deployment GitHubAction-${{ github.run_number }}"
exclude-workflow-initiator-as-approver: false
additional-approved-words: ''
additional-denied-words: ''
# steps:
# - uses: trstringer/manual-approval@v1
# name: Manual Approval of tear-down
# if: vars.ENABLE_TEARDOWN == 'true'
# with:
# secret: ${{ github.TOKEN }}
# timeout-minutes: 120
# approvers: thotheod,aarthiem,kpantos
# minimum-approvals: 1
# issue-title: "Deployed ACA-LZA GitHubAction-${{ github.run_number }}"
# issue-body: "Please approve or deny the tear-down of deployment GitHubAction-${{ github.run_number }}"
# exclude-workflow-initiator-as-approver: false
# additional-approved-words: ''
# additional-denied-words: ''

- uses: azure/login@v1
if: vars.ENABLE_TEARDOWN == 'true'
name: Sign in to Azure
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# - uses: azure/login@v1
# if: vars.ENABLE_TEARDOWN == 'true'
# name: Sign in to Azure
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: Azure/cli@v1
name: Run tear-down
if: vars.ENABLE_TEARDOWN == 'true'
with:
azcliversion: 2.45.0
inlineScript: |
az group delete --name ${{ needs.deploy.outputs.spokeResourceGroupName }} --yes
az group delete --name ${{ needs.deploy.outputs.hubResourceGroupName }} --yes
az deployment sub delete --name "GitHubAction-${{ github.run_number }}" --no-wait
# - uses: Azure/cli@v1
# name: Run tear-down
# if: vars.ENABLE_TEARDOWN == 'true'
# with:
# azcliversion: 2.45.0
# inlineScript: |
# az group delete --name ${{ needs.deploy.outputs.spokeResourceGroupName }} --yes
# az group delete --name ${{ needs.deploy.outputs.hubResourceGroupName }} --yes
# az deployment sub delete --name "GitHubAction-${{ github.run_number }}" --no-wait

0 comments on commit 1787c48

Please sign in to comment.