diff --git a/.github/workflows/Bicep-CD-Tests.yml b/.github/workflows/Bicep-CD-Tests.yml index f40245a..ab8ad2d 100644 --- a/.github/workflows/Bicep-CD-Tests.yml +++ b/.github/workflows/Bicep-CD-Tests.yml @@ -27,7 +27,7 @@ jobs: with: files: '**/*.bicep' - Bicep-CD-Tests: + Bicep-CD-Tests-MG-Scope: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -52,4 +52,31 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az deployment mg create -f ./Bicep/modules/mg_main.bicep -l australiaeast -m PRODUCTION -p ./Bicep/modules/mg_main_params.json \ No newline at end of file + az deployment mg create -f ./Bicep/modules/mg_main.bicep -l australiaeast -m PRODUCTION -p ./Bicep/modules/mg_main_params.json + + Bicep-CD-Tests-Sub-Scope: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Azure Login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_PROD }} + - name: Bicep CD + id: bicepCD + continue-on-error: true + uses: azure/CLI@v1 + with: + inlineScript: | + az deployment sub create -f ./Bicep/modules/sub_main.bicep -l australiaeast -p ./Bicep/modules/sub_main_params.json --what-if + - name: Sleep for 30s + if: ${{ steps.bicepCD.outcome == 'failure' && steps.bicepCD.conclusion == 'success' }} + uses: juliangruber/sleep-action@v1 + with: + time: 30s + - name: Bicep CD Retry + if: ${{ steps.bicepCI.outcome == 'failure' && steps.bicepCD.conclusion == 'success' }} + uses: azure/CLI@v1 + with: + inlineScript: | + az deployment sub create -f ./Bicep/modules/sub_main.bicep -l australiaeast -p ./Bicep/modules/sub_main_params.json --what-if \ No newline at end of file diff --git a/.github/workflows/Bicep-CI-Tests.yml b/.github/workflows/Bicep-CI-Tests.yml index 62f364b..861dc32 100644 --- a/.github/workflows/Bicep-CI-Tests.yml +++ b/.github/workflows/Bicep-CI-Tests.yml @@ -25,7 +25,7 @@ jobs: with: files: '**/*.bicep' - Bicep-CI-Tests: + Bicep-CI-Tests-MG-Scope: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -50,4 +50,31 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az deployment mg create -f ./Bicep/modules/mg_main.bicep -l australiaeast -m PRODUCTION -p ./Bicep/modules/mg_main_params.json --what-if \ No newline at end of file + az deployment mg create -f ./Bicep/modules/mg_main.bicep -l australiaeast -m PRODUCTION -p ./Bicep/modules/mg_main_params.json --what-if + + Bicep-CI-Tests-Sub-Scope: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Azure Login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_PROD }} + - name: Bicep CI Tests + id: bicepCI + continue-on-error: true + uses: azure/CLI@v1 + with: + inlineScript: | + az deployment sub create -f ./Bicep/modules/sub_main.bicep -l australiaeast -p ./Bicep/modules/sub_main_params.json --what-if + - name: Sleep for 30s + if: ${{ steps.bicepCI.outcome == 'failure' && steps.bicepCI.conclusion == 'success' }} + uses: juliangruber/sleep-action@v1 + with: + time: 30s + - name: Bicep CI Retry + if: ${{ steps.bicepCI.outcome == 'failure' && steps.bicepCI.conclusion == 'success' }} + uses: azure/CLI@v1 + with: + inlineScript: | + az deployment sub create -f ./Bicep/modules/sub_main.bicep -l australiaeast -p ./Bicep/modules/sub_main_params.json --what-if \ No newline at end of file