Add drone config for CI
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Garrett Mills 2020-10-05 17:49:10 -05:00
parent 42f24914d5
commit 08a08ab4e4
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

62
.drone.yml Normal file
View File

@ -0,0 +1,62 @@
kind: pipeline
name: default
steps:
- name: build-prod
image: node:14
commands:
- npm i
- npm install @ionic/cli
- ./node_modules/bin/ionic build --prod
- tar czf build.tar.gz www
- name: release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://code.garrettmills.dev
files: build.tar.gz
title: ${DRONE_TAG}
when:
event: tag
- name: send success notifications
image: plugins/webhook
settings:
urls:
from_secret: notify_webhook_url
content_type: application/json
template: |
{
"title": "Drone-CI [noded-frontend]",
"message": "Build ${DRONE_BUILD_NUMBER} completed successfully.",
"priority": 4
}
when:
status: success
- name: send error notifications
image: plugins/webhook
settings:
urls:
from_secret: notify_webhook_url
content_type: application/json
template: |
{
"title": "Drone-CI [noded-frontend]",
"message": "Build ${DRONE_BUILD_NUMBER} failed!",
"priority": 6
}
when:
status: failure
# - name: promote Flitter docs
# image: plugins/downstream
# settings:
# server: https://ci.garrettmills.dev
# token:
# from_secret: drone_token
# fork: false
# last_successful: true
# deploy: production
# repositories:
# - flitter/docs@master
# when:
# status: success
# event: tag