This commit is contained in:
parent
bc50cb1105
commit
3fb5c217e4
34
.drone.yml
34
.drone.yml
@ -4,7 +4,7 @@ name: testing
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: golang
|
image: golang:1.17-buster
|
||||||
environment:
|
environment:
|
||||||
SNAPSHOTS_S3_ENDPOINT: minio:9000
|
SNAPSHOTS_S3_ENDPOINT: minio:9000
|
||||||
TEST_S3_ENDPOINT: minio:9000
|
TEST_S3_ENDPOINT: minio:9000
|
||||||
@ -23,3 +23,35 @@ services:
|
|||||||
- /data
|
- /data
|
||||||
- --console-address
|
- --console-address
|
||||||
- :9001
|
- :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
|
||||||
|
Loading…
Reference in New Issue
Block a user