Skip to content

Commit 2942f3c

Browse files
committed
Upgrade logging-parent and migrate to Antora (apache/logging-log4j2#2443)
1 parent 36b0a9e commit 2942f3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+614
-731
lines changed

.asf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
github:
2121

2222
description: A Scala-friendly interface to log against the Log4j API
23-
homepage: https://logging.apache.org/log4j/kotlin
23+
homepage: https://logging.apache.org/log4j/scala
2424
labels:
2525
- apache
2626
- api

.github/dependabot.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
version: 2
1919

20-
# Add Maven Central explicitly to work around:
21-
# https://github.com/dependabot/dependabot-core/issues/8329
20+
# Fix the Maven Central to the ASF repository to work around: https://github.com/dependabot/dependabot-core/issues/8329
2221
registries:
2322
maven-central:
2423
type: maven-repository
@@ -36,7 +35,7 @@ updates:
3635
ignore:
3736
# Keep `scala-library` baseline
3837
- dependency-name: "org.scala-lang:scala-library"
39-
update-types: ["version-update:semver-major"]
38+
update-types: ["version-update:semver-major", "version-update:semver-minor"]
4039
# Keep `scala-reflect` baseline
4140
- dependency-name: "org.scala-lang:scala-reflect"
4241
update-types: ["version-update:semver-major"]
@@ -50,3 +49,8 @@ updates:
5049
directory: "/"
5150
schedule:
5251
interval: weekly
52+
53+
- package-ecosystem: npm
54+
directory: "/"
55+
schedule:
56+
interval: daily

.github/generate-email.sh

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
# Enable strict mode
20-
set -euo pipefail
21-
IFS=$'\n\t'
22-
2319
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
2420

2521
stderr() {
@@ -45,7 +41,7 @@ PROJECT_VERSION="$2"
4541
COMMIT_ID="$3"
4642

4743
# Check release notes file
48-
RELEASE_NOTES_FILE="$SCRIPT_DIR/../src/site/_release-notes/_$PROJECT_VERSION.adoc"
44+
RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/generated-site/antora/modules/ROOT/pages/_release-notes/$PROJECT_VERSION.adoc"
4945
[ -f "$RELEASE_NOTES_FILE" ] || {
5046
stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE"
5147
exit 1
@@ -69,11 +65,11 @@ case $1 in
6965
vote)
7066
cat <<EOF
7167
To: dev@logging.apache.org
72-
Title: [VOTE] Release $PROJECT_NAME $PROJECT_VERSION
68+
Title: [VOTE] Release $PROJECT_NAME \`$PROJECT_VERSION\`
7369
74-
This is a vote to release the $PROJECT_NAME $PROJECT_VERSION.
70+
This is a vote to release the $PROJECT_NAME \`$PROJECT_VERSION\`.
7571
76-
Website: $PROJECT_STAGING_SITE
72+
Website: $PROJECT_STAGING_SITE-$PROJECT_VERSION
7773
GitHub: $PROJECT_REPO
7874
Commit: $COMMIT_ID
7975
Distribution: $PROJECT_DIST_DIR
@@ -91,35 +87,33 @@ everyone to test the release, but only the Logging Services PMC
9187
votes are officially counted. At least 3 +1 votes and more
9288
positive than negative votes are required.
9389
94-
=== Review kit
90+
== Review kit
9591
9692
The minimum set of steps needed to review the uploaded distribution
9793
files in the Subversion repository can be summarized as follows:
9894
9995
$(dump_review_kit)
10096
101-
=== Release notes
102-
103-
$(dump_release_notes)
97+
== Release Notes
10498
EOF
99+
dump_release_notes
105100
;;
106101

107102
announce)
108103
cat <<EOF
109104
To: log4j-user@logging.apache.org, dev@logging.apache.org
110-
Title: [ANNOUNCE] $PROJECT_NAME $PROJECT_VERSION released
105+
Title: [ANNOUNCE] $PROJECT_NAME \`$PROJECT_VERSION\` released
111106
112-
${PROJECT_NAME} team is pleased to announce the $PROJECT_VERSION
107+
${PROJECT_NAME} team is pleased to announce the \`$PROJECT_VERSION\`
113108
release. This project provides a Scala-friendly interface to log
114109
against the Log4j API. For further information (support, download,
115110
etc.) see the project website[1].
116111
117112
[1] $PROJECT_SITE
118113
119-
=== Release Notes
120-
121-
$(dump_release_notes)
114+
== Release Notes
122115
EOF
116+
dump_release_notes
123117
;;
124118

125119
*) fail_for_invalid_args

.github/workflows/build.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
build:
4040
if: github.actor != 'dependabot[bot]'
41-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0
41+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.0.0
4242
with:
4343
java-version: |
4444
8
@@ -48,11 +48,11 @@ jobs:
4848
deploy-snapshot:
4949
needs: build
5050
if: github.repository == 'apache/logging-log4j-scala' && github.ref_name == 'main'
51-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.6.0
51+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/11.0.0
5252
# Secrets for deployments
5353
secrets:
54-
NEXUS_USER: ${{ secrets.NEXUS_USER }}
55-
NEXUS_PW: ${{ secrets.NEXUS_PW }}
54+
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
55+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }}
5656
with:
5757
java-version: |
5858
8
@@ -61,20 +61,19 @@ jobs:
6161
deploy-release:
6262
needs: build
6363
if: github.repository == 'apache/logging-log4j-scala' && startsWith(github.ref_name, 'release/')
64-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.6.0
64+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/11.0.0
6565
# Secrets for deployments
6666
secrets:
6767
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
68-
LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
69-
LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
68+
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
69+
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
7070
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
7171
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
7272
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
7373
permissions:
7474
contents: write
7575
with:
7676
project-id: log4j-scala
77-
site-enabled: true
7877
java-version: |
7978
8
8079
17

.github/workflows/deploy-site.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to you under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
name: deploy-site
19+
20+
on:
21+
push:
22+
branches:
23+
- "main"
24+
- "main-site-pro"
25+
- "release/*"
26+
paths-ignore:
27+
- "**.md"
28+
- "**.txt"
29+
30+
permissions: read-all
31+
32+
jobs:
33+
34+
deploy-site-stg:
35+
if: github.repository == 'apache/logging-log4j-scala' && github.ref_name == 'main'
36+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
37+
# Secrets for committing the generated site
38+
secrets:
39+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
40+
# Write permissions for committing the generated site
41+
permissions:
42+
contents: write
43+
with:
44+
asf-yaml-content: |
45+
staging:
46+
profile: ~
47+
whoami: ${{ github.ref_name }}-site-stg-out
48+
subdir: content/log4j/scala
49+
target-branch: ${{ github.ref_name }}-site-stg-out
50+
51+
deploy-site-pro:
52+
if: github.repository == 'apache/logging-log4j-scala' && github.ref_name == 'main-site-pro'
53+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
54+
# Secrets for committing the generated site
55+
secrets:
56+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
57+
# Write permissions for committing the generated site
58+
permissions:
59+
contents: write
60+
with:
61+
asf-yaml-content: |
62+
publish:
63+
profile: ~
64+
whoami: ${{ github.ref_name }}-out
65+
subdir: content/log4j/scala
66+
target-branch: ${{ github.ref_name }}-out
67+
68+
export-version:
69+
if: github.repository == 'apache/logging-log4j-scala' && startsWith(github.ref_name, 'release/')
70+
runs-on: ubuntu-latest
71+
outputs:
72+
version: ${{ steps.export-version.outputs.version }}
73+
steps:
74+
- name: Export version
75+
id: export-version
76+
run: |
77+
version=$(echo "${{ github.ref_name }}" | sed 's/^release\///')
78+
echo "version=$version" >> "$GITHUB_OUTPUT"
79+
80+
deploy-site-rel:
81+
needs: export-version
82+
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
83+
# Secrets for committing the generated site
84+
secrets:
85+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
86+
# Write permissions for committing the generated site
87+
permissions:
88+
contents: write
89+
with:
90+
asf-yaml-content: |
91+
staging:
92+
profile: ~
93+
whoami: ${{ github.ref_name }}-site-stg-out
94+
subdir: content/log4j/scala-${{ needs.export-version.outputs.version }}
95+
target-branch: ${{ github.ref_name }}-site-stg-out

.github/workflows/merge-dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ jobs:
3030

3131
build:
3232
if: github.repository == 'apache/logging-log4j-scala' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
33-
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.0.0
3434
with:
3535
java-version: |
3636
8
3737
17
3838
3939
merge-dependabot:
4040
needs: build
41-
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/10.6.0
41+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/11.0.0
4242
permissions:
4343
contents: write # to push changelog commits
4444
pull-requests: write # to close the PR

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ velocity.log
1212
felix-cache/
1313
bin/
1414
.bsp/sbt.json
15+
# Node
16+
node
17+
node_modules
18+
package-lock.json
19+

0 commit comments

Comments
 (0)