Skip to content

Commit

Permalink
add validation check back
Browse files Browse the repository at this point in the history
Co-authored-by: Sylvie <[email protected]>
Co-authored-by: pluckyswan <[email protected]>
  • Loading branch information
3 people committed Oct 4, 2024
1 parent cc3a1f2 commit 2bd14fa
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/functions-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ jobs:
# package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
# publish-profile: ${{ steps.getPublishProfile.outputs.PUBLISH_PROFILE }}

- name: 'Validate that Azure FunctionApp loaded Functions'
- name: 'Retrieve Azure FunctionApp loaded Functions'
run: |
az functionapp function list -g "csels-rsti-${{ inputs.TF_ENVIRONMENT }}-moderate-rg" -n "polling-function-${{ inputs.TF_ENVIRONMENT }}-test"
FUNCTION_LIST=$(az functionapp function list -g "csels-rsti-${{ inputs.TF_ENVIRONMENT }}-moderate-rg" -n "polling-function-${{ inputs.TF_ENVIRONMENT }}-test")
if [[ $FUNCTION_LIST == *"ResourceNotFound"*]]; then
FAIL=true
fi
echo "::add-mask::FAIL"
echo "FAIL" >> $GITHUB_OUTPUT
id: getFunctionList

- name: 'Azure FunctionApp Check'
if: steps.getFunctionList.outputs.FAIL == true
run: |
echo 'Azure FunctionApp Function is empty'
exit 1

0 comments on commit 2bd14fa

Please sign in to comment.