use drone for cicd
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
e57637c677
commit
2203d22805
@ -0,0 +1,53 @@
|
||||
kind: pipeline
|
||||
type: ssh # 使用SSH
|
||||
name: baidu
|
||||
|
||||
|
||||
server:
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
user:
|
||||
from_secret: ssh_user
|
||||
password:
|
||||
from_secret: ssh_password
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
commands:
|
||||
- echo build start
|
||||
- date
|
||||
- export PATH=$PATH:/usr/local/go/bin
|
||||
- cd /root
|
||||
- rm -rf WechatGateWay
|
||||
- git clone https://git.sre.ink/go/WechatGateWay.git
|
||||
- cd WechatGateWay
|
||||
- make build-linux-arm64
|
||||
- date
|
||||
- echo build end
|
||||
- name: package
|
||||
commands:
|
||||
- echo package start
|
||||
- date
|
||||
- cd /root/WechatGateWay
|
||||
- /bin/cp -arf /root/wx.yaml application.yaml
|
||||
- docker build -t sre/wechatgateway:arm64 .
|
||||
- date
|
||||
- echo package end
|
||||
- name: deploy
|
||||
commands:
|
||||
- echo deploy start
|
||||
- date
|
||||
- export KUBECONFIG=/etc/kubernetes/admin.conf
|
||||
- kubectl rollout restart deployment -n sre wehcat-gateway
|
||||
- date
|
||||
- echo deploy end
|
||||
- name: alert
|
||||
commands:
|
||||
- echo alert start
|
||||
- date
|
||||
- /usr/bin/wechat "wehcat-gateway deployed on k8s"
|
||||
- date
|
||||
- echo alert end
|
||||
Loading…
Reference in new issue