Add a microservice
With a fresh new repository ready for use, the next step is to add a service module to the repository.
ProTip: Each microservice has its own Gradle subproject a.k.a. module.
Setting up a new service manually can be a lengthy process.
Luckily, the aggregate-tempalate
comes with automated ways of adding a new services:
- Go to the
Actions
tab of the new repository on GitHub. - Select
Add service module
from the list of available workflows on the left. - Click the
Run workflow ▾
button and enter the service name ashandle-occurrence-service
:Note: Service names must be lowercase. Only alphanumerics and dashes are supported.
ProTip: End your service names with
-service
to make it clear the module contains a microservice. - Click the Run workflow button below the service name.
This will kick off a workflow that adds the new module, containing the boilerplate code for a new service, though the page may need refreshing to view it.
ProTip: This workflow run will commit the new service’s code directly to the main
branch.
This is incompatible with GitHub branch protect rules .
See the Aggregate template’s docs
for alternatives compatible with branch protection.
Wait for the workflow to complete and pull down the changes to your local machine by running:
git pull