Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent merge when Heroku review app build fails

We are using Github + CircleCI + Heroku with automatic deploys setup.

From time to time there are deploy errors that are not captured by CI (deployment fails event though CI run is fine). We have review apps set up for all our PRs.

It would be great if the PR would indicate this and stop us from merging if the deployment of the review app fails (that usually means the deployment of the staging/production app would also fail).

I could not find any documentation on this. The only possible way I see is to use the GitHub API to add a custom check for this.

Anyone solved this issue?

like image 786
leifg Avatar asked Nov 07 '22 17:11

leifg


1 Answers

We have made a GitHub Action to test the deployment status of a Heroku Review App: https://github.com/marketplace/actions/heroku-review-app-deployment-status.

This can be used in the GitHub workflow to test the deployment status.

UPDATE: We wrote a nice blog post about different approaches to verify Review App deployment status.

Link: https://blog.niteo.co/staging-like-its-2020/

like image 189
Surya Teja Avatar answered Nov 15 '22 06:11

Surya Teja