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:

  1. Go to the Actions tab of the new repository on GitHub.
  2. Select Add service module from the list of available workflows on the left.
    Add new service module workflow
  3. Click the Run workflow ▾ button and enter the service name as handle-occurrence-service:
    Add new 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.

  4. 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.

Running workflow

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

Updated: