WowServicePlugin

class WowServicePlugin : Plugin<Project>

me.ahoo.wow.service: builds a service module (ServiceRole.service): the domain role of me.ahoo.wow on its own sources (the processors, routes and models it declares; nothing when it declares none), and the service's Manifest:

  • WowPlugin.MERGE_TASK (MergeManifest) merges every fragment on the runtime class path into build/wow/manifest.json, failing on two fragments of one name; the service is the one the contracts of its contexts name, its own wow { service } included, which must agree, else it is named after the project path; its version is the project's;

  • WowPlugin.OPENAPI_TASK (GenerateOpenApi) writes the OpenAPI document of that Manifest's routes into build/wow/openapi.json;

  • WowPlugin.HELM_VALUES_TASK (GenerateHelmValues) writes the values of the wow-service Helm chart the build knows into build/wow/helm/values.yaml: the service's name, the peers whose contracts are on its runtime class path, and the route of its Manifest; the deployment's own values go in a file passed after it;

  • WowPlugin.CHECK_TASK (CheckManifestCompatibility), part of check, compares the merged Manifest with the committed baseline (manifest/baseline.json, WowServiceExtension.manifestBaseline) and fails, naming WowPlugin.UPDATE_BASELINE_TASK, when there is none, on a breaking change within the baseline's compatibility line (the service's major; a later major, or a pre-release of a major's first version, may break it), and when the baseline does not record this build's Manifest; WowPlugin.UPDATE_BASELINE_TASK (UpdateManifestBaseline) records the merged Manifest, without its version, on the line of its major, refusing a break within the line unless WowPlugin.ALLOW_BREAKING_PROPERTY is set. The service publishes no Manifest: its contract is the committed baseline;

  • registers the test suite WowPlugin.INTEGRATION_TEST for the tests that run on containers, outside check, unless the build set up a suite or a source set of that name before.

A single-module project, the quickstart's, applies this plugin alone: the module is its domain and its service. It has no api role: a service whose peers compile against its contract splits its commands and events into an api module (me.ahoo.wow.api).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun apply(project: Project)