Skip to content

Commit e34d076

Browse files
committed
Bump logging-parent version to 11.0.0 and migrate to Antora (apache/logging-log4j2#2443)
1 parent aefeb5d commit e34d076

File tree

53 files changed

+588
-535
lines changed

Some content is hidden

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

53 files changed

+588
-535
lines changed

.asf.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,24 @@
1717

1818
# `.asf.yaml` documentation: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
1919

20+
notifications:
21+
# GitHub already provides notifications for PRs and issues.
22+
# Please don't duplicate that noise here!
23+
commits: commits@logging.apache.org
24+
pullrequests_bot_dependabot: robots@logging.apache.org
25+
2026
github:
2127
description: "Tools for binary post-processing of projects using Apache Log4j."
22-
homepage: https://logging.apache.org/log4j/2.x/
28+
homepage: https://logging.apache.org/log4j/transform
2329
labels:
2430
- apache
2531
- java
2632
- log4j
2733
- log4j2
2834
- logging
2935

36+
del_branch_on_merge: true
37+
3038
features:
3139
issues: true
3240

.github/dependabot.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
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
2524
url: https://repo.maven.apache.org/maven2
2625

2726
updates:
27+
2828
- package-ecosystem: maven
2929
directory: "/"
3030
schedule:
@@ -41,3 +41,8 @@ updates:
4141
directory: "/"
4242
schedule:
4343
interval: weekly
44+
45+
- package-ecosystem: npm
46+
directory: "/"
47+
schedule:
48+
interval: daily

.github/generate-email.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ PROJECT_VERSION="$2"
4545
COMMIT_ID="$3"
4646

4747
# Check release notes file
48-
RELEASE_NOTES_FILE="$SCRIPT_DIR/../src/site/_release-notes/_$PROJECT_VERSION.adoc"
48+
RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/generated-site/antora/modules/ROOT/pages/_release-notes/$PROJECT_VERSION.adoc"
4949
[ -f "$RELEASE_NOTES_FILE" ] || {
5050
stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE"
5151
exit 1
@@ -69,11 +69,11 @@ case $1 in
6969
vote)
7070
cat <<EOF
7171
To: dev@logging.apache.org
72-
Title: [VOTE] Release $PROJECT_NAME $PROJECT_VERSION
72+
Title: [VOTE] Release $PROJECT_NAME \`$PROJECT_VERSION\`
7373
74-
This is a vote to release the $PROJECT_NAME $PROJECT_VERSION.
74+
This is a vote to release the $PROJECT_NAME \`$PROJECT_VERSION\`.
7575
76-
Website: $PROJECT_STAGING_SITE
76+
Website: $PROJECT_STAGING_SITE-$PROJECT_VERSION
7777
GitHub: $PROJECT_REPO
7878
Commit: $COMMIT_ID
7979
Distribution: $PROJECT_DIST_DIR
@@ -91,32 +91,31 @@ everyone to test the release, but only the Logging Services PMC
9191
votes are officially counted. At least 3 +1 votes and more
9292
positive than negative votes are required.
9393
94-
=== Review kit
94+
== Review kit
9595
9696
The minimum set of steps needed to review the uploaded distribution
9797
files in the Subversion repository can be summarized as follows:
9898
9999
$(dump_review_kit)
100100
101-
# Release notes
102-
103-
$(dump_release_notes)
101+
== Release Notes
104102
EOF
103+
dump_release_notes
105104
;;
106105

107106
announce)
108107
cat <<EOF
109108
To: log4j-user@logging.apache.org, dev@logging.apache.org
110-
Title: [ANNOUNCE] $PROJECT_NAME $PROJECT_VERSION released
109+
Title: [ANNOUNCE] $PROJECT_NAME \`$PROJECT_VERSION\` released
111110
112-
${PROJECT_NAME} team is pleased to announce the $PROJECT_VERSION
111+
${PROJECT_NAME} team is pleased to announce the \`$PROJECT_VERSION\`
113112
release. This project contains tools for binary postprocessing of
114113
projects that use the Apache Log4j API. For further information
115114
(support, download, etc.) see the project website[1].
116115
117116
[1] $PROJECT_SITE
118117
119-
=== Release Notes
118+
== Release Notes
120119
EOF
121120
dump_release_notes
122121
;;

.github/workflows/build.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,32 @@ 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
site-enabled: true
4444

4545
deploy-snapshot:
4646
needs: build
4747
if: github.repository == 'apache/logging-log4j-transform' && github.ref_name == 'main'
48-
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.6.0
48+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/11.0.0
4949
# Secrets for deployments
5050
secrets:
51-
NEXUS_USER: ${{ secrets.NEXUS_USER }}
52-
NEXUS_PW: ${{ secrets.NEXUS_PW }}
51+
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
52+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }}
5353

5454
deploy-release:
5555
needs: build
5656
if: github.repository == 'apache/logging-log4j-transform' && startsWith(github.ref_name, 'release/')
57-
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.6.0
57+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/11.0.0
5858
# Secrets for deployments
5959
secrets:
6060
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
61-
LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
62-
LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
61+
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
62+
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
6363
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
6464
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
6565
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
6666
permissions:
6767
contents: write
6868
with:
6969
project-id: log4j-transform
70-
site-enabled: true

.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-transform' && 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/transform
49+
target-branch: ${{ github.ref_name }}-site-stg-out
50+
51+
deploy-site-pro:
52+
if: github.repository == 'apache/logging-log4j-transform' && 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/transform
66+
target-branch: ${{ github.ref_name }}-out
67+
68+
export-version:
69+
if: github.repository == 'apache/logging-log4j-transform' && 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/transform-${{ needs.export-version.outputs.version }}
95+
target-branch: ${{ github.ref_name }}-site-stg-out

.github/workflows/merge-dependabot.yaml

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

3131
build:
3232
if: github.repository == 'apache/logging-log4j-transform' && 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
34+
with:
35+
site-enabled: true
3436

3537
merge-dependabot:
3638
needs: build
37-
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/10.6.0
39+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/11.0.0
3840
permissions:
3941
contents: write # to push changelog commits
4042
pull-requests: write # to close the PR

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ target/
2424
.project
2525
.classpath
2626
.settings/
27+
# Node
28+
node
29+
node_modules
30+
package-lock.json

antora-playbook.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
site:
19+
title: Apache Log4j Transform
20+
url: "https://logging.apache.org/log4j/transform"
21+
start_page: "ROOT::index.adoc"
22+
23+
content:
24+
sources:
25+
- url: .
26+
branches: HEAD
27+
start_paths:
28+
- target/generated-site/antora
29+
edit_url:
30+
31+
asciidoc:
32+
extensions:
33+
- "@asciidoctor/tabs"
34+
35+
ui:
36+
37+
bundle:
38+
url: "https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable"
39+
snapshot: true
40+
41+
# Template files: https://github.com/asciidoctor/asciidoctor-docs-ui/blob/main/src
42+
# Template variables: https://docs.antora.org/antora-ui-default/templates
43+
supplemental_files:
44+
45+
# Add `@asciidoctor/tabs` extension styles
46+
- path: css/vendor/tabs.css
47+
contents: ./node_modules/@asciidoctor/tabs/dist/css/tabs.css
48+
49+
# Add `@asciidoctor/tabs` extension scripts
50+
- path: js/vendor/tabs.js
51+
contents: ./node_modules/@asciidoctor/tabs/dist/js/tabs.js
52+
53+
- path: partials/footer-scripts.hbs
54+
contents: |
55+
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
56+
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
57+
<!-- `@asciidoctor/tabs` extension scripts -->
58+
<script async src="{{{uiRootPath}}}/js/vendor/tabs.js"></script>
59+
{{#if env.SITE_SEARCH_PROVIDER}}
60+
{{> search-scripts}}
61+
{{/if}}
62+
63+
- path: partials/head-styles.hbs
64+
contents: |
65+
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css">
66+
<link rel="icon" href="{{{uiRootPath}}}/../_images/favicon.ico" type="image/x-icon">
67+
<!-- `@asciidoctor/tabs` extension styles -->
68+
<link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">
69+
<style>
70+
/* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
71+
.toc .toc-menu li[data-level="4"] a {
72+
padding-left: 2.75rem
73+
}
74+
/* Replace the default highlight.js color for strings from red to green: */
75+
.hljs-string {
76+
color: #0f8532;
77+
}
78+
</style>
79+
80+
- path: partials/header-content.hbs
81+
contents: |
82+
<header class="header">
83+
<nav class="navbar">
84+
<div class="navbar-brand">
85+
<span class="navbar-item title">{{site.title}}</span>
86+
</div>
87+
<div id="topbar-nav" class="navbar-menu">
88+
<div class="navbar-end">
89+
<a class="navbar-item" href="https://logging.apache.org">a subproject of&nbsp;<strong>Apache Logging Services</strong></a>
90+
</div>
91+
</div>
92+
</nav>
93+
</header>
94+
95+
- path: partials/footer-content.hbs
96+
contents: |
97+
<footer class="footer">
98+
<p>
99+
Copyright © 1999-{{{year}}} <a href="https://www.apache.org/">The Apache Software Foundation</a>.
100+
Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache Software License, Version 2.0</a>.
101+
Please read our <a href="https://privacy.apache.org/policies/privacy-policy-public.html">privacy policy</a>.
102+
</p>
103+
<p>
104+
Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation.
105+
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
106+
Other names may be trademarks of their respective owners.
107+
</p>
108+
</footer>
109+
110+
# Disable component version selector
111+
- path: partials/nav-explore.hbs
112+
contents: ""
113+
114+
# Fix the `Edit this page` link
115+
- path: partials/edit-this-page.hbs
116+
contents: |
117+
<div class="edit-this-page"><a href="https://github.com/apache/logging-log4j-transform/edit/main/src/site/antora/modules/{{page.module}}/pages/{{page.relativeSrcPath}}">Edit this Page</a></div>

0 commit comments

Comments
 (0)