Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 2.45 KB

README.md

File metadata and controls

65 lines (40 loc) · 2.45 KB

Goal List API

Build Quality Gate Status

This repository contains a Goal List API implemented with Spring Framework (Java).

If you want to use SonarQube analysis instead of SonarCloud, change to sonarqube branch.

Moreover, you can see some information clicking on the above badges.

Content

Prerequisites

  • Java (version 11)
  • Docker compose (optional)
  • Gradle

How to Install and to Run

In your computer, run the following commands to clone in your local machine:

$ git clone https://github.com/Samuellucas97/Goal-List-CI-CD  
$ cd Goal-List-CI-CD

After this, we need to start database service. We will use Docker technology to do this. But you can use whatever database service you want. Otherwise, it's very important to have the same configuration used in application.yaml.

We are setting the file src/main/resource/application.yaml as following:

  • Database name: goal_list
  • Database user: root
  • Database password: root

Running database service with Docker compose (optional)

Since you have installed Docker compose, just execute the following instruction at terminal:

$ docker-compose up -d

It will be generated a database service container according docker-compose.yaml.

Running application

Since you have a database running in you local machine, you have the following set of available commands:

Command Information
To run the application on port 8080 ./gradlew bootRun
to run unit tests ./gradlew clean test --info
To run integration tests ./gradlew clean integration --info
To run JaCoCo analysis ./gradlew jacocoTestReport
to generate project's build ./gradlew clean build --info

Moreover, you can find the available endpoint documentation in http://localhost:8080/swagger-ui.html