Compare commits

..

6 Commits
cjy ... main

Author SHA1 Message Date
5835cb8de1 Merge branch 'main' of https://gitea-inner.fontree.cn/chain/chain-dci 2025-10-22 15:15:07 +08:00
3e937b66b2 Update .drone.yml 2025-10-17 14:04:39 +08:00
c44ea83b6c Update .drone.yml 2025-10-17 14:04:09 +08:00
36f396de6e Update .drone.yml 2025-10-17 13:53:43 +08:00
jhc
5c888cb1c4 Merge branch 'dev' of http://172.16.100.91:3000/chain/chain-dci into dev
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-18 15:00:00 +08:00
d13ca6fe3e Update .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-12 13:18:09 +08:00
6 changed files with 35 additions and 36 deletions

View File

@ -4,27 +4,49 @@ name: chain-dci【K8s-测试服】
volumes: volumes:
- name: pkgdeps - name: pkgdeps
host: host:
path: /mnt/storage/data/drone/define_cache/chain-dci path: /mnt/data/drone/define_cache/chain-dci
- name: docker - name: docker
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: docker-daemon - name: docker-daemon
host: host:
path: /etc/docker/daemon.json path: /etc/docker/daemon.json
clone:
disable: true
steps: steps:
- name: clone-and-configure
image: testhub.szjixun.cn:9043/public/plugins/git
environment:
GITEA_USERNAME:
from_secret: GITEA_USERNAME
GITEA_TOKEN:
from_secret: GITEA_TOKEN
commands:
# 手动克隆主仓库
- git init
- git remote add origin https://${GITEA_USERNAME}:${GITEA_TOKEN}@gitea-inner.fontree.cn/chain/chain-dci
- git fetch --no-tags origin +refs/heads/dev
- git reset --hard origin/dev
# 配置子模块 URL 重定向
- git config --global url."https://${GITEA_USERNAME}:${GITEA_TOKEN}@gitea-inner.fontree.cn/fonchain/oa-proto.git".insteadOf "https://gitea-net.fontree.cn/fonchain/oa-proto.git"
# 配置 HTTPS 凭据
# - git config --global credential.helper 'store --file=/tmp/git-credentials'
# - echo "https://${GITEA_USERNAME}:${GITEA_TOKEN}@gitea-inner.fontree.cn" > /tmp/git-credentials
# 更新子模块
- git submodule update --init --recursive
when:
branch:
- dev
- name: fetch submodules - name: fetch submodules
image: testhub.szjixun.cn:9043/public/plugins/git image: testhub.szjixun.cn:9043/public/plugins/git
pull: if-not-exists pull: if-not-exists
commands: commands:
- git config --file=.gitmodules submodule.oa-proto.url https://gitea-inner.fontree.cn/fonchain/oa-proto.git
- git submodule sync
- git submodule update --init --force --recursive --remote - git submodule update --init --force --recursive --remote
- name: build - name: build
image: testhub.szjixun.cn:9043/public/golang:1.20-alpine image: testhub.szjixun.cn:9043/public/golang:1.20-alpine
pull: if-not-exists pull: if-not-exists
network:
mode: bridge
options:
com.docker.network.bridge.host_binding_ipv4: "172.16.100.22"
com.docker.network.bridge.name: "dnmp_default"
environment: environment:
GOPROXY: "https://goproxy.cn,direct" GOPROXY: "https://goproxy.cn,direct"
GOPATH: /go GOPATH: /go
@ -34,6 +56,7 @@ steps:
path: /go/pkg path: /go/pkg
commands: commands:
- cp DockerfileTest Dockerfile - cp DockerfileTest Dockerfile
- go mod tidy
- CGO_ENABLED=0 go build -ldflags "-s -w" -o chain-dci-server ./cmd - CGO_ENABLED=0 go build -ldflags "-s -w" -o chain-dci-server ./cmd
- name: publish - name: publish
image: testhub.szjixun.cn:9043/public/plugins/docker image: testhub.szjixun.cn:9043/public/plugins/docker
@ -66,7 +89,6 @@ steps:
dashboard: kuboard dashboard: kuboard
build_repo: build_repo:
from_secret: build_repo from_secret: build_repo
- name: 钉钉通知 - name: 钉钉通知
image: testhub.szjixun.cn:9043/public/drone-ding image: testhub.szjixun.cn:9043/public/drone-ding
settings: settings:
@ -81,15 +103,11 @@ steps:
db_log: true db_log: true
db_type: mysql db_type: mysql
db_name: notelog db_name: notelog
db_host: "172.16.100.99"
db_port: 9007
db_username: artuser # 后期需要修改
db_password: "C250PflXIWv2SQm8" # 后期需要修改
when: when:
status: [ failure, success ] status: [ failure, success ]
branch: dev branch: dev
network: network:
subnet: 172.18.0.0/16 subnet: dnmp_default
trigger: trigger:
branch: branch:
- dev - dev

