-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions workflow for review apps #1771
Conversation
d0a425e
to
ab50b2c
Compare
d6bd7ae
to
60a1bed
Compare
60a1bed
to
965cc9b
Compare
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready |
9fc95d3
to
a1eb5ad
Compare
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready |
a1eb5ad
to
59dae37
Compare
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready |
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For more details please see the review app wiki page |
Refactors the review apps GitHub Actions workflow to build the container image on a hosted GitHub Actions runner, to take advantage of the image caches.
We removed the dependency on factory bot for seed data, so we no longer need to install it inside the container before starting up.
When the PR closes (either by merging, or closing withotu merging), the review app needs to be cleaned up.
Once a deployment is complete, we want to leave a comment on the PR telling them where to find the review app.
* Add label to enable Traefik basic authentication * Credentials are configured in forms-deploy
We were previously using the Postgres 13.12 image from docker.io, but we routinely hit issues with being rate limited by it. To avoid that, we use Amazon's own registry, which contains mirrored images from docker.io, without rate limits.
…-review-app job When we built it in a separate job, we found that the container was faulty in some way. In forms-deploy we have now configured CodeBuild to have Docker Hub credentials, so the rate limits are not a concern anymore.
We want to make sure that the tag applied to the container being built in the workflow is unique on each run, so that a re-run of a failed workflow will result in a new container. There are many reasons for failure, and sometimes we want the container to be built afresh.
In Traefik's configuration model, middlewares must be explicitly attached to routers. We had not done that.
* Point Forms API base URL to localhost and configured port (9292) since tasks share the same network
* Use `html_url` which is the human readable version, `url` points to the GitHub API friendly URL * Add link to review app URL
Write access to pull requests is needed for leaving comments. This is accompanied by ADR041.
We can easily wait for the deployment to finish before leaving a comment to say it's ready.
9741969
to
31e0d47
Compare
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For more details please see the review app wiki page |
|
🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1771.review.forms.service.gov.uk/. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For more details please see the review app wiki page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing immediately stands out as needing to change, although we did pair on this quite a bit so maybe a fresh pair of eyes would be useful.
🪄
What problem does this pull request solve?
Trello card: https://trello.com/c/veseFayX/581-github-actions-workflows-for-managing-review-apps
Implements the GitHub Actions workflows needed for the full lifecycle of a
forms-admin
review app. This is a large pull request necessarily, because it combines multiple streams of work that came before it, and addresses any and all integration problems that arise.@sarahseewhy and I have paired on this extensively.
Things to consider when reviewing