-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Gradle build scans publication
- Loading branch information
Showing
62 changed files
with
122,776 additions
and
1,283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,8 @@ The `MAVEN_HOME` environment variable is used if present, otherwise, the csv lis | |
| `build-scan-capture-strategy` | *Optional*: Build Scan capture strategy (ALWAYS, ON_FAILURE, ON_DEMAND) | `ALWAYS` | | ||
| `build-scan-capture-unpublished-enabled` | *Optional*: Flag to enable unpublished Build Scan capture | `true` | | ||
| `build-scan-capture-link-enabled` | *Optional*: Flag to enable Build Scan link capture | `true` | | ||
| `wrapper-init` | *Optional*: Flag to enable the Maven wrapper by running it (with `-version`) in order to trigger local installation | `false` | | ||
| `wrapper-path` | *Optional*: Path to mvnw script (used in combination with `wrapper-init`) | `` | | ||
|
||
**Usage**: | ||
|
||
|
@@ -127,26 +129,10 @@ jobs: | |
|
||
When using the Maven wrapper, the Maven extension can't be registered once at the beginning of the build by copying it to `$MAVEN_HOME/lib/ext` as the folder is created on first `mvnw` invocation (and emptied if already present). | ||
|
||
There are two options in this situation: | ||
1. Add a minimal `mvnw help` step at the beginning of the job and reference `gradle/github-actions/maven-build-scan-setup` step after | ||
2. Register the Maven extension as a Maven CLI argument (`-Dmaven.ext.class.path`) | ||
|
||
In details, the approach 2. which copies the Maven extension in `./maven-build-scan-capture/lib/ext` (using a relative path makes this approach compatible with Windows OS): | ||
```yaml | ||
name: PR Build | ||
jobs: | ||
[...] | ||
build: | ||
[...] | ||
- name: Setup Develocity Build Scan capture | ||
uses: gradle/github-actions/[email protected] | ||
env: | ||
MAVEN_HOME: maven-build-scan-capture | ||
job-name: "Initial JDK 17 Build" | ||
- name: Build with Maven | ||
run: ./mvnw clean package -Dmaven.ext.class.path=maven-build-scan-capture/lib/ext/maven-build-scan-capture-extension.jar | ||
[...] | ||
``` | ||
There are three options in this situation (by order of preference): | ||
1. Set `wrapper-init: true` to trigger the installation of Maven when running the `gradle/github-actions/maven-build-scan-setup` step | ||
2. Register the Maven extension as a Maven CLI argument (`-Dmaven.ext.class.path`) | ||
3. Add a previous step calling `mvnw` and reference `gradle/github-actions/maven-build-scan-setup` step after | ||
|
||
#### maven-build-scan-publish | ||
|
||
|
File renamed without changes.
Oops, something went wrong.