|
- kind: pipeline
- name: job_risk_third
- workspace:
- base: /var/goproject/src
- path: job_risk_third
-
- steps:
- - name: build
- image: golang:1.14.4
- environment:
- GOOS: linux
- GOARCH: amd64
- commands:
- - export GOPATH=/var/goproject
- - export PATH=$PATH:$GOROOT/bin
- - go env -w GO111MODULE=on
- - go env -w GOPROXY=https://goproxy.cn,direct
- - go version
- - go env
- - go mod tidy
- - go build -i -o bin/job_risk_third cmd/main.go
- - name: develop deploy
- image: appleboy/drone-scp
- settings:
- host:
- from_secret: host
- port:
- from_secret: port
- username:
- from_secret: username
- password:
- from_secret: password
- target:
- from_secret: target
- source: ./bin
- rm: false
- when:
- branch:
- - deploy_develop
- - name: run
- image: appleboy/drone-ssh
- settings:
- host:
- from_secret: host
- port:
- from_secret: port
- username:
- from_secret: username
- password:
- from_secret: password
- command_timeout: 2m
- script:
- - cd /server/job_risk_third/
- - rm -rf job_risk_third
- - cp bin/job_risk_third job_risk_third
- - cp restart.sh restart.sh
- - ./restart.sh
- - nohup ./job_risk_third -f config/job_risk_third.json 1>/dev/null 2>&1 &
- - name: notification
- image: lddsb/drone-dingtalk-message
- settings:
- token: 840fed65878154561a096c03a516ded894ab1b91efbe1643fe492dd93593e7a3
- type: markdown
- secret: SEC9fe40cc775658cbef7a30b43fd852b642201754fdrone15df42cd339627e05cfde41e
- tpl: ./drone/tpl/index.md
- tips_title: 宁达用户服务构建结果
- success_pic: https://i.ibb.co/CB4HBLP/success-1.png
- failure_pic: https://i.ibb.co/wM2rbGS/fail-1.png
- trigger:
- branch:
- - deploy_develop
|