feat: refactor .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* syntax as per https://github.com/drone/drone/blob/master/.drone.yml * fixed wrong yaml indentation that drone had to chew on... * added 'type: docker' and 'os: linux' to every pipeline where relevant
This commit is contained in:
parent
250e9f710d
commit
e391f68730
122
.drone.yml
122
.drone.yml
@ -1,8 +1,10 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: dockerhub-build-trigger
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
@ -16,20 +18,21 @@ steps:
|
||||
ENDPOINT:
|
||||
from_secret: dockerhub_endpoint
|
||||
commands:
|
||||
- apk add --no-cache curl
|
||||
- curl -sO https://git.dotya.ml/wanderer/docker-fedora-hugo/raw/branch/master/curl.it
|
||||
- bash ./curl.it $ENDPOINT
|
||||
|
||||
- apk add --no-cache curl
|
||||
- curl -sO https://git.dotya.ml/wanderer/docker-fedora-hugo/raw/branch/master/curl.it
|
||||
- bash ./curl.it $ENDPOINT
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: kaniko-build
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
depends_on:
|
||||
- dockerhub-build-trigger
|
||||
- dockerhub-build-trigger
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
@ -39,9 +42,9 @@ steps:
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: notifications
|
||||
|
||||
platform:
|
||||
@ -51,42 +54,43 @@ platform:
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: discord
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-discord:latest
|
||||
settings:
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
|
||||
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}}
|
||||
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
|
||||
event: **`${DRONE_BUILD_EVENT}`**
|
||||
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_id
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_token
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
- push
|
||||
- tag
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- success
|
||||
- failure
|
||||
|
||||
depends_on:
|
||||
- kaniko-build
|
||||
|
||||
steps:
|
||||
- name: discord
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-discord:latest
|
||||
settings:
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
|
||||
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}}
|
||||
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
|
||||
event: **`${DRONE_BUILD_EVENT}`**
|
||||
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_id
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_token
|
||||
- kaniko-build
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: notifications-cronbuild
|
||||
|
||||
platform:
|
||||
@ -96,36 +100,36 @@ platform:
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: discord
|
||||
pull: always
|
||||
image: appleboy/drone-discord:latest
|
||||
settings:
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ [Nightly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
|
||||
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}}
|
||||
❌ [Nightly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
|
||||
event: **`${DRONE_BUILD_EVENT}`**
|
||||
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
|
||||
{{/success}}
|
||||
webhook_id:
|
||||
from_secret: discord_webhook_hourly_id
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_hourly_token
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- master
|
||||
event:
|
||||
- cron
|
||||
- cron
|
||||
cron:
|
||||
- nightly
|
||||
- nightly
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- success
|
||||
- failure
|
||||
|
||||
depends_on:
|
||||
- kaniko-build
|
||||
|
||||
steps:
|
||||
- name: discord
|
||||
pull: always
|
||||
image: appleboy/drone-discord:latest
|
||||
settings:
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ [Nightly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
|
||||
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}}
|
||||
❌ [Nightly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
|
||||
event: **`${DRONE_BUILD_EVENT}`**
|
||||
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
|
||||
{{/success}}
|
||||
webhook_id:
|
||||
from_secret: discord_webhook_hourly_id
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_hourly_token
|
||||
- kaniko-build
|
||||
|
Loading…
Reference in New Issue
Block a user