Skip to content
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

WIP: workflow #1771

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

WIP: workflow #1771

wants to merge 14 commits into from

Conversation

AP-Hunt
Copy link
Member

@AP-Hunt AP-Hunt commented Feb 12, 2025

What problem does this pull request solve?

Trello card:

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch 4 times, most recently from f64f9bd to 5a5f5d8 Compare February 13, 2025 10:00
@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch from 5a5f5d8 to 436d29f Compare February 13, 2025 10:54
@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch 7 times, most recently from 0278ec3 to 6af3fe0 Compare February 13, 2025 16:03
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.
@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch from 9b176fc to 99d5e3c Compare February 14, 2025 15:53
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.
@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch from d0a425e to ab50b2c Compare February 14, 2025 17:06
sarahseewhy and others added 2 commits February 17, 2025 11:18
* 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.
@sarahseewhy sarahseewhy force-pushed the review_apps_pr_workflow branch from d6bd7ae to 60a1bed Compare February 18, 2025 09:44
…-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.
@AP-Hunt AP-Hunt force-pushed the review_apps_pr_workflow branch from 60a1bed to 965cc9b Compare February 18, 2025 10:39
AP-Hunt and others added 4 commits February 18, 2025 11:01
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
Copy link

🎉 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
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants