You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Capture Build Scan® data](#capture-build-scan-data): Capture published Build Scan® links and unpublished Build Scan® data as a workflow artifact per job with prefix `build-scan-data-maven`, which can then be published in a dependent workflow.
15
15
16
-
> [!NOTE]
16
+
> [!NOTE]
17
17
> This action can be combined with the `maven-publish-build-scan` action to publish Build Scan® in a fork context. See [the relevant section](#maven-publish-build-scan-action) for details.
18
18
19
19
### Usage
@@ -23,15 +23,15 @@ Insert the `Setup Maven` step once in each job having steps invoking Maven. Make
23
23
```yaml
24
24
name: PR Build
25
25
jobs:
26
-
build:
26
+
build:
27
27
- name: Setup Maven
28
28
uses: gradle/develocity-actions/setup-maven@v1
29
29
- name: Build with Maven
30
30
run: ./mvnw clean package
31
31
[...]
32
32
```
33
33
34
-
> [!NOTE]
34
+
> [!NOTE]
35
35
> When authenticated access is required to publish a Build Scan®, it is recommended to provide as input `develocity-access-key` to the `setup-maven` step. This triggers a request for a [short-lived access token](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens) instead of relying on the `DEVELOCITY_ACCESS_KEY` environment variable.
36
36
37
37
---
@@ -49,7 +49,7 @@ The extension is automatically registered by configuring the environment `MAVEN_
49
49
> If `MAVEN_OPTS` environment variable is set in the step invoking the `mvn` command, the extension won't be registered.
50
50
Make sure to use `MAVEN_OPTS: ${{ env.MAVEN_OPTS }} <EXTRA_PARAMETERS>` construction to append the extra parameters and have the extension registered.
51
51
52
-
> [!WARNING]
52
+
> [!WARNING]
53
53
> The job name is computed by appending `github.job` to the current matrix value (if present). This works only when the matrix contains entries defined as single-dimension array. If a matrix entry is an array of objects, the computed `job-name` can be overridden with the `job-name` action input to avoid having `-object` in the job name.
54
54
55
55
###### Workflow Summary
@@ -69,8 +69,8 @@ The following permissions are required for this feature to work:
69
69
-`pull-requests: write`: to comment the pull-request
70
70
71
71
> [!NOTE]
72
-
> The pull-request comment is overwriting the previous summary comment if present, this means that if several jobs have a setup-maven step,
73
-
only the last will have its summary commented in the PR. It is recommended to disable the pull-request summary in this case (`add-pr-comment: false`).
72
+
> The pull-request comment is overwriting the previous summary comment if present, this means that if several jobs have a setup-maven step,
73
+
only the last will have its summary commented in the PR. It is recommended to disable the pull-request summary in this case (`add-pr-comment: false`).
74
74
75
75
###### Raw Summary data
76
76
@@ -115,7 +115,7 @@ If one wants to inject Develocity Maven Extension (and optionally CCUD Maven Ext
115
115
```yaml
116
116
name: PR Build
117
117
jobs:
118
-
build:
118
+
build:
119
119
- name: Setup Maven
120
120
uses: gradle/develocity-actions/setup-maven@v1
121
121
with:
@@ -169,34 +169,37 @@ The output name is `build-scan-url` and can be used in subsequent steps of the w
|`job-name`|*Optional*: Job name (used in summary and as artifact suffix) ||
180
-
|`add-pr-comment`|*Optional*: Comment the pull-request with Build Scan links |`true`|
181
-
|`add-job-summary`|*Optional*: Add a summary to the GitHub workflow |`true`|
182
-
|`add-project-id-in-job-summary`|*Optional*: Add project id to the job summary / comment |`false`|
183
-
|`develocity-injection-enabled`|*Optional*: Whether to enable or not Develocity/CCUD Maven Extensions injection ||
184
-
|`develocity-url`|*Optional*: Develocity server URL ||
185
-
|`develocity-maven-extension-version`|*Optional*: Develocity Maven Extension version to be injected ||
186
-
|`develocity-ccud-maven-extension-version`|*Optional*: Common Custom User Data Maven Extension version to be injected ||
187
-
|`develocity-allow-untrusted-server`|*Optional*: Whether to allow communicating with untrusted server ||
188
-
|`develocity-enforce-url`|*Optional*: Whether to enforce the URL over any defined locally to the project ||
189
-
|`develocity-capture-file-fingerprints`|*Optional*: Whether to enable/disable capturing of file fingerprints. This setting is enabled by default ||
190
-
|`develocity-custom-develocity-maven-extension-coordinates`|*Optional*: Will not inject the Develocity Maven extension if an extension with provided coordinates is found (value is an artifactId of the extension) ||
191
-
|`develocity-custom-ccud-extension-coordinates`|*Optional*: Will not inject the CCUD extension if an extension with provided coordinates is found (value is an artifactId of the extension) ||
|`job-name`|*Optional*: Job name (used in summary and as artifact suffix) ||
180
+
|`add-pr-comment`|*Optional*: Comment the pull-request with Build Scan links |`true`|
181
+
|`add-job-summary`|*Optional*: Add a summary to the GitHub workflow |`true`|
182
+
|`add-project-id-in-job-summary`|*Optional*: Add project id to the job summary / comment |`false`|
183
+
|`develocity-injection-enabled`|*Optional*: Whether to enable or not Develocity/CCUD Maven Extensions injection ||
184
+
|`develocity-url`|*Optional*: Develocity server URL ||
185
+
|`develocity-maven-extension-version`|*Optional*: Develocity Maven Extension version to be injected ||
186
+
|`develocity-ccud-maven-extension-version`|*Optional*: Common Custom User Data Maven Extension version to be injected ||
187
+
|`develocity-maven-repository-url`|*Optional*: URL of the repository to use when resolving the Develocity and CCUD extensions |https://repo1.maven.org/maven2|
188
+
|`develocity-maven-repository-username`|*Optional*: Username for the repository URL to use when resolving the Develocity and CCUD extensions ||
189
+
|`develocity-maven-repository-password`|*Optional*: Password for the repository URL to use when resolving the Develocity and CCUD extensions ||
190
+
|`develocity-allow-untrusted-server`|*Optional*: Whether to allow communicating with untrusted server ||
191
+
|`develocity-enforce-url`|*Optional*: Whether to enforce the URL over any defined locally to the project ||
192
+
|`develocity-capture-file-fingerprints`|*Optional*: Whether to enable/disable capturing of file fingerprints. This setting is enabled by default ||
193
+
|`develocity-custom-develocity-maven-extension-coordinates`|*Optional*: Will not inject the Develocity Maven extension if an extension with provided coordinates is found (value is an artifactId of the extension) ||
194
+
|`develocity-custom-ccud-extension-coordinates`|*Optional*: Will not inject the CCUD extension if an extension with provided coordinates is found (value is an artifactId of the extension) ||
192
195
193
196
---
194
197
195
198
## maven-publish-build-scan action
196
199
Publish Build Scans® for pull-requests issued from forked repositories
197
200
198
201
### Description
199
-
When submitting a pull request from a forked GitHub repository, a GitHub workflow that validates the change cannot publish a Build Scan®
202
+
When submitting a pull request from a forked GitHub repository, a GitHub workflow that validates the change cannot publish a Build Scan®
200
203
as workflows from forked repositories do not have access to secrets. An access token is required to publish a Build Scan®.
201
204
202
205
> [!NOTE]
@@ -214,7 +217,7 @@ In the GitHub workflow called to validate a pull-request, insert the `Setup Mave
214
217
```yaml
215
218
name: PR Build
216
219
jobs:
217
-
build:
220
+
build:
218
221
- name: Setup Maven
219
222
uses: gradle/develocity-actions/setup-maven@v1
220
223
- name: Build with Maven
@@ -254,12 +257,12 @@ jobs:
254
257
> - The workflow name (here `PR Build`) triggered when a pull-request is submitted
255
258
> - The Develocity URL (here `https://<MY_DEVELOCITY_URL>`)
256
259
> - The secret name holding the Develocity access key (here `<DEVELOCITY_ACCESS_KEY>`)
257
-
260
+
258
261
#### Implementation details
259
262
260
263
The action will download any saved Build Scan® and publish them to Develocity.
261
264
262
-
The list of pull-request authors allowed to publish a Build Scan® can be specified by the csv parameter `authorized-users-list`.
265
+
The list of pull-request authors allowed to publish a Build Scan® can be specified by the csv parameter `authorized-users-list`.
263
266
The action will publish Build Scans® if the initial pull-request author belongs to the list or if the list is empty.
0 commit comments