Hackney Income Collection Service
Development
Installation
- Install Docker Community Edition
- Run
make setup
Serve the application
make serve
Run tests
make test
Run linter
"Linters" run static analysis on code to ensure it meets style standards. We use Rubocop on this project with a permissive configuration.
make lint
Adding gems
- Add your gem to the Gemfile.
- Run
make bundle
. This will update the Gemfile.lock, and rebuild the docker image.
Making changes
- Follow the instructions in Installation to get set up.
- Decide with your team on a small slice of work to pick up.
- Create a branch to work off. Name it appropriately.
git checkout -b my-cool-feature
- Develop with TDD!
- Commit your changes.
- Check your code style is good and tests are passing using
make check
- Make a pull request on the Github repo.
- Post a link in #team-collection-devs for review.
- Make any changes if necessary and get another review.
- Merge into master.
- Deploy to staging and test manually. Ask someone else to take a look as well, whether they're a developer, user or other team member.
- Deploy to production!
Deployment Pipeline
- Log in to CircleCI with Github and connect to the repo.
- Successful merges to the
master
branch are built automatically by CircleCI. - After a successful build, the application is automatically released to staging.
- After manually reviewing on staging, when you're happy to release to production, click to permit.
- The application will be automatically released to production.
The configuration for releasing changes is in .circleci/config.yml
Infrastructure
The staging and production applications are hosted on Heroku. You will need to talk to Rashmi Shetty to get added as a collaborator to the apps.
Static IP addresses
To communicate with the Hackney API, which is hosted on premises, we need whitelisted static IP addresses for the Heroku instances outbound traffic. They are provided by QuotaGuard Static as a Heroku addon, you can find them in the addon config.
User Access
Users log in via their Hackney Active Directory account. In order to log in, the user will need to be added to the Manage Arrears-Azure
group on Azure Active Directory. To get added to the group, contact one of the developers or maintainers on the contacts list.
There are three enterprise applications configured, one for each environment (dev, staging, production). These are all configured to use the same authentication group, so access to the group grants access to all environments.
Currently, users logging in will default to a base_user
and will not be assigned cases.
Notifications
SMS messages are sent using Gov Notify. Templates are configured there, request access permission from a member of the team. Permitted variables are gathered from a tenancy reference by the application. They include:
- title - Title of primary contact, e.g. "Mr."
- first name - First name of primary contact, e.g. "Richard"
- last name - Surname of primary contact, e.g. "Foster"
- full name - Full name with title of primary contact, e.g. "Mr. Richard Foster"
- formal name - Formal title and surname of primary contact, e.e. "Mr. Foster"
While developing, you can include yourself as a false tenancy to test communications by specifying the following environment variables:
DEVELOPER_TITLE=Miss
DEVELOPER_FIRST_NAME=Test
DEVELOPER_LAST_NAME=User
DEVELOPER_PHONE_NUMBER=01234 567890
DEVELOPER_EMAIL_ADDRESS=test@example.com
Scripts
- rails stub_data:scheduled_tasks - Creates scheduled tasks for developer tenancies locally.
Contacts
- Rashmi Shetty - Development Manager at Hackney (rashmi.shetty@hackney.gov.uk)
- Vladyslav Atamanyuk - Developer at Hackney (vladyslav.atamanyuk@hackney.gov.uk)
- Richard Foster - Lead Developer at Made Tech (richard@madetech.com)
- Steven Leighton - Developer at Made Tech (steven@madetech.com)
- Mark Rosel - Lead Developer at Made Tech (mark.rosel@madetech.com)
- Cormac Brady - Developer at Made Tech (cormac@madetech.com)
- Elena Vilimaitė - Developer at Made Tech (elena@madetech.com)