From 7ccbf039fc95af76bb2ab577d3b8b619d7ae7be3 Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Tue, 20 Aug 2019 13:05:39 +0200 Subject: [PATCH] Add Gradle step documentation to the root --- README.adoc | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index bc610f83a..c5d2c9d84 100644 --- a/README.adoc +++ b/README.adoc @@ -91,12 +91,39 @@ The implementation follows the standard build/test/archive pattern. The method targets compatibility with link:https://github.com/jenkinsci/gradle-jpi-plugin[Gradle JPI Plugin], and it may not work for other use-cases. -The interface is similar to `buildPlugin()`, but some features are not supported. +==== Optional arguments + +* `repo` (default: `null` inherit from Multibranch) - custom Git repository to check out +* `failFast` (default: `true`) - instruct the build to fail fast when one of the configurations fail +* `platforms` (default: `['linux', 'windows']`) - Labels matching platforms to + execute the steps against in parallel +* `jdkVersions` (default: `[8]`) - JDK version numbers, must match a version + number jdk tool installed +* `configurations`: An alternative way to specify `platforms`, `jdkVersions` (that can not be combined + with any of them) +** Those options will run the build for all combinations of their values. While that is desirable in + many cases, `configurations` permit to provide a specific combinations of label and java/jenkins versions to use +** It is also possible to use a `buildPlugin.recommendedConfigurations()` method to get recommended configurations for testing. +Note that the recommended configuration may change over time, +and hence your CI may break if the new recommended configuration is not compatible + +[source,groovy] +---- +buildPlugin(/*...*/, configurations: [ + [ platform: "linux", jdk: "8"], + [ platform: "windows", jdk: "8"], +]) +---- + +==== Limitations + +Not all features of `buildPlugin()` for Maven are supported in the gradle flow. Examples of not supported features: * Deployment of incremental versions (link:https://github.com/jenkinsci/jep/tree/master/jep/305[JEP-305]) * Publishing of static analysis and coverage reports (Checkstyle, SpotBugs, JaCoCo) -* Configuring `jenkinsVersion` and `javaLevel` for the build flow +* Configuring `jenkinsVersion` and `javaLevel` for the build flow (as standalone arguments or as `configurations`) +* Usage of link:https://azure.microsoft.com/en-us/services/container-instances/[Azure Container Instances] as agents (only Maven agents are configured) === infra.isTrusted()