Giter Club home page Giter Club logo

hmc-cft-hearing-service's Introduction

hmc-cft-hearing-service

Getting Started

Please note that this microservice is also available within hmc-docker.

Prerequisites

Building and deploying the application

Building the application

The project uses Gradle as a build tool. It already contains ./gradlew wrapper script, so there's no need to install gradle.

To build the project execute the following command:

  ./gradlew build

Running the application

The easiest way to run the application locally is to use the bootWithCCD Gradle task.

This task requires:

  • Access to the hmc-demo key vault
  • Two queues on the hmc-servicesbus-demo Azure Service Bus
  • One topic on the hmc-servicebus-demo Azure Service Bus

See Creating Azure Service Bus Resources for detailed instructions on creating ASB resources.

Set required environment variables

The following environment variables need to be set for the created Azure Service Bus resources:

Environment Variable Description
HMC_OUTBOUND_SERVICE_BUS_QUEUE Outbound queue name
HMC_SERVICE_BUS_QUEUE Inbound queue name
HMC_SERVICE_BUS_TOPIC Topic name for publishing updates

Run the application

Run the application by executing the following command:

./gradlew bootWithCCD

This will start the application and its dependent services.

In order to test if the application is up, you can call its health endpoint:

  curl http://localhost:4561/health

You should get a response similar to this:

