Skip to content

Commit 8178564

Browse files
authored
fix: delete batch build all file (#561)
* fix: delete batch build all file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add cicd sacript feature Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: docker scripts Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add openim fix scripts Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: fix scripts show Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cicd: add ci workflow Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: about the distribution of the strategy Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: github release fix Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: build bing file: Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add openim server Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add more cicd auto Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test file Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add before module Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add copyright dispose Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add tools user Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: More support Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: signing commit Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add release Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add release Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add cicd actions Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add test login Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add release copyright Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add release copyright Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add release copyright Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: go release quest Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * cide: add ca Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: cicd action about lock issue Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: cicd action about lock issue Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * feat: add comment remark Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: cicd about gosec Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> * fix: cicd about gosec Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
1 parent 6de9995 commit 8178564

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1405
-1320
lines changed

Diff for: .env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
USER=root
22
PASSWORD=openIM123
3-
MINIO_ENDPOINT=http://127.0.0.1:10005
4-
API_URL=http://127.0.0.1:10002/object/
3+
MINIO_ENDPOINT=http://116.30.3.80:10005
4+
API_URL=http://116.30.3.80:10002/object/
55
DATA_DIR=./

Diff for: .github/workflows/auto-release.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Automatic Rebase
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
rebase:
7+
name: Rebase
8+
runs-on: ubuntu-latest
9+
if: >-
10+
github.event.issue.pull_request != '' &&
11+
(
12+
contains(github.event.comment.body, '/rebase') ||
13+
contains(github.event.comment.body, '/autosquash')
14+
)
15+
steps:
16+
- name: Checkout the latest code
17+
uses: actions/checkout@v3
18+
with:
19+
token: ${{ secrets.BOT_GITHUB_TOKEN }}
20+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
21+
- name: Automatic Rebase
22+
uses: cirrus-actions/[email protected]
23+
with:
24+
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

Diff for: .github/workflows/bot-auto-cherry-pick.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 'Github Rebot for Cherry Pick when PR is merged'
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
7+
jobs:
8+
comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Comment cherry-pick command
12+
uses: actions/github-script@v5
13+
with:
14+
script: |
15+
const pr = context.payload.pull_request;
16+
if (!pr.merged) {
17+
console.log("PR is not merged. Skipping...");
18+
return;
19+
}
20+
if (!pr.milestone || !pr.milestone.title) {
21+
console.log("Milestone is not set. Skipping...");
22+
return;
23+
}
24+
const milestone = pr.milestone.title;
25+
const ref = `heads/release-${milestone}`;
26+
let branchExists;
27+
try {
28+
await github.rest.git.getRef({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
ref: ref
32+
});
33+
branchExists = true;
34+
} catch (error) {
35+
if (error.status === 404) {
36+
console.log(`Branch ${ref} does not exist. Skipping...`);
37+
branchExists = false;
38+
} else {
39+
throw error; // Rethrow if it's another error
40+
}
41+
}
42+
if (!branchExists) {
43+
return;
44+
}
45+
const cherryPickCmd = `/cherry-pick release-${milestone}`;
46+
console.log(`Adding comment: ${cherryPickCmd}`);
47+
await github.rest.issues.createComment({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
issue_number: pr.number,
51+
body: cherryPickCmd
52+
});
53+
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}

Diff for: .github/workflows/bot-cherry-pick.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Github Rebot for Cherry Pick On Comment
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
cherry-pick:
7+
name: Cherry Pick
8+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='kubbot'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout the latest code
12+
uses: actions/checkout@v2
13+
with:
14+
token: ${{ secrets.BOT_GITHUB_TOKEN }}
15+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
16+
- name: Automatic Cherry Pick
17+
uses: vendoo/gha-cherry-pick@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

Diff for: .github/workflows/build-docker-image.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright © 2023 OpenIM open source community. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: OpenIM Build Docker Images
216
on:
317
push:
@@ -9,8 +23,7 @@ jobs:
923
strategy:
1024
matrix:
1125
bin:
12-
- ssserver
13-
- sslocal
26+
- openim-server
1427
steps:
1528
- name: Checkout
1629
uses: actions/checkout@v3

Diff for: .github/workflows/cla.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "OpenIM CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
9+
permissions:
10+
actions: write
11+
contents: write
12+
pull-requests: write
13+
statuses: write
14+
15+
env:
16+
# Define Open-IM-Server variables here
17+
REMOTE_ORGANIZATION: open-im-server
18+
REMOTE_REPOSITORY: cla
19+
20+
OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
21+
OPEN_IM_SERVER_SIGNATURES_PATH: signatures/openkf/cla.json
22+
OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
23+
OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
24+
25+
jobs:
26+
CLAAssistant:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: "CLA Assistant"
30+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
31+
uses: contributor-assistant/[email protected]
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
34+
PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
35+
with:
36+
path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }}
37+
path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }}
38+
branch: 'main'
39+
allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }}
40+
41+
remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
42+
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
43+
create-file-commit-message: '📚 Docs: Creating file for storing ${{ env.REMOTE_ORGANIZATION }} CLA Signatures'
44+
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md)'
45+
custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
46+
custom-allsigned-prcomment: '🤖 All Contributors have signed the ${{ env.REMOTE_ORGANIZATION }} [CLA](https://github.com/openim-sigs/cla/blob/main/README.md).'
47+
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
48+
# use-dco-flag: true - If you are using DCO instead of CLA

