Skip to content

Latest commit

 

History

History
109 lines (79 loc) · 3.22 KB

File metadata and controls

109 lines (79 loc) · 3.22 KB

Evidence Management Annotation App

License: MIT Build Status codecov Codacy Badge Codacy Badge Known Vulnerabilities

Annotation API is a backend service to store and retrieve annotations.

Quickstart.

To clone repo and prepare to pull containers:

git clone https://github.com/hmcts/em-annotation-app.git
cd em-annotation-app/
brew install jq

Clean and build the application:

./gradlew clean
./gradlew build

To run the application locally:

Requires docker desktop running.

You need to be logged in to Azure and have access to the ACR registry to pull the necessary containers for the application to run. If you are not logged in, you can do so by running az login in your terminal. Followed by az acr login --name hmctsprod to log in to the ACR registry.

./gradlew bootWithCCD

and in another terminal window you can run functional tests

 ./gradlew functional

To remove docker containers after stopping the run:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -f status=exited -q)

Potential issues and solutions

Port 5000 is already in use on Monterey macs:

Disable AirPlay receiver

Authentication issues causing containers to not start:

docker logout hmctsprod.azurecr.io

Swagger UI

To view our REST API go to http://{HOST}/swagger-ui/index.html On local machine with server up and running, link to swagger is as below

http://localhost:8080/swagger-ui/index.html if running on AAT, replace localhost with ingressHost data inside values.yaml class in the necessary component, making sure port number is also removed.

API Endpoints

A list of our endpoints can be found here

https://hmcts.github.io/cnp-api-docs/swagger.html?url=https://hmcts.github.io/cnp-api-docs/specs/em-annotation-api.json

Running contract or pact tests:

You can run contract or pact tests as follows:

./gradlew clean
./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

Tech

It uses:

  • Java11
  • Spring boot
  • Junit, Mockito and SpringBootTest and Powermockito
  • Gradle
  • lombok project - Lombok project

Plugins

License

This project is licensed under the MIT License - see the LICENSE file for details