Skip to content

Commit

Permalink
Private CI/CD workflow improvements (#308)
Browse files Browse the repository at this point in the history
* post deploy delay null bugfix

Signed-off-by: Gordonby <gordon.byers@microsoft.com>

* adding delay step

* setting 2 min delay

* resetting upgrade channel

* trying backoff delay sleep

* Update ByoVnetPrivateCI.yml
  • Loading branch information
Gordon Byers authored Jun 24, 2022
1 parent 170329d commit 067b474
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/AppDeploy_AzureVote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ jobs:
az aks command invoke -g $RG -n $AKSNAME -o json --command "${command}"| jq -r ".logs"
- name: Wait for IP
env:
SLEEPSECONDS: 10
id: waitforip
run: |
Expand All @@ -198,15 +200,17 @@ jobs:
then
break 2
else
echo "going to wait another 10s [$counter] [$(date +"%T")]"
echo "going to wait another $(($SLEEPSECONDS*$counter))s [$counter] [$(date +"%T")]"
((counter++))
sleep 10
sleep $(($SLEEPSECONDS*$counter))
fi
done
echo "::set-output name=IPADDRESS::$ipAddress"
- name: Verify App is publicly reachable (from hosted GitHub runner)
env:
SLEEPSECONDS: 10
if: ${{ steps.installapp.outputs.ISPUBLIC}} = 'true'
run: |
ipAddress='${{ steps.waitforip.outputs.IPADDRESS}}'
Expand All @@ -223,9 +227,9 @@ jobs:
echo "200 response code received after $counter trys"
break 2
else
echo "going to wait another 15s [$counter] [$(date +"%T")]"
echo "going to wait another $(($SLEEPSECONDS*$counter))s [$counter] [$(date +"%T")]"
((counter++))
sleep 15
sleep $(($SLEEPSECONDS*$counter))
fi
done
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/ByoVnetPrivateCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,16 @@ jobs:
echo "::set-output name=LAWGUID::$LAWGUID"
- name: Post Deploy Delay
run: sleep ${{ github.event.inputs.postDeployDelay }}
run: |
if [ -z "${{ github.event.inputs.postDeployDelay }}" ]
then
echo "postDeployDelay parameter not available through GitHub event data, setting default"
DELAY="30s"
else
echo "postDeployDelay parameter found in GitHub event (${{ github.event.inputs.region }})"
DELAY="${{ github.event.inputs.postDeployDelay }}"
fi
sleep $DELAY
- name: Enable AGIC Addon
uses: Azure/cli@v1.0.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows_dep/AksDeploy-Private.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"value": true
},
"upgradeChannel": {
"value": "stable"
"value": "none"
},
"CreateNetworkSecurityGroups": {
"value": true
Expand Down

0 comments on commit 067b474

Please sign in to comment.