Diff for: .github/workflows/deploy.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: deploy for dev
2+
3+
on:
4+
push:
5+
branches:
6+
- 'devops' # Only for the dev branch
7+
paths:
8+
- '.github/workflows/*'
9+
# - '__test__/**' # dev No immediate testing is required
10+
- 'src/**'
11+
- 'Dockerfile'
12+
- 'docker-compose.yml'
13+
- 'bin/*'
14+
15+
jobs:
16+
deploy-dev:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: set ssh key # Temporarily set up ssh key
22+
run: |
23+
mkdir -p ~/.ssh/
24+
# secrets.WFP_ID_RSA set in GitHub
25+
echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa
26+
chmod 600 ~/.ssh/id_rsa
27+
ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts
28+
- name: deploy # Deployment
29+
run: |
30+
31+
# 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory
32+
# Then git clone https://username:[email protected]/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password)
33+
# Remember to delete origin to avoid exposing GitHub password
34+
35+
cd /home/work/imooc-lego/biz-editor-server;
36+
git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git;
37+
git checkout dev;
38+
git pull origin dev; # Download the latest code again
39+
git remote remove origin; # Remove origin to avoid exposing GitHub password
40+
# Start docker
41+
docker-compose build editor-server; # Same as the service name in docker-compose.yml
42+
docker-compose up -d;
43+
"
44+
- name: delete ssh key # Delete ssh key
45+
run: rm -rf ~/.ssh/id_rsa

Diff for: .github/workflows/depsreview.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright © 2023 KubeCub open source community. All rights reserved.
2+
# Licensed under the MIT License (the "License");
3+
# you may not use this file except in compliance with the License.
4+
5+
name: Dependency Review
6+
on: [pull_request]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
dependency-review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: 'Checkout Repository'
16+
uses: actions/checkout@v3
17+
- name: 'Dependency Review'
18+
uses: actions/dependency-review-action@v3

Diff for: .github/workflows/e2e-test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# name: OpenIM e2e Test

Diff for: .github/workflows/golangci-link.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515

16-
name: OpenKF golangci-lint
16+
name: OpenIM golangci-lint
1717
on:
1818
push:
1919
branches: [main]

Diff for: .github/workflows/gosec.yml

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
# name: Run gosec
1+
name: OpenIM Run Gosec
22

3-
# # gosec is a source code security audit tool for the Go language. It performs a static
4-
# # analysis of the Go code, looking for potential security problems. The main functions of gosec are:
5-
# # 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
6-
# # 2. Audit codes according to common security standards and find non-standard codes.
7-
# # 3. Assist the Go language engineer to write safe and reliable code.
3+
# gosec is a source code security audit tool for the Go language. It performs a static
4+
# analysis of the Go code, looking for potential security problems. The main functions of gosec are:
5+
# 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
6+
# 2. Audit codes according to common security standards and find non-standard codes.
7+
# 3. Assist the Go language engineer to write safe and reliable code.
8+
# https://github.com/securego/gosec/
9+
on:
10+
push:
11+
branches: "*"
12+
pull_request:
13+
branches: "*"
14+
paths-ignore:
15+
- '*.md'
16+
- '*.yml'
17+
- '.github'
818

9-
# on:
10-
# push:
11-
# branches: "*"
12-
# pull_request:
13-
# branches: "*"
14-
# paths-ignore:
15-
# - '*.md'
16-
# - '*.yml'
17-
# - '.github'
18-
19-
# jobs:
20-
# golang-security-action:
21-
# runs-on: ubuntu-latest
22-
# env:
23-
# GO111MODULE: on
24-
# steps:
25-
# - name: Check out code
26-
# uses: actions/checkout@v3
27-
# - name: Run Gosec Security Scanner
28-
# uses: securego/gosec@master
29-
# with:
30-
# args: ./...
19+
jobs:
20+
golang-security-action:
21+
runs-on: ubuntu-latest
22+
env:
23+
GO111MODULE: on
24+
steps:
25+
- name: Check out code
26+
uses: actions/checkout@v3
27+
- name: Run Gosec Security Scanner
28+
uses: securego/gosec@master
29+
with:
30+
args: ./...
31+
continue-on-error: true

Diff for: .github/workflows/image.yml

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright © 2023 OpenIM open source community. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Build Image
216

317
on:

0 commit comments

Comments
 (0)