Update drone script to use rsync #121

Merged
Vylpes merged 4 commits from feature/56-drone-rsync into develop 2023-12-29 19:52:00 +00:00
Showing only changes of commit 0e239b3685 - Show all commits

View file

@ -4,16 +4,31 @@ kind: pipeline
name: deployment name: deployment
steps: steps:
- name: deploy - name: build
image: appleboy/drone-ssh image: node
commands:
- npm ci
- npm run build
- name: test
image: node
commands:
- npm test
- name: deploy to prod
image: drillster/drone-rsync
Vylpes marked this conversation as resolved
Review

This is good and should be how we want it, but maybe we should also move the cards folder externally as well

This is good and should be how we want it, but maybe we should also move the cards folder externally as well
settings: settings:
host: 192.168.68.120 hosts:
username: vylpes - "minisforum.local"
password: user: vylpes
from_secret: ssh_password key:
port: 22 from_secret: ssh_key
source: .
target: ~/apps/card-drop/card-drop_prod
recursive: true
script: script:
- sh /home/vylpes/scripts/card-drop/deploy_prod.sh - cd ~/apps/card-drop/card-drop_prod
- docker compose --file docker-compose.prod.yml up -d
- sleep 10
- pm2 restart card-drop_prod || pm2 start --name card-drop_prod dist/bot.js
trigger: trigger:
event: event:
@ -25,16 +40,31 @@ kind: pipeline
name: staging name: staging
steps: steps:
- name: stage - name: build
image: appleboy/drone-ssh image: node
commands:
- npm ci
- npm run build
- name: test
image: node
commands:
- npm test
- name: deploy to stage
image: drillster/drone-rsync
settings: settings:
host: 192.168.68.120 hosts:
username: vylpes - "minisforum.local"
password: user: vylpes
from_secret: ssh_password key:
port: 22 from_secret: ssh_key
source: .
target: ~/apps/card-drop/card-drop_stage
recursive: true
script: script:
- sh /home/vylpes/scripts/card-drop/deploy_stage.sh - cd ~/apps/card-drop/card-drop_stage
- docker compose --file docker-compose.stage.yml up -d
- sleep 10
- pm2 restart card-drop_stage || pm2 start --name card-drop_stage dist/bot.js
trigger: trigger:
branch: branch:
@ -53,19 +83,16 @@ steps:
commands: commands:
- npm ci - npm ci
- npm run build - npm run build
- name: test - name: test
image: node image: node
commands: commands:
- npm ci
- npm test - npm test
trigger: trigger:
branch: branch:
- main
- develop
- hotfix/* - hotfix/*
- feature/* - feature/*
- renovate/* - renovate/*
event: event:
- push - push
- pull_request