up version
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Владимир Фёдоров 2023-03-11 15:43:10 +07:00
parent d02de4b306
commit 8c31f56b9f
1 changed files with 40 additions and 44 deletions

View File

@ -3,55 +3,51 @@ type: docker
name: default name: default
steps: steps:
- name: build - name: build
image: golang image: golang
commands: commands:
- go build -o valera_tg_bot main.go - go build -o valera_tg_bot main.go
- name: scp - name: scp
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: host:
from_secret: server_ip from_secret: server_ip
username: username:
from_secret: ssh_user from_secret: ssh_user
key: key:
from_secret: ssh_key from_secret: ssh_key
port: port:
from_secret: ssh_port from_secret: ssh_port
target: target:
- deploys/valera_tg_bot - deploys/valera_tg_bot
source: source:
- valera_tg_bot - valera_tg_bot
rm: true rm: true
- name: deploy - name: deploy
image: appleboy/drone-ssh image: appleboy/drone-ssh
environment: environment:
TOKEN: TOKEN:
from_secret: bot_token from_secret: bot_token
TOKEN_WEATHER: PASSWORD:
from_secret: bot_token_weather from_secret: ssh_pass
CHAT_ID: settings:
from_secret: bot_chat_id host:
PASSWORD: from_secret: server_ip
from_secret: ssh_pass username:
settings: from_secret: ssh_user
host: key:
from_secret: server_ip from_secret: ssh_key
username: port:
from_secret: ssh_user from_secret: ssh_port
key: envs: [ TOKEN,PASSWORD ]
from_secret: ssh_key command_timeout: 10s
port: script:
from_secret: ssh_port - cd deploys/valera_tg_bot
envs: [ TOKEN,TOKEN_WEATHER,CHAT_ID,PASSWORD ]
command_timeout: 10s
script:
- cd deploys/valera_tg_bot
- echo $${TOKEN} > token.txt - echo $${TOKEN} > token.txt
- echo $${PASSWORD} | sudo -S systemctl restart valera - echo $${PASSWORD} | sudo -S systemctl restart valera
trigger: trigger:
event: event:
- push - push