Skip to content

Repo replacing the existing hmcts/iac-bails-case-api. That has been marked as read only

License

Notifications You must be signed in to change notification settings

hmcts/ia-bail-case-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ia-bail-case-api

Immigration & Asylum Bail case API

Build Status

Purpose

Immigration & Asylum case API is a Spring Boot based application for Legal Representatives to manage bail applications.

Prerequisites

To run the project you will need to have the following installed:

  • Java 17
  • Docker (optional)

For information about the software versions used to build this API and a complete list of it's dependencies see build.gradle

Running the application

To run the API quickly use the docker helper script as follows: (make sure to have the required environment variables set as under functional tests section)

./bin/run-in-docker.sh --clean --install

Alternatively, you can start the application from the current source files using Gradle as follows:

./gradlew clean bootRun

If required, to run with a low memory consumption, the following can be used:

./gradlew --no-daemon assemble && java -Xmx384m -jar build/libs/ia-bail-case-*.jar

Using the application

To understand if the application is working, you can call it's health endpoint:

curl http://localhost:8686/health

If the API is running, you should see this response:

{"status":"UP"}

Running integration tests:

You can run the integration tests as follows:

./gradlew integration

Running functional tests:

If the API is running (either inside a Docker container or via gradle bootRun) you can run the functional tests as follows:

./gradlew functional

Running smoke tests:

If the API is running (either inside a Docker container or via gradle bootRun) you can run the smoke tests as follows:

./gradlew smoke

Running contract or pact tests:

You can run contract or pact tests as follows:

./gradlew contract

You can then publish your pact tests locally by first running the pact docker-compose:

docker-compose -f docker-pactbroker-compose.yml up

and then using it to publish your tests:

./gradlew pactPublish

Adding Git Conventions

Include the git conventions.

  • Make sure your git version is at least 2.9 using the git --version command
  • Run the following command:
git config --local core.hooksPath .git-config/hooks

Once the above is done, you will be required to follow specific conventions for your commit messages and branch names.

If you violate a convention, the git error message will report clearly the convention you should follow and provide additional information where necessary.

Optional:

  • Install this plugin in Chrome: https://github.com/refined-github/refined-github

    It will automatically set the title for new PRs according to the first commit message, so you won't have to change it manually.

    Note that it will also alter other behaviours in GitHub. Hopefully these will also be improvements to you.

In case of problems

  1. Get in touch with your Technical Lead and inform them, so they can adjust the git hooks accordingly

  2. Instruct IntelliJ not to use Git Hooks for that commit or use git's --no-verify option if you are using the command-line

  3. If the rare eventuality that the above is not possible, you can disable enforcement of conventions using the following command

    git config --local --unset core.hooksPath

    Still, you shouldn't be doing it so make sure you get in touch with a Technical Lead soon afterwards.

About

Repo replacing the existing hmcts/iac-bails-case-api. That has been marked as read only

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages