2023-09-03 20:52:55 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
name: deployment
|
|
|
|
|
|
|
|
steps:
|
2023-12-29 19:51:59 +00:00
|
|
|
- name: build
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm ci
|
|
|
|
- npm run build
|
|
|
|
- name: test
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm test
|
|
|
|
- name: deploy to prod
|
2023-12-29 20:40:06 +00:00
|
|
|
image: drillster/drone-rsync
|
2023-12-29 21:00:44 +00:00
|
|
|
secrets: [ ssh_key, bot_token_prod ]
|
2023-12-29 20:40:06 +00:00
|
|
|
settings:
|
|
|
|
hosts:
|
|
|
|
- 192.168.68.120
|
|
|
|
user: vylpes
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
source: .
|
|
|
|
target: ~/apps/card-drop/card-drop_prod
|
|
|
|
recursive: true
|
|
|
|
script:
|
2023-12-29 21:00:44 +00:00
|
|
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
|
|
|
- export PATH="$HOME/.nodeuse/bin:$PATH"
|
|
|
|
- export BOT_TOKEN="$BOT_TOKEN_PROD"
|
2023-12-29 20:40:06 +00:00
|
|
|
- cd ~/apps/card-drop/card-drop_prod
|
|
|
|
- docker compose --file docker-compose.prod.yml up -d
|
|
|
|
- sleep 10
|
2023-12-29 21:00:44 +00:00
|
|
|
- cp .prod.env .env
|
2023-12-29 20:40:06 +00:00
|
|
|
- pm2 restart card-drop_prod || pm2 start --name card-drop_prod dist/bot.js
|
2023-09-03 20:52:55 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
name: staging
|
|
|
|
|
|
|
|
steps:
|
2023-12-29 19:51:59 +00:00
|
|
|
- name: build
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm ci
|
|
|
|
- npm run build
|
|
|
|
- name: test
|
|
|
|
image: node
|
|
|
|
commands:
|
|
|
|
- npm test
|
|
|
|
- name: deploy to stage
|
2023-12-29 20:40:06 +00:00
|
|
|
image: drillster/drone-rsync
|
2023-12-29 21:00:44 +00:00
|
|
|
secrets: [ ssh_key, bot_token_stage ]
|
2023-12-29 20:40:06 +00:00
|
|
|
settings:
|
|
|
|
hosts:
|
|
|
|
- 192.168.68.120
|
|
|
|
user: vylpes
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
source: .
|
|
|
|
target: ~/apps/card-drop/card-drop_stage
|
|
|
|
recursive: true
|
|
|
|
script:
|
2023-12-29 21:00:44 +00:00
|
|
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
|
|
|
- export PATH="$HOME/.nodeuse/bin:$PATH"
|
|
|
|
- export BOT_TOKEN="$BOT_TOKEN_STAGE"
|
2023-12-29 20:40:06 +00:00
|
|
|
- cd ~/apps/card-drop/card-drop_stage
|
|
|
|
- docker compose --file docker-compose.stage.yml up -d
|
|
|
|
- sleep 10
|
2023-12-29 21:00:44 +00:00
|
|
|
- cp .stage.env .env
|
2023-12-29 20:40:06 +00:00
|
|
|
- pm2 restart card-drop_stage || pm2 start --name card-drop_stage dist/bot.js
|
2023-09-03 20:52:55 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- develop
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
name: integration
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: node
|
|
|
|
commands:
|
2023-12-09 16:40:23 +00:00
|
|
|
- npm ci
|
|
|
|
- npm run build
|
2023-09-03 20:52:55 +01:00
|
|
|
- name: test
|
|
|
|
image: node
|
|
|
|
commands:
|
2023-12-09 16:40:23 +00:00
|
|
|
- npm test
|
2023-09-03 20:52:55 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- hotfix/*
|
|
|
|
- feature/*
|
|
|
|
- renovate/*
|
|
|
|
event:
|
|
|
|
- push
|