Staging builds on PRs

I’d want to setup a system where I would make a PR on github (to a web project) and, if the PR gets built and passes the test suite (mix test), a new “endpoint” behind basic auth appears like https://<commit sha>.example.net. Do you think it’s practical?

A variable subdomain probably won’t work with let’s encrypt …

sure - btw lets encrypt will support wildcard certs from end of month - https://letsencrypt.org/2017/07/06/wildcard-certificates-coming-jan-2018.html

3 Likes

I think Netlify supports this, however I’m not sure if it’d work on a non-static app.

This is precisely how review apps work on Heroku. A new app is created for each PR, either automatically or manually.

The apps have a dynamic address and support encrypted traffic by default. Convenient, if you aren’t coordinating multiple services (and can use Heroku).