This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/main by this push:
new 0ae04ef Adds `maven-args` option to workflows (#266)
0ae04ef is described below
commit 0ae04efbd463459e4f5f016af77a9a398cffc322
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Tue Oct 15 13:38:32 2024 +0200
Adds `maven-args` option to workflows (#266)
We add `maven-args` option to the:
* `build-reusable.yaml` workflow.
* `merge-dependabot-reusable.yaml` workflow.
This parameter sets the
[`MAVEN_ARGS`](https://maven.apache.org/configure.html#maven_args-environment-variable)
environment variable that can be used to pass additional options (e.g.
`-Prelease`, `-Dslf4j.version=...`) to the Maven runs.
Note that we don't add an equivalent option for
[`MAVEN_OPTS`](https://maven.apache.org/configure.html#maven_opts-environment-variable),
since the JVM parameters for Maven can be stored in a `.mvn/jvm.config`
file.
**Note**: `MAVEN_ARGS` only works with a recent version of Maven and the
`only-script` version of Maven Wrapper.
---
.github/workflows/build-reusable.yaml | 21 ++++++++++++++-------
.github/workflows/merge-dependabot-reusable.yaml | 6 ++++++
src/changelog/.11.x.x/maven-args.xml | 8 ++++++++
3 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/build-reusable.yaml
b/.github/workflows/build-reusable.yaml
index 8f690da..6b0b488 100644
--- a/.github/workflows/build-reusable.yaml
+++ b/.github/workflows/build-reusable.yaml
@@ -20,27 +20,34 @@ name: build-reusable
on:
workflow_call:
inputs:
+ develocity-enabled:
+ description: Enable Develocity Build Scan publication
+ default: false
+ type: boolean
java-version:
description: The Java compiler version
default: 17
type: string
- site-enabled:
- description: Flag indicating if Maven `site` goal should be run
- default: false
- type: boolean
+ maven-args:
+ description: Additional Maven arguments
+ type: string
reproducibility-check-enabled:
description: Runs a reproducibility check on the build
default: true
type: boolean
- develocity-enabled:
- description: Enable Develocity Build Scan publication
+ site-enabled:
+ description: Flag indicating if Maven `site` goal should be run
default: false
type: boolean
+
secrets:
DV_ACCESS_TOKEN:
description: Access token to Gradle Enterprise
required: false
+env:
+ MAVEN_ARGS: ${{ inputs.maven-args }}
+
jobs:
build:
@@ -141,7 +148,7 @@ jobs:
# For that, we need to configure `dependabot` to update hundreds of
dependencies listed in `package-lock.json`.
# That translates to a never ending rain of `dependabot` PRs.
# I doubt if the wasted CPU cycles worth the gain.
- key: ${{ runner.os }}-nodejs-cache-${{ hashFiles('node',
'node_modules') }}
+ key: "${{ runner.os }}-nodejs-cache-${{ hashFiles('node',
'node_modules') }}"
# `actions/cache` doesn't recommend caching `node_modules`.
# Though none of its recipes fit our bill, since we install Node.js
using `frontend-maven-plugin`.
# See
https://github.com/actions/cache/blob/main/examples.md#node---npm
diff --git a/.github/workflows/merge-dependabot-reusable.yaml
b/.github/workflows/merge-dependabot-reusable.yaml
index 33fabda..ffa1a79 100644
--- a/.github/workflows/merge-dependabot-reusable.yaml
+++ b/.github/workflows/merge-dependabot-reusable.yaml
@@ -24,11 +24,17 @@ on:
description: The Java compiler version
default: 17
type: string
+ maven-args:
+ description: Additional Maven arguments
+ type: string
secrets:
GPG_SECRET_KEY:
description: GPG secret key for signing commits
required: true
+env:
+ MAVEN_ARGS: ${{ inputs.maven-args }}
+
jobs:
merge-dependabot:
diff --git a/src/changelog/.11.x.x/maven-args.xml
b/src/changelog/.11.x.x/maven-args.xml
new file mode 100644
index 0000000..8b34f75
--- /dev/null
+++ b/src/changelog/.11.x.x/maven-args.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://logging.apache.org/xml/ns"
+ xsi:schemaLocation="https://logging.apache.org/xml/ns
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="changed">
+ <issue id="266" link="https://github.com/apache/logging-parent/pull/266"/>
+ <description format="asciidoc">Add `maven-args` input to `build-reusable`
and `merge-dependabot-reusable`.</description>
+</entry>