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.

51 lines
1.0 KiB

kind: pipeline
type: ssh # 使用SSH
name: go-privoxy
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 goPrivoxy
- git clone https://git.sre.ink/go/goPrivoxy.git
- cd goPrivoxy
- make build-linux-arm64
- date
- echo build end
- name: package
commands:
- echo package start
- date
- cd /root/goPrivoxy
- docker build -t sre/goprivoxy:arm64 .
- date
- echo package end
- name: deploy
commands:
- echo deploy start
- date
- export KUBECONFIG=/etc/kubernetes/admin.conf
- kubectl -n sre rollout restart deployment go-privoxy
- date
- echo deploy end
- name: alert
commands:
- echo alert start
- date
- echo deploy ok
- date
- echo alert end