99 lines
1.5 KiB
YAML
99 lines
1.5 KiB
YAML
---
|
|
|
|
kind: pipeline
|
|
name: deployment
|
|
|
|
steps:
|
|
- name: build
|
|
image: node
|
|
commands:
|
|
- npm ci
|
|
- npm run build
|
|
- name: test
|
|
image: node
|
|
commands:
|
|
- npm test
|
|
- name: deploy to prod
|
|
image: drillster/drone-rsync
|
|
settings:
|
|
hosts:
|
|
- "minisforum.local"
|
|
user: vylpes
|
|
key:
|
|
from_secret: ssh_key
|
|
source: .
|
|
target: ~/apps/card-drop/card-drop_prod
|
|
recursive: true
|
|
script:
|
|
- 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:
|
|
event:
|
|
- tag
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
name: staging
|
|
|
|
steps:
|
|
- name: build
|
|
image: node
|
|
commands:
|
|
- npm ci
|
|
- npm run build
|
|
- name: test
|
|
image: node
|
|
commands:
|
|
- npm test
|
|
- name: deploy to stage
|
|
image: drillster/drone-rsync
|
|
settings:
|
|
hosts:
|
|
- "minisforum.local"
|
|
user: vylpes
|
|
key:
|
|
from_secret: ssh_key
|
|
source: .
|
|
target: ~/apps/card-drop/card-drop_stage
|
|
recursive: true
|
|
script:
|
|
- 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:
|
|
branch:
|
|
- develop
|
|
event:
|
|
- push
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
name: integration
|
|
|
|
steps:
|
|
- name: build
|
|
image: node
|
|
commands:
|
|
- npm ci
|
|
- npm run build
|
|
- name: test
|
|
image: node
|
|
commands:
|
|
- npm test
|
|
|
|
trigger:
|
|
branch:
|
|
- hotfix/*
|
|
- feature/*
|
|
- renovate/*
|
|
event:
|
|
- push
|
|
- pull_request
|