Runs zally linter as gradle task and export the report in different format.
- no need to host and maintain zally server
- export violation reports into different file format (json, html)
- setup rules to define max number of violation allowed in the spec for each severity
- Integrate zally as part of your build task for faster feedback
- no external dependency like nodejs or go for running webUI and CLI
./gradlew clean build publishToMavenLocal
After that you are able to use/apply that plugin (even in this project) like this:
// settings.gradle.kts
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
}
}
// build.gradke.kts
plugins {
id("io.github.thiyagu06") version "1.0.2-dev"
}
zallyLint {
inputSpec = File("${projectDir}/docs/petstore-spec.yml")
reports {
json {
enabled = true
destination = File("${rootDir}/zally/violation.json")
}
rules {
must {
max = 10
}
}
}
}
//execute task
./gradlew clean zallyLint
Releasing to maven central is automated via circleci. Since this is public project, I disabled few environment variables in circleci to prevent access to nexus credentials.
- Create a separate branch with a name
release-<release-version>
. - Update current version in
server/gradle.properties
from-dev
to a final version. - Commit
server/gradle.properties
with the release version - Push the changes to remote origin.
git push origin `release-<release-version>`
- create PR towards main branch and wait till circleci complete the
build
andrelease
step. - Go to https://app.circleci.com/ and approve the job
releaseApproval
- Once the job is approved, circleci will publish the artifacts to maven central
- Merge the PR into main branch
- Checkout the latest main branch from remote origin in your local machine
git pull origin main
- Create a tag
git tag v<release-version> -m "Version <release-version>"
- Push the tag
git push origin <tag-name>
MIT license with an exception. See license file.