{"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}

Alternative to running the application

Create the image of the application by executing the following command:

  ./gradlew assemble

Create docker image:

  docker-compose build

Run the distribution (created in build/install/hmc-cft-hearing-service directory) by executing the following command:

  docker-compose up

This will start the API container exposing the application's port (set to 4561 in this template app).

In order to test if the application is up, you can call its health endpoint:

  curl http://localhost:4561/health

You should get a response similar to this:

{"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}

Developing

Unit tests

To run all unit tests execute the following command:

  ./gradlew test

Integration tests

To run all integration tests execute the following command:

  ./gradlew integration

Running contract or pact tests:

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

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

And then using gradle task:

./gradlew runAndPublishConsumerPactTests

Run below command for the provider pact verification:

./gradlew clean runProviderPactVerification

Alternatively you can run single command for both consumer tests and provider verifications

./gradlew clean contract

Code quality checks

We use Checkstyle. To run all local checks execute the following command:

  ./gradlew check

License

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

hmc-cft-hearing-service's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

duranfatih

hmc-cft-hearing-service's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • Update actions/cache action to v4
  • Update actions/checkout action to v4
  • Update actions/setup-java action to v4
  • Update dependency com.fasterxml.woodstox:woodstox-core to v6
  • Update dependency com.github.hmcts:befta-fw to v20
  • Update dependency com.github.hmcts:service-auth-provider-java-client to v5
  • Update dependency com.github.tomakehurst:wiremock to v3
  • Update dependency net.logstash.logback:logstash-logback-encoder to v7
  • Update dependency org.flywaydb:flyway-core to v10
  • Update dependency org.mockito:mockito-inline to v5
  • Update eclipse-temurin Docker tag to v21
  • Update hmctspublic.azurecr.io/base/java Docker tag to v21
  • Update io.rest-assured:4.3.3 to v5 (major) (io.rest-assured:xml-path, io.rest-assured:json-path)
  • Update org.apache.tomcat.embed:9.0.85 to v10 (major) (org.apache.tomcat.embed:tomcat-embed-websocket, org.apache.tomcat.embed:tomcat-embed-el, org.apache.tomcat.embed:tomcat-embed-core)
  • Update plugin org.sonarqube to v4
  • Update plugin org.springframework.boot to v3
  • Update postgres Docker tag to v16
  • Update spring cloud to v4 (major) (org.springframework.cloud:spring-cloud-starter-contract-stub-runner, org.springframework.cloud:spring-cloud-starter-openfeign)
  • Update stefanzweifel/git-auto-commit-action action to v5
  • Update tibdex/github-app-token action to v2
  • Update versions.restAssured to v5 (major) (io.rest-assured:xml-path, io.rest-assured:json-path, io.rest-assured:rest-assured)
  • Update versions.tomcatEmbedded to v10 (major) (org.apache.tomcat.embed:tomcat-embed-websocket, org.apache.tomcat.embed:tomcat-embed-el, org.apache.tomcat.embed:tomcat-embed-core)
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • Update All patch-minor dependencies (azurerm, gradle, hashicorp/terraform, java, postgres, com.github.hmcts:fortify-client, org.postgresql:postgresql, com.github.hmcts:befta-fw, net.minidev:json-smart, com.github.tomakehurst:wiremock, org.mockito:mockito-inline, org.springframework.cloud:spring-cloud-starter-contract-stub-runner, commons-io:commons-io, org.springframework.security:spring-security-rsa, org.springframework.cloud:spring-cloud-starter-openfeign, com.azure:azure-core, com.azure:azure-messaging-servicebus, org.mapstruct:mapstruct-processor, org.mapstruct:mapstruct-jdk8, com.nimbusds:nimbus-jose-jwt, org.flywaydb:flyway-core, org.apache.commons:commons-collections4, org.apache.commons:commons-lang3, com.github.hmcts:ccd-test-definitions, io.jsonwebtoken:jjwt, ch.qos.logback:logback-core, ch.qos.logback:logback-classic, org.apache.tomcat.embed:tomcat-embed-websocket, org.apache.tomcat.embed:tomcat-embed-el, org.apache.tomcat.embed:tomcat-embed-core, io.rest-assured:xml-path, io.rest-assured:json-path, com.fasterxml.jackson.core:jackson-core, com.fasterxml.jackson.core:jackson-annotations, com.fasterxml.jackson.core:jackson-databind, io.netty:netty-transport-classes-kqueue, io.netty:netty-transport-classes-epoll, io.netty:netty-resolver-dns-classes-macos, io.netty:netty-transport-native-unix-common, io.netty:netty-transport-native-kqueue, io.netty:netty-transport-native-epoll, io.netty:netty-transport, io.netty:netty-resolver-dns-native-macos, io.netty:netty-resolver-dns, io.netty:netty-resolver, io.netty:netty-handler-proxy, io.netty:netty-handler, io.netty:netty-common, io.netty:netty-codec-socks, io.netty:netty-codec-http2, io.netty:netty-codec-http, io.netty:netty-codec-dns, io.netty:netty-codec, io.netty:netty-buffer, org.testcontainers:postgresql, io.rest-assured:rest-assured, com.microsoft.azure:applicationinsights-spring-boot-starter, com.microsoft.azure:applicationinsights-logging-logback, com.github.hmcts.java-logging:logging, au.com.dius.pact.provider:junit5spring, au.com.dius.pact.provider:spring, au.com.dius.pact.provider:junit5, au.com.dius.pact.consumer:junit5, org.mapstruct:mapstruct, org.junit.platform:junit-platform-engine, org.junit.platform:junit-platform-commons, org.junit.jupiter:junit-jupiter-params, org.junit.jupiter:junit-jupiter-engine, org.junit.jupiter:junit-jupiter-api, jacoco, com.github.hmcts.rse-cft-lib, au.com.dius.pact, uk.gov.hmcts.java, org.sonarqube, com.github.ben-manes.versions, org.springframework.boot, io.spring.dependency-management)
  • Update Terraform azuread to v2
  • Update dependency gradle to v8
  • Click on this checkbox to rebase all open PRs at once

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • eclipse-temurin 17
  • hmctspublic.azurecr.io/base/java 17-distroless
docker/database/Dockerfile
  • postgres 11.8
github-actions
.github/workflows/dependency-check.yml
  • tibdex/github-app-token v1
  • actions/checkout v3
  • actions/cache v3
  • actions/setup-java v3
  • stefanzweifel/git-auto-commit-action v4
.github/workflows/swagger.yml
  • actions/checkout v1
  • actions/cache v1
  • actions/setup-java v1
gradle
settings.gradle
build.gradle
  • io.spring.dependency-management 1.0.11.RELEASE
  • org.springframework.boot 2.5.15
  • com.github.ben-manes.versions 0.39.0
  • org.sonarqube 3.3
  • uk.gov.hmcts.java 0.12.55
  • com.github.spacialcircumstances.gradle-cucumber-reporting 0.1.25
  • au.com.dius.pact 4.1.7
  • com.github.hmcts.rse-cft-lib 0.19.963
  • jacoco 0.8.8
  • com.google.guava:guava 33.0.0-jre
  • io.rest-assured:json-path 4.3.3
  • io.rest-assured:xml-path 4.3.3
  • org.apache.tomcat.embed:tomcat-embed-core 9.0.85
  • org.apache.tomcat.embed:tomcat-embed-el 9.0.85
  • org.apache.tomcat.embed:tomcat-embed-websocket 9.0.85
  • com.fasterxml.jackson.core:jackson-databind 2.16.1
  • com.fasterxml.jackson.core:jackson-annotations 2.16.1
  • com.fasterxml.jackson.core:jackson-core 2.16.1
  • org.junit.jupiter:junit-jupiter-api 5.7.2
  • org.junit.jupiter:junit-jupiter-engine 5.7.2
  • org.junit.jupiter:junit-jupiter-params 5.7.2
  • org.junit.platform:junit-platform-commons 1.7.2
  • org.junit.platform:junit-platform-engine 1.7.2
  • com.fasterxml.woodstox:woodstox-core 5.4.0
  • io.springfox:springfox-boot-starter 3.0.0
  • com.github.hmcts.java-logging:logging 6.0.1
  • com.microsoft.azure:applicationinsights-logging-logback 2.4.1
  • com.microsoft.azure:applicationinsights-spring-boot-starter 2.4.1
  • net.logstash.logback:logstash-logback-encoder 6.6
  • ch.qos.logback:logback-classic 1.2.13
  • ch.qos.logback:logback-core 1.2.13
  • org.glassfish.web:el-impl 2.2.1-b05
  • org.glassfish:jakarta.el 4.0.2
  • javax.el:javax.el-api 3.0.1-b06
  • com.github.hmcts:service-auth-provider-java-client 4.1.2
  • com.github.hmcts:idam-java-client 3.0.3
  • javax.inject:javax.inject 1
  • io.jsonwebtoken:jjwt 0.9.1
  • net.minidev:json-smart 2.4.11
  • com.github.hmcts:ccd-test-definitions 7.19.12
  • com.github.hmcts:befta-fw 8.7.11
  • org.apache.commons:commons-lang3 3.7
  • org.apache.commons:commons-collections4 4.1
  • org.flywaydb:flyway-core 7.7.0
  • org.mapstruct:mapstruct 1.4.2.Final
  • org.mapstruct:mapstruct-processor 1.4.2.Final
  • com.nimbusds:nimbus-jose-jwt 9.25.6
  • org.mapstruct:mapstruct-jdk8 1.3.1.Final
  • org.projectlombok:lombok 1.18.30
  • org.mapstruct:mapstruct-processor 1.3.1.Final
  • org.projectlombok:lombok 1.18.30
  • org.projectlombok:lombok-mapstruct-binding 0.2.0
  • org.mapstruct:mapstruct-processor 1.3.1.Final
  • org.projectlombok:lombok 1.18.30
  • org.projectlombok:lombok-mapstruct-binding 0.2.0
  • com.azure:azure-messaging-servicebus 7.8.0
  • com.azure:azure-core 1.45.1
  • org.apache.tomcat.embed:tomcat-embed-core 9.0.85
  • org.apache.tomcat.embed:tomcat-embed-el 9.0.85
  • org.apache.tomcat.embed:tomcat-embed-websocket 9.0.85
  • io.netty:netty-buffer 4.1.106.Final
  • io.netty:netty-codec 4.1.106.Final
  • io.netty:netty-codec-dns 4.1.106.Final
  • io.netty:netty-codec-http 4.1.106.Final
  • io.netty:netty-codec-http2 4.1.106.Final
  • io.netty:netty-codec-socks 4.1.106.Final
  • io.netty:netty-common 4.1.106.Final
  • io.netty:netty-handler 4.1.106.Final
  • io.netty:netty-handler-proxy 4.1.106.Final
  • io.netty:netty-resolver 4.1.106.Final
  • io.netty:netty-resolver-dns 4.1.106.Final
  • io.netty:netty-resolver-dns-native-macos 4.1.106.Final
  • io.netty:netty-transport 4.1.106.Final
  • io.netty:netty-transport-native-epoll 4.1.106.Final
  • io.netty:netty-transport-native-kqueue 4.1.106.Final
  • io.netty:netty-transport-native-unix-common 4.1.106.Final
  • org.springframework.cloud:spring-cloud-starter-openfeign 3.0.8
  • org.springframework.security:spring-security-rsa 1.0.12.RELEASE
  • org.yaml:snakeyaml 2.2
  • io.projectreactor.netty:reactor-netty-core 1.1.15
  • io.projectreactor.netty:reactor-netty-http 1.1.15
  • io.netty:netty-resolver-dns-classes-macos 4.1.106.Final
  • io.netty:netty-transport-classes-epoll 4.1.106.Final
  • io.netty:netty-transport-classes-kqueue 4.1.106.Final
  • commons-fileupload:commons-fileupload 1.5
  • commons-io:commons-io 2.8.0
  • org.mockito:mockito-inline 3.11.1
  • org.springframework.cloud:spring-cloud-starter-contract-stub-runner 3.1.0
  • org.mockito:mockito-inline 3.11.1
  • org.powermock:powermock-api-mockito2 2.0.9
  • org.powermock:powermock-module-junit4 2.0.9
  • io.rest-assured:rest-assured 4.2.1
  • io.rest-assured:json-path 4.2.1
  • io.rest-assured:xml-path 4.2.1
  • au.com.dius.pact.consumer:junit5 4.1.7
  • au.com.dius.pact.provider:junit5 4.1.7
  • au.com.dius.pact.provider:spring 4.1.7
  • au.com.dius.pact.provider:junit5spring 4.1.7
  • com.github.tomakehurst:wiremock 2.27.2
  • org.testcontainers:postgresql 1.15.3
  • net.minidev:json-smart 2.4.7
  • com.github.hmcts:befta-fw 8.7.11
  • org.postgresql:postgresql 42.5.1
  • com.github.hmcts:fortify-client 1.2.0
gradle/suppress.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 7.6
helm-values
charts/hmc-cft-hearing-service/values.yaml
helmv3
charts/hmc-cft-hearing-service/Chart.yaml
  • java 5.0.0
  • servicebus 1.0.4
terraform
infrastructure/main.tf
infrastructure/state.tf
  • azuread 1.6.0
  • azurerm ~> 3.76.0
terraform-version
infrastructure/.terraform-version
  • hashicorp/terraform 1.3.9

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.