docker-archlinux-rf/.drone.yml
surtur 711397d6a1
All checks were successful
continuous-integration/drone/push Build is passing
show first 7 characters of the commit (not one...)
2020-03-11 19:06:30 +01:00

90 lines
2.1 KiB
YAML

---
kind: pipeline
name: dockerhub-build-trigger
platform:
arch: amd64
steps:
- name: call webhook
pull: always
image: curlimages/curl:latest
environment:
ENDPOINT:
from_secret: dockerhub_endpoint
commands:
- curl -s -X POST $ENDPOINT
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
branch:
- master
- "release/*"
event:
- push
- tag
status:
- success
- failure
depends_on:
- dockerhub-build-trigger
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{/success}}\n"
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
---
kind: pipeline
name: notifications-cronbuild
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
event:
- cron
cron:
- hourly
- hourly-build
status:
- success
- failure
depends_on:
- dockerhub-build-trigger
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} ✅ Hourly build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{/success}}\n"
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token