Compare commits
No commits in common. "5ad0d1da34473ba9323055ae407afbee64a437af" and "05c234b05acc1e94f931d986d1b08e46ffb85cb0" have entirely different histories.
5ad0d1da34
...
05c234b05a
41
.drone.yml
41
.drone.yml
@ -4,7 +4,7 @@ name: chain-dci【K8s-测试服】
|
|||||||
volumes:
|
volumes:
|
||||||
- name: pkgdeps
|
- name: pkgdeps
|
||||||
host:
|
host:
|
||||||
path: /mnt/data/drone/define_cache/chain-dci
|
path: /mnt/storage/data/drone/define_cache/chain-dci
|
||||||
- name: docker
|
- name: docker
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
@ -12,39 +12,19 @@ volumes:
|
|||||||
host:
|
host:
|
||||||
path: /etc/docker/daemon.json
|
path: /etc/docker/daemon.json
|
||||||
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
|
||||||
@ -87,6 +67,7 @@ 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:
|
||||||
@ -101,11 +82,15 @@ 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: dev1
|
branch: dev
|
||||||
network:
|
network:
|
||||||
subnet: dnmp_default
|
subnet: 172.18.0.0/16
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- dev
|
- dev
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user