47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: say-hello
|
|
image: busybox
|
|
commands:
|
|
- echo hello-world
|
|
|
|
- name: backend
|
|
image: composer
|
|
commands:
|
|
- cd backend && composer install
|
|
|
|
- name: frontend
|
|
image: node
|
|
commands:
|
|
- cd frontend && npm install
|
|
|
|
- name: discord notification
|
|
image: appleboy/drone-discord
|
|
settings:
|
|
webhook_id:
|
|
from_secret: discord_webhook_id
|
|
webhook_token:
|
|
from_secret: discord_webhook_token
|
|
username: Drone
|
|
message: >
|
|
{{#success build.status}}
|
|
{{build.event}}: build #{{build.number}} succeeded.
|
|
{{else}}
|
|
{{build.event}}: build #{{build.number}} failed.
|
|
{{/success}}
|
|
Build Duration: {{since build.started}}
|
|
|
|
{{#success build.status}}
|
|
✅ **{{repo.name}} - Build #{{build.number}}**
|
|
- Started at {{datetime build.started \"2006-01-02 15:04:05\" \"America/Chicago\"}} and finished at {{datetime build.finished \"2006-01-02 15:04:05\" \"America/Chicago\"}}
|
|
- Build Duration: {{duration build.started build.finished}}
|
|
{{build.link}}
|
|
{{else}}
|
|
❌ **{{repo.name}} - Build #{{build.number}}
|
|
- Started at {{datetime build.started \"2006-01-02 15:04:05\" \n\"America/Chicago\"}} and finished at {{datetime build.finished \"2006-01-02 15:04:05\" \"America/Chicago\"}}
|
|
- Build Duration: {{duration build.started build.finished}}
|
|
{{build.link}}
|
|
{{/success}} |