You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/10/10 19:23:43 UTC
(logging-parent) branch feature/maven-args created (now 4afff21)
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a change to branch feature/maven-args
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
at 4afff21 Adds `maven-args` option to workflows
This branch includes the following new commits:
new 4afff21 Adds `maven-args` option to workflows
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-parent) 01/01: Adds `maven-args` option to workflows
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch feature/maven-args
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
commit 4afff215214d34d4d64361318f4d1f622a9f4033
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Thu Oct 10 21:23:33 2024 +0200
Adds `maven-args` option to workflows
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.
---
.github/workflows/build-reusable.yaml | 21 ++++++++++++++-------
.github/workflows/merge-dependabot-reusable.yaml | 8 ++++++++
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-reusable.yaml
index 870eaab..ae283fe 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 1a02019..44d3e2d 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:
@@ -80,6 +86,8 @@ jobs:
- name: Find the release version major
shell: bash
+ env:
+ MAVEN_ARGS: ${{ inputs.maven-args }}
run: |
RELEASE_VERSION_MAJOR=$(./mvnw \
--non-recursive --quiet --batch-mode \