View File

@ -23,10 +23,6 @@ BccrYXT:
access_key_id: "ACSvp2GUdWUucS7r" access_key_id: "ACSvp2GUdWUucS7r"
access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg" access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg"
end_point: "openapi-sit.antchain.antgroup.com" end_point: "openapi-sit.antchain.antgroup.com"
BccrYXTT:
access_key_id: "ACP3FoMEReCspQE9"
access_key_secret: "dSKMGNjByXJsd1jcqjZomSPkwvR9AfBJ"
end_point: "openapi-sit.antchain.antgroup.com"
#aliYunRtc: #aliYunRtc:
# appid: "aeztom27" # appid: "aeztom27"
# app_key: "76c62466cbd77d7a3606660a15861d1e" # app_key: "76c62466cbd77d7a3606660a15861d1e"

View File

@ -17,10 +17,6 @@ BccrYXT:
access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg" access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg"
# end_point: "openapi.antchain.antgroup.com" # 正式的 endpoint # end_point: "openapi.antchain.antgroup.com" # 正式的 endpoint
end_point: "openapi-sit.antchain.antgroup.com" # 测试式的 endpoint end_point: "openapi-sit.antchain.antgroup.com" # 测试式的 endpoint
BccrYXTT:
access_key_id: "ACP3FoMEReCspQE9"
access_key_secret: "dSKMGNjByXJsd1jcqjZomSPkwvR9AfBJ"
end_point: "openapi-sit.antchain.antgroup.com" # 测试式的 endpoint
#redis: #redis:
# db: ${oa-meeting.redis.db} # db: ${oa-meeting.redis.db}
# addr: ${redis.addr} # addr: ${redis.addr}

View File

@ -9,10 +9,6 @@ BccrYXT:
access_key_id: "ACSvp2GUdWUucS7r" access_key_id: "ACSvp2GUdWUucS7r"
access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg" access_key_secret: "dQ8hFkLs2qnMNYRuvrtzDp6mtQB7uVwg"
end_point: "openapi.antchain.antgroup.com" end_point: "openapi.antchain.antgroup.com"
BccrYXTT:
access_key_id: "ACP3FoMEReCspQE9"
access_key_secret: "dSKMGNjByXJsd1jcqjZomSPkwvR9AfBJ"
end_point: "openapi.antchain.antgroup.com"
#redis: #redis:
# db: ${oa-meeting.redis.db} # db: ${oa-meeting.redis.db}
# addr: ${redis.addr} # addr: ${redis.addr}

View File

@ -2,13 +2,12 @@ package config
import ( import (
"chain-dci/pkg/msg" "chain-dci/pkg/msg"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"fmt" "fmt"
"github.com/spf13/viper"
"os" "os"
"reflect" "reflect"
"strings" "strings"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"github.com/spf13/viper"
) )
var Data = new(AppConfig) var Data = new(AppConfig)
@ -40,11 +39,6 @@ type AppConfig struct {
AccessKeySecret string `mapstructure:"access_key_secret"` AccessKeySecret string `mapstructure:"access_key_secret"`
EndPoint string `mapstructure:"end_point"` EndPoint string `mapstructure:"end_point"`
} }
BccrYXTT struct {
AccessKeyID string `mapstructure:"access_key_id"`
AccessKeySecret string `mapstructure:"access_key_secret"`
EndPoint string `mapstructure:"end_point"`
}
Redis struct { Redis struct {
DB string DB string
Addr string Addr string

View File

@ -2,7 +2,6 @@ package bccr
import ( import (
dciConfig "chain-dci/config" dciConfig "chain-dci/config"
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client" bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
"github.com/google/wire" "github.com/google/wire"
) )
@ -13,9 +12,9 @@ func NewBccrClient() *bccrClient.Client {
// Endpoint 请参考 https://api.aliyun.com/product/rtc // Endpoint 请参考 https://api.aliyun.com/product/rtc
bccrConfig := new(bccrClient.Config) bccrConfig := new(bccrClient.Config)
bccrConfig.SetEndpoint(dciConfig.Data.BccrYXTT.EndPoint) bccrConfig.SetEndpoint(dciConfig.Data.BccrYXT.EndPoint)
bccrConfig.SetAccessKeyId(dciConfig.Data.BccrYXTT.AccessKeyID) bccrConfig.SetAccessKeyId(dciConfig.Data.BccrYXT.AccessKeyID)
bccrConfig.SetAccessKeySecret(dciConfig.Data.BccrYXTT.AccessKeySecret) bccrConfig.SetAccessKeySecret(dciConfig.Data.BccrYXT.AccessKeySecret)
client, err := bccrClient.NewClient(bccrConfig) client, err := bccrClient.NewClient(bccrConfig)
if err != nil { if err != nil {