This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/.drone.yml
2023-05-03 15:13:56 -04:00

156 lines
2.7 KiB
YAML

kind: pipeline
type: docker
name: Test Pipeline
workspace:
path: /drone/grow
steps:
- name: yarn install
image: node:latest
volumes:
- name: module_cache
path: ./node_modules
commands:
- yarn install
- name: Code Style Checks
image: node:latest
commands:
- yarn prettier
- name: Lint
image: node:latest
commands:
- yarn lint
- name: Unit Tests
image: node:latest
commands:
- yarn test
- name: Send Status Notification
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
trigger:
event:
- push
volumes:
- name: module_cache
temp: {}
---
kind: pipeline
type: docker
name: Build Pipeline
workspace:
path: /drone/grow
steps:
- name: yarn install
image: node:latest
volumes:
- name: module_cache
path: ./node_modules
commands:
- yarn install
- name: Build
image: node:latest
commands:
- yarn build
- name: Send Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
depends_on:
- Test Pipeline
trigger:
branch:
- main
event:
- push
volumes:
- name: module_cache
temp: {}
---
kind: pipeline
type: docker
name: Deploy Pipeline
workspace:
path: /drone/grow
platform:
os: linux
arch: arm64
steps:
- name: Build
image: node
commands:
- cd /app
- cp /drone/grow/package.json ./
- cp /drone/grow/yarn.lock ./
- yarn install --frozen-lockfile
- cp -r /drone/grow/* .
- yarn build
volumes:
- name: app-build-dir
path: /app-build
- name: Deploy Container
image: compose
commands:
- cd /app
- cp /app-build-dir/* .
- build
- up -d
volumes:
- name: app-build-dir
path: /app-build
depends_on: Build
trigger:
branch:
- main
event:
- push
depends_on:
- Build Pipeline
volumes:
- name: app-build-dir
temp: {}