Older/.drone.yml
2023-07-20 19:30:39 +08:00

51 lines
1.4 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:22.04
commands:
- echo begin build ...
- resource/build.sh drone_build
- echo -e "Running InterviewQuestions"
- build/InterviewQuestions/InterviewQuestions
- echo -e "Running AmassToolsetTest"
- build/Test/AmassToolsetTest --run_test=HttpServerTest
- name: deploy
image: appleboy/drone-scp
settings:
host:
- amass.fun
username: root
password:
from_secret: ssh_password
port: 22
command_timeout: 2m
overwrite: true
target: /root/HttpServer
source: build/HttpServer/HttpServer
- name: restart
image: appleboy/drone-ssh
settings:
host:
- amass.fun
username: root
password:
from_secret: ssh_password
port: 22
command_timeout: 2m
script:
- pkill HttpServer
- cd /root/HttpServer
- source /etc/profile;nohup ./HttpServer >logs/HttpServer.log 2>&1 &"
- name: notify
image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:22.04
when:
status:
- failure
- success
commands:
- >-
cat resource/notify.tpl | envsubst | jq -sR . | xargs -0 -I {} curl -H "Content-Type: application/json" -X POST -d '{"type":"text","msg":{} }' https://amass.fun/notify