mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-10 06:06:57 +08:00
feat: add cicd sacript feature
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
3ad8c28022
commit
0738a560a7
2
.github/workflows/opencommit.yml
vendored
2
.github/workflows/opencommit.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: 'OpenCommit Action'
|
||||
name: 'OpenIM Commit Action'
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
22
.github/workflows/openim-ci.yml
vendored
22
.github/workflows/openim-ci.yml
vendored
@ -111,24 +111,4 @@ jobs:
|
||||
# - name: golangci-lint
|
||||
# uses: golangci/golangci-lint-action@v3
|
||||
# with:
|
||||
# version: ${{ env.GOLANGCI_VERSION }}
|
||||
|
||||
# docker-image-tests:
|
||||
# runs-on: ubuntu-20.04
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
|
||||
# - name: Set up Go
|
||||
# uses: actions/setup-go@v3
|
||||
# with:
|
||||
# go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
# - name: Run tests
|
||||
# run: make build
|
||||
|
||||
# - name: Test docker image
|
||||
# run: |
|
||||
# docker build -t openim:ci-build .
|
||||
# version: ${{ env.GOLANGCI_VERSION }}
|
||||
1
.github/workflows/scripts-test.yml
vendored
1
.github/workflows/scripts-test.yml
vendored
@ -48,7 +48,6 @@ jobs:
|
||||
sudo ./scripts/build_all_service.sh
|
||||
sudo cat logs/openIM.log 2>/dev/null
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
- name: Start all services
|
||||
run: |
|
||||
|
||||
@ -40,9 +40,9 @@ type UserDatabase interface {
|
||||
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error)
|
||||
// 只要有一个存在就为true
|
||||
IsExist(ctx context.Context, userIDs []string) (exist bool, err error)
|
||||
//获取所有用户ID
|
||||
// 获取所有用户ID
|
||||
GetAllUserID(ctx context.Context, pageNumber, showNumber int32) ([]string, error)
|
||||
//函数内部先查询db中是否存在,存在则什么都不做;不存在则插入
|
||||
// 函数内部先查询db中是否存在,存在则什么都不做;不存在则插入
|
||||
InitOnce(ctx context.Context, users []*relation.UserModel) (err error)
|
||||
// 获取用户总数
|
||||
CountTotal(ctx context.Context, before *time.Time) (int64, error)
|
||||
|
||||
@ -83,7 +83,7 @@ func (u *UserGorm) Page(
|
||||
return
|
||||
}
|
||||
|
||||
// 获取所有用户ID
|
||||
// 获取所有用户ID.
|
||||
func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) {
|
||||
return userIDs, errs.Wrap(u.db(ctx).Limit(int(showNumber)).Offset(int((pageNumber-1)*showNumber)).Pluck("user_id", &userIDs).Error)
|
||||
}
|
||||
|
||||
@ -28,8 +28,10 @@
|
||||
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
|
||||
# To properly provided solutions that supports more than one platform you should use this option.
|
||||
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
|
||||
|
||||
## Build and push docker image for the manager for cross-platform support
|
||||
.PHONY: docker-buildx
|
||||
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
|
||||
docker-buildx:
|
||||
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
|
||||
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
|
||||
- docker buildx create --name project-v3-builder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user