Gradle plugin to help integrate your project with judge-d in order to validate communication between microservices.
Add plugin to your project using plugins DSL:
plugins {
id "com.hltech.judged.contracts.publisher" version "1.0.5"
}
or legacy plugin application:
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.hltech:judge-d-contract-publisher-gradle-plugin:1.0.5"
}
}
apply plugin: "com.hltech.judged.contracts.publisher"
and run publishContracts
task:
./gradlew publishContracts
-PjudgeDLocation=https://judge-d-ui.herokuapp.com/
-Pcapabilities=rest
-PswaggerLocation=./build/swagger/
-Pexpectations=rest
-PpactsLocation=./build/pacts/
- judgeDLocation - url of judge-d instance to which you contracts will be uploaded (required)
- expectations - list of comma separated values which determines expectations of you service against providers
- capabilities - list of comma separated values which determines what capabalities your service expose
Neither expectations nor capabilities are required for now but nothing will be published in such case
Depending on what values you provide as expectations you also need to pass some additional parameters to make things work:
- pactsLocation - required for rest expectation, points to directory where pacts files are stored
- vauntLocation - required for jms expectation, points to directory where vaunt files are stored
Similar to expectations, you need to pass additional parameters for capabilities also:
- swaggerLocation - required for rest capability, points to directory where swagger specification is stored
- vauntLocation - required for jms capability, points to directory where vaunt files are stored
- judge-d-contract-publisher-maven-plugin - alternative plugin for Maven users
- judge-d - tool used to test contracts between microservices
- pact-gen - library for generating pact files out of Feign clients
- vaunt - toolkit to define and validate contracts in JMS