adding .drone.yml

This commit is contained in:
surtur 2020-02-27 16:42:22 +01:00
parent 35c814d0c9
commit 760915ae8b
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -6,6 +6,13 @@ name: pull
clone: clone:
disable: true disable: true
trigger:
branch:
- "test*"
event:
- push
- pull_request
steps: steps:
- name: fedora-hugo - name: fedora-hugo
pull: always pull: always
@ -60,7 +67,7 @@ steps:
commands: commands:
- echo $OL_P > nupass - echo $OL_P > nupass
- export RSYNC_RSH='sshpass -f ./nupass ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' - export RSYNC_RSH='sshpass -f ./nupass ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
- rsync -av --delete --chown $OL public/ $OL@dotya.ml:$OL_D - rsync -av --delete --chown $OL public/ $OL@dotya.ml:$OL_D-test
--- ---
@ -75,12 +82,9 @@ clone:
disable: true disable: true
trigger: trigger:
branch:
- master
- "dev*"
event: event:
- push - push
- tag - pull_request
status: status:
- success - success
- failure - failure
@ -109,49 +113,3 @@ steps:
from_secret: discord_webhook_id from_secret: discord_webhook_id
webhook_token: webhook_token:
from_secret: discord_webhook_token from_secret: discord_webhook_token
---
kind: pipeline
name: notifications-cron
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
event:
- cron
cron:
- hourly
- hourly-build
status:
- success
- failure
depends_on:
- 'build and deploy'
steps:
- name: discord
pull: always
image: appleboy/drone-discord:latest
settings:
message: >
{{#success build.status}}
✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.
event: **`${DRONE_BUILD_EVENT}`**
failed stage(s): **`${DRONE_FAILED_STAGES}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{/success}}
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token