This is an automated email from the ASF dual-hosted git repository.
sarvekshayr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new b19addffe41 HDDS-14749. Run update-ozone-site-config-doc after
generate-config-doc (#9854)
b19addffe41 is described below
commit b19addffe41a8b9c5595172dae9969cf7f4929fb
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Mar 2 08:50:30 2026 +0100
HDDS-14749. Run update-ozone-site-config-doc after generate-config-doc
(#9854)
---
.github/workflows/ci.yml | 10 +++++
.github/workflows/generate-config-doc.yml | 2 +-
.github/workflows/update-ozone-site-config-doc.yml | 46 ++++++++--------------
3 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aa9d99cb35e..57d8c1cf44c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -135,6 +135,16 @@ jobs:
with:
sha: ${{ needs.build-info.outputs.sha }}
+ update-ozone-site-config-doc:
+ needs:
+ - generate-config-doc
+ if: |
+ github.event_name == 'push' &&
+ github.repository == 'apache/ozone' &&
+ github.ref_name == 'master'
+ uses: ./.github/workflows/update-ozone-site-config-doc.yml
+ secrets: inherit
+
compile:
needs:
- build-info
diff --git a/.github/workflows/generate-config-doc.yml
b/.github/workflows/generate-config-doc.yml
index 36452e497fd..8f8d18cd40d 100644
--- a/.github/workflows/generate-config-doc.yml
+++ b/.github/workflows/generate-config-doc.yml
@@ -22,7 +22,7 @@ on:
required: true
jobs:
- generate:
+ generate-config-doc:
runs-on: ubuntu-24.04
steps:
- name: Checkout project
diff --git a/.github/workflows/update-ozone-site-config-doc.yml
b/.github/workflows/update-ozone-site-config-doc.yml
index 9f986327a0f..20da07e9409 100644
--- a/.github/workflows/update-ozone-site-config-doc.yml
+++ b/.github/workflows/update-ozone-site-config-doc.yml
@@ -15,17 +15,13 @@
name: update-ozone-site-config-doc
on:
- workflow_run:
- workflows: ["build-branch"]
- types: [completed]
- branches: [master]
+ workflow_call:
+
+env:
+ BRANCH_NAME: automated-config-doc-update
jobs:
update-ozone-site-config-doc:
- if: |
- github.event.workflow_run.conclusion == 'success' &&
- github.repository == 'apache/ozone' &&
- !startsWith(github.event.workflow_run.head_commit.message, '[Auto]')
runs-on: ubuntu-24.04
steps:
- name: Download generated documentation
@@ -33,13 +29,10 @@ jobs:
with:
name: config-documentation
path: .
- run-id: ${{ github.event.workflow_run.id }}
- github-token: ${{ secrets.GITHUB_TOKEN }}
-
+
- name: Check if ozone-site repository exists
id: check-site-repo
run: |
- REPO_OWNER="${{ github.repository_owner }}"
if gh repo view "$REPO_OWNER/ozone-site" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
@@ -47,7 +40,7 @@ jobs:
echo "ozone-site repository not found for $REPO_OWNER, skipping"
fi
env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ REPO_OWNER: "${{ github.repository_owner }}"
- name: Checkout ozone-site repository
if: steps.check-site-repo.outputs.exists == 'true'
@@ -58,12 +51,12 @@ jobs:
git clone --depth=1 --branch=master https://github.com/${{
github.repository_owner }}/ozone-site.git ozone-site
- # Check if automated-config-doc-update branch exists remotely
+ # Check if $BRANCH_NAME branch exists remotely
cd ozone-site
- if git ls-remote --heads origin automated-config-doc-update | grep
-q automated-config-doc-update; then
+ if git ls-remote --heads origin $BRANCH_NAME | grep -q $BRANCH_NAME;
then
echo "PR branch exists, checking it out for comparison"
- git fetch --depth=1 origin automated-config-doc-update
- git checkout -B automated-config-doc-update FETCH_HEAD
+ git fetch --depth=1 origin $BRANCH_NAME
+ git checkout -B $BRANCH_NAME FETCH_HEAD
else
echo "PR branch does not exist, staying on master for comparison"
fi
@@ -103,7 +96,7 @@ jobs:
if: steps.check-changes.outputs.changed == 'true'
uses: actions/checkout@v4
with:
- ref: ${{ github.event.workflow_run.head_sha }}
+ ref: ${{ github.sha }}
path: ozone-repo
- name: Extract JIRA ID from commit message
@@ -111,7 +104,7 @@ jobs:
id: extract-jira
run: |
cd ozone-repo
- COMMIT_MSG=$(git log -1 --format='%s' ${{
github.event.workflow_run.head_sha }})
+ COMMIT_MSG=$(git log -1 --format='%s' ${{ github.sha }})
echo "Commit message: $COMMIT_MSG"
JIRA_ID=$(echo "$COMMIT_MSG" | grep -oE '(HDDS|OZONE)-[0-9]+' | head
-1 || echo "")
@@ -129,9 +122,6 @@ jobs:
run: |
cd ozone-site
- # Use single branch name
- BRANCH_NAME="automated-config-doc-update"
-
echo "Current branch: $(git branch --show-current)"
echo "Current commit: $(git rev-parse HEAD)"
@@ -144,7 +134,7 @@ jobs:
# Build commit message with JIRA ID if available
JIRA_ID="${{ steps.extract-jira.outputs.jira_id }}"
- COMMIT_MSG="[Auto] Update configuration documentation from ozone ${{
github.event.workflow_run.head_sha }}"
+ COMMIT_MSG="[Auto] Update configuration documentation from ozone ${{
github.sha }}"
if [ -n "$JIRA_ID" ]; then
COMMIT_MSG="$JIRA_ID. $COMMIT_MSG"
fi
@@ -158,20 +148,18 @@ jobs:
if: steps.check-changes.outputs.changed == 'true' && github.repository
== 'apache/ozone'
env:
GH_TOKEN: ${{ secrets.OZONE_WEBSITE_BUILD }}
+ JIRA_ID: ${{ steps.extract-jira.outputs.jira_id }}
+ REPO: ${{ github.repository }}
run: |
cd ozone-site
- BRANCH_NAME="automated-config-doc-update"
- REPO="${{ github.repository }}"
- JIRA_ID="${{ steps.extract-jira.outputs.jira_id }}"
-
# Generate PR body
../ozone-repo/dev-support/ci/pr_body_config_doc.sh \
"$REPO" \
"${{ github.workflow }}" \
"${{ github.run_id }}" \
- "${{ github.event.workflow_run.head_branch }}" \
- "${{ github.event.workflow_run.head_sha }}" \
+ "${{ github.ref_name }}" \
+ "${{ github.sha }}" \
"$JIRA_ID" > pr_body.txt
# Check if PR already exists
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]