Skip to content

Commit

Permalink
Upgrade logging-parent to version 11.0.0 and migrate to Antora (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed Apr 19, 2024
1 parent b5e3d8c commit 195a926
Show file tree
Hide file tree
Showing 48 changed files with 497 additions and 595 deletions.
8 changes: 0 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@

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

notifications:
# GitHub already provides notifications for PRs and issues.
# Please don't duplicate that noise here!
commits: commits@logging.apache.org
issues: notifications@logging.apache.org
pullrequests: notifications@logging.apache.org
pullrequests_bot_dependabot: robots@logging.apache.org

github:

description: Swing-based client for remotely editing the Log4j configuration and remotely monitoring `StatusLogger` output
Expand Down
8 changes: 6 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

version: 2

# Add Maven Central explicitly to work around:
# https://github.com/dependabot/dependabot-core/issues/8329
# Fix the Maven Central to the ASF repository to work around: https://github.com/dependabot/dependabot-core/issues/8329
registries:
maven-central:
type: maven-repository
Expand All @@ -38,3 +37,8 @@ updates:
directory: "/"
schedule:
interval: weekly

- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
25 changes: 10 additions & 15 deletions .github/generate-email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
# limitations under the License.
#

# Enable strict mode
set -euo pipefail
IFS=$'\n\t'

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)

stderr() {
Expand All @@ -45,7 +41,7 @@ PROJECT_VERSION="$2"
COMMIT_ID="$3"

# Check release notes file
RELEASE_NOTES_FILE="$SCRIPT_DIR/../src/site/_release-notes/_$PROJECT_VERSION.adoc"
RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/generated-site/antora/modules/ROOT/pages/_release-notes/$PROJECT_VERSION.adoc"
[ -f "$RELEASE_NOTES_FILE" ] || {
stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE"
exit 1
Expand All @@ -69,11 +65,11 @@ case $1 in
vote)
cat <<EOF
To: dev@logging.apache.org
Title: [VOTE] Release $PROJECT_NAME $PROJECT_VERSION
Title: [VOTE] Release $PROJECT_NAME \`$PROJECT_VERSION\`
This is a vote to release the $PROJECT_NAME $PROJECT_VERSION.
This is a vote to release the $PROJECT_NAME \`$PROJECT_VERSION\`.
Website: $PROJECT_STAGING_SITE
Website: $PROJECT_STAGING_SITE-$PROJECT_VERSION
GitHub: $PROJECT_REPO
Commit: $COMMIT_ID
Distribution: $PROJECT_DIST_DIR
Expand All @@ -91,32 +87,31 @@ everyone to test the release, but only the Logging Services PMC
votes are officially counted. At least 3 +1 votes and more
positive than negative votes are required.
=== Review kit
== Review kit
The minimum set of steps needed to review the uploaded distribution
files in the Subversion repository can be summarized as follows:
$(dump_review_kit)
=== Release notes
$(dump_release_notes)
== Release Notes
EOF
dump_release_notes
;;

announce)
cat <<EOF
To: log4j-user@logging.apache.org, dev@logging.apache.org
Title: [ANNOUNCE] $PROJECT_NAME $PROJECT_VERSION released
Title: [ANNOUNCE] $PROJECT_NAME \`$PROJECT_VERSION\` released
${PROJECT_NAME}[1] team is pleased to announce the $PROJECT_VERSION
${PROJECT_NAME} team is pleased to announce the \`$PROJECT_VERSION\`
release. This project provides a Swing-based client for remotely
editing the Log4j configuration and remotely monitoring \`StatusLogger\`
output. It can be run as a standalone application or as a JConsole plugin.
[1] $PROJECT_SITE
=== Release Notes
== Release Notes
EOF
dump_release_notes
;;
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,38 @@ on:
- "**.md"
- "**.txt"

# If the branch is 'main' run once per commit.
# If the branch is 'release/*' allow only one concurrent run.
concurrency:
group: ${{ github.ref_name == 'main' && github.ref || github.ref_name }}
cancel-in-progress: true

permissions: read-all

jobs:

build:
if: github.actor != 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.0.0
with:
site-enabled: true

deploy-snapshot:
needs: build
if: github.repository == 'apache/logging-log4j-jmx-gui' && github.ref == 'refs/heads/main'
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/10.6.0
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/11.0.0
# Secrets for deployments
secrets:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }}

deploy-release:
needs: build
if: github.repository == 'apache/logging-log4j-jmx-gui' && startsWith(github.ref_name, 'release/')
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/10.6.0
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/11.0.0
# Secrets for deployments
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
permissions:
contents: write
with:
project-id: log4j-jmx-gui
site-enabled: true
39 changes: 0 additions & 39 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

95 changes: 95 additions & 0 deletions .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: deploy-site

on:
push:
branches:
- "main"
- "main-site-pro"
- "release/*"
paths-ignore:
- "**.md"
- "**.txt"

permissions: read-all

jobs:

deploy-site-stg:
if: github.repository == 'apache/logging-log4j-jmx-gui' && github.ref_name == 'main'
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
# Write permissions for committing the generated site
permissions:
contents: write
with:
asf-yaml-content: |
staging:
profile: ~
whoami: ${{ github.ref_name }}-site-stg-out
subdir: content/log4j/jmx-gui
target-branch: ${{ github.ref_name }}-site-stg-out

deploy-site-pro:
if: github.repository == 'apache/logging-log4j-jmx-gui' && github.ref_name == 'main-site-pro'
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
# Write permissions for committing the generated site
permissions:
contents: write
with:
asf-yaml-content: |
publish:
profile: ~
whoami: ${{ github.ref_name }}-out
subdir: content/log4j/jmx-gui
target-branch: ${{ github.ref_name }}-out

export-version:
if: github.repository == 'apache/logging-log4j-jmx-gui' && startsWith(github.ref_name, 'release/')
runs-on: ubuntu-latest
outputs:
version: ${{ steps.export-version.outputs.version }}
steps:
- name: Export version
id: export-version
run: |
version=$(echo "${{ github.ref_name }}" | sed 's/^release\///')
echo "version=$version" >> "$GITHUB_OUTPUT"
deploy-site-rel:
needs: export-version
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/11.0.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
# Write permissions for committing the generated site
permissions:
contents: write
with:
asf-yaml-content: |
staging:
profile: ~
whoami: ${{ github.ref_name }}-site-stg-out
subdir: content/log4j/jmx-gui-${{ needs.export-version.outputs.version }}
target-branch: ${{ github.ref_name }}-site-stg-out
4 changes: 2 additions & 2 deletions .github/workflows/merge-dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:

build:
if: github.repository == 'apache/logging-log4j-jmx-gui' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/10.6.0
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/11.0.0

merge-dependabot:
needs: build
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/10.6.0
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/11.0.0
permissions:
contents: write # to push changelog commits
pull-requests: write # to close the PR
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/scorecards-analysis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ target/
.project
.classpath
.settings/
# Node
node
node_modules
package-lock.json
Loading

0 comments on commit 195a926

Please sign in to comment.