-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into doc-plugin-management
Signed-off-by: liutianyou <[email protected]>
- Loading branch information
Showing
1,704 changed files
with
67,581 additions
and
76,665 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
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,38 @@ | ||
{ | ||
"name": "Hertzbeat DevContainer", | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/java:1": { | ||
"version": "17", | ||
"installMaven": "true", | ||
"installGradle": "false" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "20" | ||
}, | ||
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
// same extensions as Gitpod, should match /.gitpod.yml | ||
"extensions": [ | ||
"vscjava.vscode-java-pack", | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"stylelint.vscode-stylelint", | ||
"DavidAnson.vscode-markdownlint", | ||
"ms-azuretools.vscode-docker", | ||
"cweijan.vscode-database-client2", | ||
"GitHub.vscode-pull-request-github" | ||
] | ||
} | ||
}, | ||
"portsAttributes": { | ||
"4200": { | ||
"label": "Hertzbeat Web", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
"postCreateCommand": "java -version" | ||
} |
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
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ name: Backend CI | |
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
branches: [ master, dev, action* ] | ||
paths-ignore: | ||
- '**.md' | ||
- 'home/**' | ||
|
@@ -39,33 +39,43 @@ on: | |
- 'material/**' | ||
|
||
jobs: | ||
build: | ||
backend-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
- uses: actions/checkout@v4 | ||
- uses: ./script/ci/github-actions/setup-deps | ||
|
||
- name: Build with Maven | ||
run: mvn clean -B package -Prelease --file pom.xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Build Image | ||
env: | ||
IMAGE_PUSH: false | ||
IMAGE_LOAD: true | ||
IMAGE_PLATFORM: linux/amd64 | ||
run: | | ||
docker buildx create --use --name myBuilder --driver docker-container | ||
docker buildx use myBuilder | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./dist | ||
file: ./script/docker/server/Dockerfile | ||
push: false | ||
tags: apache/hertzbeat:test | ||
|
||
./script/docker/server/build.sh | ||
- name: Run E2E | ||
run: | | ||
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose | ||
sudo chmod u+x /usr/local/bin/docker-compose | ||
cd e2e | ||
sudo docker-compose version | ||
sudo docker-compose up --exit-code-from testing --remove-orphans | ||
cd e2e && ./start.sh | ||
# upload application logs | ||
- name: Upload logs & API test reports | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: hz-logs-${{ github.run_id }} | ||
path: | | ||
e2e/logs/ | ||
e2e/report/ |
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
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 |
---|---|---|
|
@@ -28,91 +28,37 @@ on: | |
- 'home/**' | ||
|
||
jobs: | ||
build: | ||
docs-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check filename in home/blog | ||
run: | | ||
TARGET_DIR="./home/blog" | ||
invalid_files=() | ||
while IFS= read -r -d '' file; do | ||
filename=$(basename "$file") | ||
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then | ||
invalid_files+=("$file") | ||
fi | ||
done < <(find "$TARGET_DIR" -type f -print0) | ||
if [ ${#invalid_files[@]} -ne 0 ]; then | ||
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)" | ||
for invalid_file in "${invalid_files[@]}"; do | ||
echo "$invalid_file" | ||
done | ||
exit 1 | ||
else | ||
echo "All file names are valid." | ||
fi | ||
- name: Check filename in home/docs | ||
run: | | ||
TARGET_DIR="./home/docs" | ||
invalid_files=() | ||
while IFS= read -r -d '' file; do | ||
filename=$(basename "$file") | ||
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then | ||
invalid_files+=("$file") | ||
fi | ||
done < <(find "$TARGET_DIR" -type f -print0) | ||
if [ ${#invalid_files[@]} -ne 0 ]; then | ||
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)" | ||
for invalid_file in "${invalid_files[@]}"; do | ||
echo "$invalid_file" | ||
done | ||
exit 1 | ||
else | ||
echo "All file names are valid." | ||
fi | ||
- name: Check filename in /zh-cn/docusaurus-plugin-content-blog | ||
run: | | ||
TARGET_DIR="./home/i18n/zh-cn/docusaurus-plugin-content-blog" | ||
invalid_files=() | ||
while IFS= read -r -d '' file; do | ||
filename=$(basename "$file") | ||
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then | ||
invalid_files+=("$file") | ||
fi | ||
done < <(find "$TARGET_DIR" -type f -print0) | ||
if [ ${#invalid_files[@]} -ne 0 ]; then | ||
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)" | ||
for invalid_file in "${invalid_files[@]}"; do | ||
echo "$invalid_file" | ||
done | ||
exit 1 | ||
else | ||
echo "All file names are valid." | ||
fi | ||
- name: Check filename in /home/i18n/zh-cn/docusaurus-plugin-content-docs/current | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Check Markdown | ||
uses: DavidAnson/markdownlint-cli2-action@v16 | ||
with: | ||
globs: './home/**/*.md' | ||
|
||
- name: Check filenames | ||
run: python ./script/ci/docs/check_file_name.py ./script/ci/docs/check_file_name.json | ||
|
||
- name: Dead Link Check | ||
run: | | ||
TARGET_DIR="./home/i18n/zh-cn/docusaurus-plugin-content-docs/current" | ||
invalid_files=() | ||
while IFS= read -r -d '' file; do | ||
filename=$(basename "$file") | ||
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then | ||
invalid_files+=("$file") | ||
sudo npm install -g [email protected] | ||
for file in $(find ./home -name "*.md"); do | ||
if ! grep -Fxq "$file" ./script/ci/exclude_files.txt; then | ||
markdown-link-check -c ./script/ci/link_check.json -q "$file" | ||
fi | ||
done < <(find "$TARGET_DIR" -type f -print0) | ||
if [ ${#invalid_files[@]} -ne 0 ]; then | ||
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)" | ||
for invalid_file in "${invalid_files[@]}"; do | ||
echo "$invalid_file" | ||
done | ||
exit 1 | ||
else | ||
echo "All file names are valid." | ||
fi | ||
done | ||
- name: NPM INSTALL | ||
working-directory: home | ||
run: npm install | ||
|
||
- name: NPM BUILD | ||
working-directory: home | ||
run: npm run 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 |
---|---|---|
|
@@ -53,4 +53,3 @@ jobs: | |
path: docs-en.pdf | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
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
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
Oops, something went wrong.