forked from apache/ozone-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'HDDS-9225-website-v2' into ci
* HDDS-9225-website-v2: HDDS-10255. Update Release Manager Guide after importing it to the new website. (apache#67) HDDS-9568. Add docusaurus build check in github actions (apache#71) HDDS-10266. Auto label PRs for the new website. (apache#68) HDDS-10267. Add PR template for the new website. (apache#70) HDDS-9603. Add PR title check (apache#69) HDDS-9564. Create Ozone Social Card. (apache#62) HDDS-10233. Apache Release Manager Guide (apache#66) HDDS-10203. Update Github actions to v4 since Node.js 16 actions are deprecated. (apache#60) HDDS-9612. Add CONTRIBUTING.md for the new Ozone website (apache#54) HDDS-9865. Add outline of docs sections and pages. (apache#53) HDDS-9926. Publish WIP website to staging branch (2/2) (apache#56) Conflicts: docs/01-overview.md docs/03-core-concepts/04-security/01-authentication/01-kerberos.md docs/05-administrator-guide/02-configuration/03-security/01-kerberos.md progress.sh
- Loading branch information
Showing
156 changed files
with
2,083 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 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. | ||
|
||
# Configuration for .github/workflows/label-pr.yml | ||
# This workflow and its configuration can be deleted once the website's feature branch is merged. | ||
website-v2: | ||
- base-branch: HDDS-9225-website-v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## What changes were proposed in this pull request? | ||
|
||
Provide a one line summary of the changes in the PR **Title** field above. | ||
It should be in the form of `HDDS-1234. Short summary of the change`. | ||
|
||
Please describe your PR in detail: | ||
- What changes are proposed in the PR and why? It would be better if it is written from third person's perspective not just for the reviewer. | ||
- Provide as much context and rationale for the pull request as possible. It could be copy-pasted from the Jira's description if the Jira is well defined. | ||
|
||
## What is the link to the Apache Jira? | ||
|
||
1. Please create an issue in ASF Jira before opening a pull request. | ||
2. Start the title of the pull request with the corresponding Jira issue number (e.g. HDDS-XXXX. Fix a typo in YYY). | ||
3. Add the `website` and/or `documentation` labels to your Jira if applicable. | ||
4. Replace this section with the link to the Apache Jira. | ||
|
||
## How was this patch tested? | ||
|
||
Please explain how this patch was tested. In most cases this will just be checking the local preview of the website, but existing CI checks should also pass. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
|
||
# 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. | ||
|
||
TITLE=$1 | ||
|
||
assertMatch() { | ||
echo "${TITLE}" | grep -E "$1" >/dev/null | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo $2 | ||
exit 1 | ||
fi | ||
} | ||
|
||
assertNotMatch() { | ||
echo "${TITLE}" | grep -E -v "$1" >/dev/null | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo $2 | ||
exit 1 | ||
fi | ||
} | ||
|
||
# strip starting 'Revert "', if any | ||
TITLE=${TITLE#Revert \"} | ||
if [ "$1" != "${TITLE}" ]; then | ||
echo "Leading 'Revert \"' in the PR title has been stripped solely for this title checking purpose. Performing actual title check on:" | ||
echo "${TITLE}" | ||
fi | ||
|
||
assertMatch '^HDDS' 'Fail: must start with HDDS' | ||
assertMatch '^HDDS-' 'Fail: missing dash in Jira' | ||
assertNotMatch '^HDDS-0' 'Fail: leading zero in Jira' | ||
assertMatch '^HDDS-[1-9][0-9]{0,4}[^0-9]' 'Fail: Jira must be 1 to 5 digits' | ||
assertMatch '^HDDS-[1-9][0-9]{0,4}\.' 'Fail: missing dot after Jira' | ||
assertMatch '^HDDS-[1-9][0-9]{0,4}\. ' 'Fail: missing space after Jira' | ||
assertNotMatch '[[:space:]]$' 'Fail: trailing space' | ||
assertNotMatch '\.{3,}$' 'Fail: trailing ellipsis indicates title is cut' | ||
assertNotMatch '…$' 'Fail: trailing ellipsis indicates title is cut' | ||
assertNotMatch '[[:space:]]{2}' 'Fail: two consecutive spaces' | ||
assertMatch '^HDDS-[1-9][0-9]{0,4}\. .*[^ ]$' 'Fail: not match "^HDDS-[1-9][0-9]{0,4}\. .*[^ ]$"' | ||
|
||
echo 'OK' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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: docusaurus | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
push: | ||
|
||
concurrency: | ||
group: docusaurus-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Build Docker image | ||
run: | | ||
docker compose build | ||
- name: Run test | ||
run: | | ||
docker compose run site pnpm build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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. | ||
|
||
# This workflow reads its configuration from the .github/labeler.yml file. | ||
# This workflow and its configuration can be deleted once the website's feature branch is merged. | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
labeler: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# 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. | ||
|
||
# Build Ozone website v2 and commit it to a staging branch. | ||
# This will be picked up by configurations in .asf.yml to publish it to a staging domain. | ||
name: "auto-publish-website-v2" | ||
|
||
on: | ||
push: | ||
branches: | ||
# TODO update this to master when the new website is ready to be published. | ||
- HDDS-9225-website-v2 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out the website source in the current working directory. | ||
- name: "Checkout source branch ${{ github.ref_name }}" | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'src' | ||
- name: "Build website" | ||
working-directory: 'src' | ||
# Website source is mounted as volume, so the build output ends up in ./src/build outside of the container. | ||
run: | | ||
docker compose run site pnpm run build | ||
- name: "Checkout publish branch" | ||
uses: actions/checkout@v4 | ||
with: | ||
path: 'publish' | ||
# TODO update this to asf-site when the website is ready to be published. | ||
ref: 'asf-site-v2' | ||
- name: "Commit changes" | ||
working-directory: 'publish' | ||
run: | | ||
# Delete previous build from the branch, but preserve files with necessary metadata. | ||
mv README.md .asf.yaml .git /tmp | ||
rm -rf $(ls -A) | ||
mv /tmp/README.md /tmp/.asf.yaml /tmp/.git . | ||
# Commit new build to the branch. | ||
cp -R ../src/build/. . | ||
git config --global user.name 'Github Actions' | ||
git config --global user.email 'noreply@github.com' | ||
git add . | ||
git commit -a -m "[auto] Apply changes from $GITHUB_REF_NAME $GITHUB_SHA" || true | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
name: pull request | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- reopened | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
title: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Check pull request title | ||
env: | ||
TITLE: ${{ github.event.pull_request.title }} | ||
run: | ||
.github/scripts/pr_title_check.sh "${TITLE}" | ||
|
Oops, something went wrong.