Skip to content

Commit

Permalink
MLPAB-1513 - Do not allow End of Workflow to be skipped (#799)
Browse files Browse the repository at this point in the history
* end of workflow success if ui test successful else fail the deployment
  • Loading branch information
andrewpearce-digital authored Oct 25, 2023
1 parent e92266a commit 14c3e03
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/workflow_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
with:
run_against_image: true
tag: ${{ needs.create_tags.outputs.version_tag }}
smoke: ${{ contains(fromJSON('["MLPAB-1419-use-a-single-persistent-environment-for-weblate-changes-optimise-workflow", "weblate-pr"]'), github.head_ref) }}
smoke: ${{ contains(fromJSON('["weblate-pr"]'), github.head_ref) }}
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down Expand Up @@ -157,11 +157,8 @@ jobs:

end_of_pr_workflow:
name: End of PR Workflow
if: always() &&
needs.pr_deploy.result == 'success' &&
needs.create_tags.result == 'success' &&
needs.ui_tests_pr_env.result == 'success'
runs-on: ubuntu-latest
if: always()
environment:
name: "dev_${{ needs.create_tags.outputs.environment_workspace_name }}"
url: "https://${{ needs.pr_deploy.outputs.url }}"
Expand All @@ -172,3 +169,11 @@ jobs:
echo "${{ needs.pr_deploy.outputs.terraform_workspace_name }} PR environment tested, built and deployed"
echo "Tag Deployed: ${{ needs.pr_deploy.outputs.terraform_container_version }}"
echo "URL: https://${{ needs.pr_deploy.outputs.url }}"
if ${{ contains(needs.ui_tests_pr_env.result,'success') }}
then
echo "PR environment tested, built and deployed"
exit 0
else
echo "PR environment tested, built and deployed but UI tests failed"
exit 1
fi

0 comments on commit 14c3e03

Please sign in to comment.