Sandbox update fix

This commit is contained in:
Adam Štrauch 2021-10-26 23:13:20 +02:00
parent 3fb5c217e4
commit 0a6789c56c
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -36,18 +36,19 @@ steps:
commands: commands:
- go mod tidy - go mod tidy
- make build - make build
- name: deploy - name: deploy
image: debian:buster image: debian:buster
environment: environment:
NODE: node-x.rosti.cz NODE: node-x.rosti.cz
SSH_KEY: SSH_KEY:
from_secret: ssh_key from_secret: SSH_KEY
commands: commands:
- apt update && apt install -y ssh - apt update && apt install -y ssh
- mkdir ~/.ssh && echo $SSH_KEY > ~/.ssh/id_key && chmod 600 ~/.ssh/id_key - mkdir ~/.ssh && echo $SSH_KEY > ~/.ssh/id_key && chmod 600 ~/.ssh/id_key
- scp node-api root@$NODES:/usr/local/bin/node-api_ - scp node-api root@$NODE:/usr/local/bin/node-api_
- ssh root@$NODES mv /usr/local/bin/node-api_ /usr/local/bin/node-api - ssh root@$NODE mv /usr/local/bin/node-api_ /usr/local/bin/node-api
- ssh root@$NODES systemctl restart node-api - ssh root@$NODE systemctl restart node-api
trigger: trigger:
branch: branch:
@ -55,3 +56,6 @@ trigger:
event: event:
- push - push
- custom - custom
depends_on:
- test