You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

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