Add drone config
This commit is contained in:
parent
3ce470a9b2
commit
cf97c68033
67
.drone.yml
Normal file
67
.drone.yml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
steps:
|
||||||
|
- name: release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_api_key
|
||||||
|
base_url: https://code.garrettmills.dev
|
||||||
|
checksum: md5
|
||||||
|
title: ${DRONE_TAG}
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
- name: deploy to production
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: deploy_ssh_host
|
||||||
|
username:
|
||||||
|
from_secret: deploy_ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: deploy_ssh_key
|
||||||
|
port:
|
||||||
|
from_secret: deploy_ssh_port
|
||||||
|
script:
|
||||||
|
- cd /home/coreid/CoreID
|
||||||
|
- git pull
|
||||||
|
- yarn install
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
- promote
|
||||||
|
- name: send success notifications
|
||||||
|
image: plugins/webhook
|
||||||
|
settings:
|
||||||
|
urls:
|
||||||
|
from_secret: notify_webhook_url
|
||||||
|
content_type: application/json
|
||||||
|
template: |
|
||||||
|
{
|
||||||
|
"title": "Drone-CI [Starship/CoreID]",
|
||||||
|
"message": "Build ${DRONE_BUILD_NUMBER} promoted to production.",
|
||||||
|
"priority": 4
|
||||||
|
}
|
||||||
|
when:
|
||||||
|
status: success
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
- promote
|
||||||
|
- name: send error notifications
|
||||||
|
image: plugins/webhook
|
||||||
|
settings:
|
||||||
|
urls:
|
||||||
|
from_secret: notify_webhook_url
|
||||||
|
content_type: application/json
|
||||||
|
template: |
|
||||||
|
{
|
||||||
|
"title": "Drone-CI [Starship/CoreID]",
|
||||||
|
"message": "An error was encountered while promoting build ${DRONE_BUILD_NUMBER} to production.",
|
||||||
|
"priority": 6
|
||||||
|
}
|
||||||
|
when:
|
||||||
|
status: failure
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
- promote
|
||||||
|
|
Loading…
Reference in New Issue
Block a user