-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: fengshunli <[email protected]>
- Loading branch information
1 parent
8fdc440
commit 9b96a9f
Showing
10 changed files
with
213 additions
and
14 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,7 @@ | ||
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax | ||
|
||
# The repo admins team will be the default owners for everything in the repo. | ||
# Unless a later match takes precedence, they will be requested for review when someone opens a pull request. | ||
|
||
/cubefs |
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,2 @@ | ||
MD013: | ||
line_length: 600 |
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,10 @@ | ||
# See https://github.com/helm/chart-testing#configuration | ||
remote: origin | ||
target-branch: master | ||
chart-dirs: | ||
- cubefs | ||
chart-repos: | ||
- cubefs-community=https://cubefs.github.io/cubefs-helm | ||
helm-extra-args: --timeout 600s | ||
additional-commands: | ||
- helm unittest --helm3 --strict --file unittests/*.yaml --file 'unittests/**/*.yaml' {{ .Path }} |
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,48 @@ | ||
name: Lint and Test Charts | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.8.1 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config .github/linters/ct.yaml) | ||
if [[ -n "$changed" ]]; then | ||
echo "name=changed::true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: install helm unittest plugin | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
helm env | ||
helm plugin install https://github.com/quintush/helm-unittest.git --version 0.2.8 | ||
- name: Run chart-testing (lint) | ||
run: ct lint --config .github/linters/ct.yaml | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --config .github/linters/ct.yaml |
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,31 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'cubefs/cubefs-helm' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.8.1 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_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,32 @@ | ||
name: Lint Code Base | ||
|
||
# Documentation: | ||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Lint Code Base | ||
uses: docker://github/super-linter:slim-v4 | ||
env: | ||
DEFAULT_BRANCH: master | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LINTER_RULES_PATH: .github/linters | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_BASH: false | ||
VALIDATE_JSCPD: false | ||
VALIDATE_KUBERNETES_KUBEVAL: false | ||
VALIDATE_PYTHON: false | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_BLACK: false | ||
VALIDATE_YAML: false | ||
VALIDATE_NATURAL_LANGUAGE: false |
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 @@ | ||
name: Sync CODEOWNERS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
./scripts/check-codeowners.sh > ${{ runner.temp }}/CODEOWNERS | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
- name: install yq | ||
run: | | ||
sudo snap install yq | ||
- name: commit codeowners | ||
run: | | ||
cp -f ${{ runner.temp }}/CODEOWNERS .github/CODEOWNERS | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
git add .github/CODEOWNERS | ||
git commit --signoff -m "change code owners" | ||
git push |
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,23 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- README.md | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
cp -f README.md ${{ runner.temp }}/README.md | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
- run: | | ||
cp -f ${{ runner.temp }}/README.md . | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
git add README.md | ||
git commit --signoff -m "Sync README from master" | ||
git push |
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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat <<EOF | ||
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax | ||
# The repo admins team will be the default owners for everything in the repo. | ||
# Unless a later match takes precedence, they will be requested for review when someone opens a pull request. | ||
EOF | ||
|
||
for DIR in $(ls -1 -d ./cubefs/*) | ||
do | ||
FILE="$DIR/Chart.yaml" | ||
DIR=$(echo $DIR | sed 's/^\.//') | ||
MAINTAINERS=$(yq e '.maintainers.[].name' $FILE| sed 's/^/@/' | sort --ignore-case) | ||
echo $DIR/ $MAINTAINERS | ||
done |