-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add openim helm charts test cicd (#31)
* fix: add openim helm charts test cicd Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim helm cicd actiosn Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim name: Helm Template Comment Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add new actions test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim test helm Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim test helm Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * fix: add openim test helm Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim helm charts test Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim helm charts cicd and refactor Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add openim helm charts cicd and refactor Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add helm charts test cicd Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> * feat: add helm charts test cicd Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]> --------- Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>
- Loading branch information
Showing
212 changed files
with
1,162 additions
and
69 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,12 @@ | ||
## Reference: https://github.com/helm/chart-releaser | ||
index-path: "./index.yaml" | ||
|
||
# PGP signing | ||
sign: true | ||
key: Argo Helm maintainers | ||
# keyring: # Set via env variable CR_KEYRING | ||
# passphrase-file: # Set via env variable CR_PASSPHRASE_FILE | ||
|
||
# Enable automatic generation of release notes using GitHubs release notes generator. | ||
# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes | ||
generate-release-notes: true |
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,15 @@ | ||
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md | ||
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore | ||
# Only Used for the CT Install Stage | ||
remote: origin | ||
target-branch: main | ||
chart-dirs: | ||
- charts | ||
chart-repos: | ||
- dandydeveloper=https://dandydeveloper.github.io/charts/ | ||
helm-extra-args: "--timeout 600s" | ||
validate-chart-schema: false | ||
validate-maintainers: true | ||
validate-yaml: true | ||
exclude-deprecated: true | ||
excluded-charts: [] |
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,14 @@ | ||
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md | ||
# Don't add the 'debug' attribute, otherwise the workflow won't work anymore | ||
# Only Used for the CT Lint Stage | ||
remote: origin | ||
target-branch: main | ||
chart-dirs: | ||
- charts | ||
chart-repos: | ||
- dandydeveloper=https://dandydeveloper.github.io/charts/ | ||
validate-chart-schema: false | ||
validate-maintainers: true | ||
validate-yaml: true | ||
exclude-deprecated: true | ||
excluded-charts: [] |
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 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
- role: worker | ||
- role: worker |
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,11 @@ | ||
openim-server: | ||
- charts/openim-server/**/* | ||
|
||
openim-chat: | ||
- charts/openim-chat/**/* | ||
|
||
openim-admin: | ||
- charts/openim-admin/**/* | ||
|
||
openim-web: | ||
- charts/openim-web/**/* |
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,42 @@ | ||
--- | ||
rules: | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: | ||
require-starting-space: true | ||
min-spaces-from-content: 1 | ||
document-end: disable | ||
document-start: disable # No --- to start a file | ||
empty-lines: | ||
max: 2 | ||
max-start: 0 | ||
max-end: 0 | ||
hyphens: | ||
max-spaces-after: 1 | ||
indentation: | ||
spaces: consistent | ||
indent-sequences: whatever # - list indentation will handle both indentation and without | ||
check-multi-line-strings: false | ||
key-duplicates: enable | ||
line-length: disable # Lines can be any length | ||
new-line-at-end-of-file: enable | ||
new-lines: | ||
type: unix | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
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 @@ | ||
# Copyright © 2023 OpenIM. All rights reserved. | ||
# | ||
# Licensed 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 warns and then closes issues and PRs that have had no activity for a specified amount of time. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
# For more information, see: | ||
# https://github.com/actions/stale | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
stale: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
days-before-stale: 60 | ||
days-before-close: 7 | ||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' | ||
stale-pr-message: 'This issue is stale because it has been open 60 days with no activity.' | ||
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' | ||
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity. You can reopen it if you want.' | ||
stale-pr-label: lifecycle/stale | ||
stale-issue-label: lifecycle/stale | ||
exempt-issue-labels: 'openim' | ||
exempt-pr-labels: 'openim' | ||
exempt-draft-pr: true |
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,43 @@ | ||
# Copyright © 2023 OpenIM open source community. All rights reserved. | ||
# | ||
# Licensed 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: Assign issue to comment author | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
assign-issue: | ||
if: | | ||
contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') && | ||
!contains(github.event.comment.user.login, 'openimbot') && | ||
!contains(github.event.comment.user.login, 'kubbot') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Assign the issue | ||
run: | | ||
export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title') | ||
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" | ||
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" | ||
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" | ||
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!" | ||
env: | ||
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} | ||
ISSUE: ${{ github.event.issue.html_url }} | ||
OWNER: ${{ github.repository_owner }} | ||
REPO: ${{ github.event.repository.name }} |
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,72 @@ | ||
# Copyright © 2023 OpenIM open source community. All rights reserved. | ||
# | ||
# Licensed 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: Auto PR to release | ||
|
||
on: | ||
pull_request: | ||
# types: | ||
# - closed | ||
issue_comment: | ||
types: [created] | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
jobs: | ||
sync-issue-to-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Sync Issue to PR | ||
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' | ||
run: | | ||
PR_BODY="${{ github.event.pull_request.body }}" | ||
ISSUE_NUMBER=$(echo "$PR_BODY" | grep -oP 'Fixes #\K\d+') | ||
if [[ -z "$ISSUE_NUMBER" ]]; then | ||
echo "No Issue number found." | ||
exit 1 | ||
fi | ||
echo "Issue number found: $ISSUE_NUMBER" | ||
# Using GitHub CLI to get issue details | ||
gh issue view "$ISSUE_NUMBER" --repo "${{ github.repository }}" --json labels,assignees,milestone,title > issue_data.json | ||
# Check if jq is installed | ||
if ! command -v jq &> /dev/null; then | ||
echo "Installing jq..." | ||
sudo apt-get install -y jq | ||
fi | ||
# Parse data with jq | ||
LABELS=$(jq -r '.labels | map(.name) | join(",")' issue_data.json) | ||
ASSIGNEES=$(jq -r '.assignees | map(.login) | join(",")' issue_data.json) | ||
MILESTONE=$(jq -r '.milestone.title' issue_data.json) | ||
# Check if any of the fields are empty and set them to None | ||
LABELS=${LABELS:-None} | ||
ASSIGNEES=${ASSIGNEES:-None} | ||
MILESTONE=${MILESTONE:-None} | ||
# Edit the PR with issue details, handling empty fields | ||
gh pr edit "${{ github.event.pull_request.number }}" --repo "${{ github.repository }}" \ | ||
${LABELS:+--add-label "$LABELS"} \ | ||
${ASSIGNEES:+--add-assignee "$ASSIGNEES"} \ | ||
${MILESTONE:+--milestone "$MILESTONE"} | ||
continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_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,53 @@ | ||
# Copyright © 2023 OpenIM open source community. All rights reserved. | ||
# | ||
# Licensed 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: Invite users to join our group | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
jobs: | ||
issue_comment: | ||
name: Invite users to join our group | ||
if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
|
||
- name: Invite user to join our group | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us. | ||
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server. | ||
In addition to Slack, we also offer the following ways to get in touch: | ||
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel. | ||
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email. | ||
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a> Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information. | ||
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a> Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible. | ||
- name: Close Issue | ||
uses: peter-evans/close-issue@v3 | ||
with: | ||
token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.issue.number }} | ||
comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above | ||
labels: | | ||
triage/accepted |
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,52 @@ | ||
# Copyright © 2023 OpenIM. All rights reserved. | ||
# | ||
# Licensed 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: OpenIM Create Tag | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request_review_comment: | ||
types: [created] | ||
|
||
jobs: | ||
create_tag: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.comment.body, '/create tag') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate version number and get comment | ||
id: validate | ||
run: | | ||
COMMENT="${{ github.event.comment.body }}" | ||
VERSION=$(echo $COMMENT | cut -d ' ' -f 3) | ||
TAG_COMMENT=$(echo $COMMENT | cut -d '"' -f 2) | ||
if [[ $VERSION =~ ^v([0-9]+\.){2}[0-9]+$ ]]; then | ||
echo "version=$VERSION" >> $GITHUB_STATE | ||
echo "tag_comment=$TAG_COMMENT" >> $GITHUB_STATE | ||
else | ||
echo "Invalid version number." | ||
exit 1 | ||
fi | ||
- name: Create a new tag | ||
env: | ||
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
run: | | ||
source $GITHUB_STATE | ||
git tag -a $VERSION -m "$tag_comment" | ||
git push origin $VERSION | ||
echo "tag_created=$VERSION" >> $GITHUB_OUTPUT |
Oops, something went wrong.