2022-04-02 08:17:44 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go build -o butler_tg_bot main.go
|
|
|
|
|
2022-04-03 10:08:13 +00:00
|
|
|
- name: scp
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_ip
|
|
|
|
username:
|
|
|
|
from_secret: ssh_login
|
|
|
|
password:
|
|
|
|
from_secret: ssh_pass
|
|
|
|
port:
|
|
|
|
from_secret: ssh_port
|
|
|
|
target: bots
|
|
|
|
source:
|
|
|
|
- butler_tg_bot
|
|
|
|
rm: true
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
environment:
|
|
|
|
TOKEN:
|
|
|
|
from_secret: bot_token
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_ip
|
|
|
|
username:
|
|
|
|
from_secret: ssh_login
|
|
|
|
password:
|
|
|
|
from_secret: ssh_pass
|
|
|
|
port:
|
|
|
|
from_secret: ssh_port
|
|
|
|
envs: [ TOKEN ]
|
|
|
|
script:
|
|
|
|
- cd bots
|
|
|
|
- pkill butler_tg_bot
|
|
|
|
- ./butler_tg_bot --token=$${TOKEN} &
|
|
|
|
|
2022-04-02 08:17:44 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|