From e8cfaa21da62640ba158702d25b1a90c9afa8967 Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Wed, 30 Oct 2024 23:01:43 -0400 Subject: [PATCH] need pause between deploy and validation It takes time for the deploy to complete and the health endpoint to reflect the new version. --- .github/workflows/app-build-and-deploy.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app-build-and-deploy.yml b/.github/workflows/app-build-and-deploy.yml index a4cb807..114c63a 100644 --- a/.github/workflows/app-build-and-deploy.yml +++ b/.github/workflows/app-build-and-deploy.yml @@ -137,17 +137,24 @@ jobs: azure-webapp-name: ${{ inputs.azure-app-base-name }}${{ inputs.azure-app-name-postfix }} image-name-with-tag: ${{ needs.build-and-publish-image.outputs.docker-image-name-with-tag }} + pause-between-primary-deploy-and-verification: + needs: deploy-primary-app-to-azure + runs-on: ubuntu-latest + steps: + - name: Pause for 3 minutes + run: sleep 180 # Sleep for 180 seconds (3 minutes) + verify-primary-app: name: Verify primary health endpoint if: ${{inputs.primary-verification-url != '' }} - needs: [get-version, deploy-primary-app-to-azure] + needs: [get-version, pause-between-primary-deploy-and-verification] runs-on: ubuntu-latest steps: - name: Checkout this repo uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'elr/verify-health' + ref: 'v3.1.2' path: 'operations' - name: Validate primary deploy id: validate-primary @@ -183,17 +190,24 @@ jobs: azure-webapp-name: ${{ inputs.azure-app-base-name }}${{ inputs.secondary-azure-app-name-postfix }} image-name-with-tag: ${{ needs.build-and-publish-image.outputs.docker-image-name-with-tag }} + pause-between-secondary-deploy-and-verification: + needs: deploy-secondary-app-to-azure + runs-on: ubuntu-latest + steps: + - name: Pause for 3 minutes + run: sleep 180 # Sleep for 180 seconds (3 minutes) + verify-secondary-app: name: Verify secondary health endpoint if: ${{ inputs.secondary-azure-app-name-postfix != '' && inputs.secondary-verification-url != '' }} - needs: [get-version, deploy-secondary-app-to-azure] + needs: [get-version, pause-between-secondary-deploy-and-verification] runs-on: ubuntu-latest steps: - name: Checkout this repo uses: actions/checkout@v4.1.1 with: repository: 'clearlydefined/operations' - ref: 'elr/verify-health' + ref: 'v3.1.2' path: 'operations' - name: Validate secondary deploy id: validate-secondary