Skip to content

Commit

Permalink
Add Gradle step documentation to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-nenashev authored Aug 20, 2019
1 parent f2a1d97 commit 7ccbf03
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 7ccbf03

Please sign in to comment.