Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
17ae301
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
4aab926
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
94e7fb4
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
0d6f369
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
3b5548d
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
fa36c0c
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
ebf5421
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
fcb8c01
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
0006e83
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
2c7e07c
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
523318c
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
e872cd8
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
54c6742
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
3f7200f
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
72416c5
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
9c82edd
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
5929118
NUTCH-3163 Integrate Apache Yetus' pre-commit patch testing into Nutc…
lewismc Mar 14, 2026
f0ec0fd
Merge branch 'master' into NUTCH-3163
lewismc Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/junit-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
workflow_run:
workflows: [master pull request ci]
types: [completed]

concurrency:
group: junit-report-${{ github.event.workflow_run.pull_requests[0].number || github.event.workflow_run.head_sha }}
cancel-in-progress: true

permissions:
checks: write
contents: read
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
types: [opened, synchronize, reopened]
branches: [master]

concurrency:
group: master-build-${{ github.ref }}
cancel-in-progress: true

# Java Version Strategy:
# - BUILD: Requires Java 17+ (JUnit 6 dependency)
# - RUNTIME: Supports Java 11+ (javac.version=11 produces Java 11 bytecode)
Expand Down Expand Up @@ -140,7 +144,7 @@ jobs:
# Java 11 = major version 55, Java 17 = major version 61
EXPECTED_VERSION=${{ matrix.javac-version == '11' && '55' || '61' }}
echo "Expected major version: $EXPECTED_VERSION (Java ${{ matrix.javac-version }})"

# Find a real class file (exclude package-info.class which may have different version)
cd build/classes
CLASS_FILE=$(find . -name "*.class" ! -name "package-info.class" | head -1)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
workflow_run:
workflows: [master pull request ci]
types: [completed]

concurrency:
group: sonarcloud-${{ github.event.workflow_run.pull_requests[0].number || github.event.workflow_run.head_sha }}
cancel-in-progress: true

jobs:
analysis:
if: github.event.workflow_run.conclusion == 'success'
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/yetus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# 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.
#
# Apache Yetus test-patch: pre-commit patch testing (Ant, JDK 17).
# Runs alongside master-build.yml; all CI is unified on Java 17.
# See https://yetus.apache.org/documentation/0.15.1/precommit/
---
name: Apache Yetus
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
branches: [master]

concurrency:
group: yetus-${{ github.ref }}
cancel-in-progress: true

# GITHUB_TOKEN cannot comment on PRs from forks (403). Use a PAT secret
# (e.g. YETUS_COMMENT_TOKEN) if you need comments on fork PRs.
permissions:
contents: read
statuses: write
pull-requests: write
issues: write

jobs:
yetus:
runs-on: ubuntu-latest
timeout-minutes: 45
env:
PATCH_DIR: ${{ github.workspace }}/out
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache Ivy dependencies
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('ivy/ivy.xml', 'src/plugin/**/ivy.xml') }}
restore-keys: |
${{ runner.os }}-ivy-
- name: Apache Yetus test-patch
uses: apache/yetus-test-patch-action@0.15.1
with:
basedir: .
buildtool: nobuild
githubtoken: ${{ secrets.GITHUB_TOKEN }}
javahome: '/usr/lib/jvm/java-17-openjdk-amd64'
patchdir: /github/workspace/out
plugins: all,-jira,-gitlab,-unit,-compile
project: nutch
- name: Artifact output
if: always()
uses: actions/upload-artifact@v4
with:
name: apacheyetuspatchdir
path: ${{ env.PATCH_DIR }}
- name: Install pandoc
if: github.event_name == 'pull_request'
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Convert HTML report to Markdown
if: github.event_name == 'pull_request'
run: |
OUT="${{ env.PATCH_DIR }}"
echo "## Apache Yetus test-patch report" > yetus-report.md
echo "" >> yetus-report.md
if [ -f "$OUT/report.html" ]; then
pandoc "$OUT/report.html" -f html -t gfm >> yetus-report.md 2>/dev/null || {
echo "Pandoc conversion failed; using brief report." >> yetus-report.md
echo '```' >> yetus-report.md
cat "$OUT/brief.txt" >> yetus-report.md 2>/dev/null || true
echo '```' >> yetus-report.md
}
elif [ -f "$OUT/brief.txt" ]; then
echo '```' >> yetus-report.md
cat "$OUT/brief.txt" >> yetus-report.md
echo '```' >> yetus-report.md
else
echo "No Yetus report or brief found." >> yetus-report.md
fi
- name: Truncate if over comment limit
if: github.event_name == 'pull_request'
run: |
MAX=60000
if [ $(wc -c < yetus-report.md) -gt $MAX ]; then
head -c $MAX yetus-report.md > yetus-report-trimmed.md
echo "" >> yetus-report-trimmed.md
echo "" >> yetus-report-trimmed.md
echo "_Report truncated (GitHub comment limit). Full HTML in apacheyetuspatchdir artifact as report.html._" >> yetus-report-trimmed.md
mv yetus-report-trimmed.md yetus-report.md
fi
- name: Comment PR with Yetus report
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
continue-on-error: true
with:
token: ${{ secrets.YETUS_COMMENT_TOKEN || secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
issue-number: ${{ github.event.pull_request.number }}
body-path: yetus-report.md
13 changes: 13 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Relaxations for Yetus markdownlint (README and docs)
---
MD001: false
MD003: false
MD012: false
MD013:
line_length: 200
MD022: false
MD025: false
MD033: false
MD034: false
MD045: false
MD046: fenced
10 changes: 10 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Relax rules for workflow and config YAML (Yetus yamllint plugin)
---
extends: default

rules:
line-length:
max: 200
document-start: disable
truthy:
allowed-values: ['true', 'false', 'yes', 'no', 'on', 'off']
3 changes: 3 additions & 0 deletions .yetus/blanks-eol.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore trailing blanks in Yetus-generated patch/diff and logs (not source files).
# See --blanks-eol-ignore-file in the blanks plugin.
^out/
37 changes: 37 additions & 0 deletions .yetus/personality.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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.

# Ensure JAVA_HOME is set for pre-patch and other phases when running in
# the Yetus Docker container (avoids "JAVA_HOME is not defined" in pre-patch).
if [ -z "${JAVA_HOME}" ] && [ -d "/usr/lib/jvm/java-17-openjdk-amd64" ]; then
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
fi

# Pass JAVA_HOME into the re-exec Docker container so pre-patch and other
# phases see it (YETUS-913; otherwise the inner container may not get it).
## @audience private
## @stability stable
function docker_do_env_adds
{
declare k
# Use JAVA_HOME so detsecrets does not flag the literal path as high-entropy
DOCKER_EXTRAARGS+=("--env=JAVA_HOME=${JAVA_HOME}")
for k in "${DOCKER_EXTRAENVS[@]}"; do
[[ -z "${k}" ]] && continue
if [[ "JAVA_HOME" != "${k}" ]]; then
DOCKER_EXTRAARGS+=("--env=${k}=${!k}")
fi
done
}
Loading
Loading