The search service is based on elasticsearch software to index and retrieve data in the database.
To implement new features, improvements, or bug fixes, you have to need to start an instance of Elasticsearach.
- First, you can use the
elasticsearch.ymlfile located in the/src/main/dockerfolder using this command:
docker compose -f elasticsearch.yml up -dNote
You can use the .env file in the /src/main/docker folder to set elastic variables (i.e. elastic version, username, or password).
- Second, use maven command after changing the code.
To clean and install
mvn clean installor to start the search
mvn spring-boot:runIf there are no errors you can check the search via Swagger APIs at this link:
http://localhost:8080/swagger-ui/index.html#/Tip
In the Swagger endpoint it's possible to check the current version of the search software.
To test the new improvements in the code, after creating a new docker image of the search (see details), you can use this command:
docker compose -f search-compose.yml up -dNote
You can use the .env file in the /src/main/docker folder to set search variables (i.e. search version, log level, or tmforum url).
Check the new changes using the link:
http://localhost:8080/swagger-ui/index.html#/Before to push the new code in the GitHub repository, please make the following steps:
- upgrade the new version of the software in the
pom.xmlfile. - set the same version above in the
.envfile for theSEARCH_VERSIONvariable. - update the release notes file by including the new version and listing features, improvements, bug fixes, etc.
- push the code in the
mainbranch to build and test the new software. - align both harbor and dockerhub to create docker images.
Important
It's important to note the version in the pom.xml file can be with or without SNAPSHOT postfix. This postfix will be omitted in the creation of the docker image.
To create a new docker image you have to merge your code in the branch:
- harbor - to push a new docker image in a private Harbor (at https://production.eng.it:8433/harbor)
- dockerhub - to push a new docker image in Docker Hub
Tip
The main branch is used to build and test the software.
Warning
The develop branch is used to save and share code in the repository.
Caution
In general, all branches must be aligned with the same code.