Sandbox deploy
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Adam Štrauch 2021-10-26 23:08:07 +02:00
parent bc50cb1105
commit 3fb5c217e4
Signed by: cx
GPG Key ID: 018304FFA8988F8D
1 changed files with 33 additions and 1 deletions

View File

@ -4,7 +4,7 @@ name: testing
steps:
- name: test
image: golang
image: golang:1.17-buster
environment:
SNAPSHOTS_S3_ENDPOINT: minio:9000
TEST_S3_ENDPOINT: minio:9000
@ -23,3 +23,35 @@ services:
- /data
- --console-address
- :9001
---
kind: pipeline
type: docker
name: Sandbox deploy
steps:
- name: build
image: golang:1.17-buster
commands:
- go mod tidy
- make build
- name: deploy
image: debian:buster
environment:
NODE: node-x.rosti.cz
SSH_KEY:
from_secret: ssh_key
commands:
- apt update && apt install -y ssh
- mkdir ~/.ssh && echo $SSH_KEY > ~/.ssh/id_key && chmod 600 ~/.ssh/id_key
- scp node-api root@$NODES:/usr/local/bin/node-api_
- ssh root@$NODES mv /usr/local/bin/node-api_ /usr/local/bin/node-api
- ssh root@$NODES systemctl restart node-api
trigger:
branch:
- main
event:
- push
- custom