This document describes how to develop and add features to the Bank of Sirius application in your local environment.
- A clone of this repository.
- A linux build environment.
You can use MacOS or Linux as your dev environment - all these languages and tools support both.
- Docker
- GNU Make 4.x
- JDK 8 (newer versions might cause issues)
- Maven 3.6 (newer versions might cause issues)
The following code block shows the valid targets for the make process. Most of these options are self-explanatory, but
to completely build the application one can run make docker-all-images
. To push the new versions to the defined
registry, you can run make release
. Note that this assumes you have the appropriate permissions to push to the defined
registry.
checkstyle Run all code style checks
clean Cleanup everything
docker-all-images Build all container images
docker-base-images Build base images inherited by other images
docker-db-images Build database container images
docker-java-images Build Java container images
docker-python-images Build Python container images
java-build Builds all Java applications
java-checkstyle Java code style check
java-test Runs unit tests for all Java applications
java-test-coverage Creates test coverage reports for all Java applications
java-test-coverage-summary Shows a summary of the test coverage reports for all Java applications
python-checkstyle Python code style check
python-preproc-requirements Run pip-compile for all requirements.in files
python-test Runs unit tests for all Python applications
python-test-coverage Creates test coverage reports for all Python applications
release Release container images to registry
test Run all automated tests
update-manifests Updates Kubernetes manifest files to use the current deployment version
version Outputs the current version
version-update Prompts for a new version
If you're adding a new feature that requires a new external Python package in one or more services (frontend
, contacts
, userservice
), you must regenerate the requirements.txt
file using piptools
. This is what the Python
Dockerfiles use to install external packages inside the containers.
To add a package:
-
Add the package name to
requirements.in
within thesrc/<service>
directory: -
Then run the make target
python-preproc-requirements
. This will transform all Python projects'requirements.in
files torequirements.txt
if there have been changes to therequirements.in
file. -
Re-run
make
with the appropriate target for your build. To build just the python packages you can runmake docker-python-images
If you're adding a new feature to one or more of the Java services (ledgerwriter
, transactionhistory
, balancereader
) and require a new third-party package, do the following:
- Add the package to the
pom.xml
file in thesrc/<service>
directory, under<dependencies>
. You can find specific package info in Maven Central (example) . Example:
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
- Re-run
make
with the appropriate target for your build. To build just the java packages you can runmake docker-java-images
Github actions are used for continuous integration (CI) for this project. Due to time constrains we have been unable to reimplement the UI tests and deployment tests in the fork.