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
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: dockerhub-build-trigger
|
name: dockerhub-build-trigger
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
|
@ -16,20 +18,21 @@ steps:
|
||||||
ENDPOINT:
|
ENDPOINT:
|
||||||
from_secret: dockerhub_endpoint
|
from_secret: dockerhub_endpoint
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache curl
|
- apk add --no-cache curl
|
||||||
- curl -sO https://git.dotya.ml/wanderer/docker-fedora-hugo/raw/branch/master/curl.it
|
- curl -sO https://git.dotya.ml/wanderer/docker-fedora-hugo/raw/branch/master/curl.it
|
||||||
- bash ./curl.it $ENDPOINT
|
- bash ./curl.it $ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: kaniko-build
|
name: kaniko-build
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- dockerhub-build-trigger
|
- dockerhub-build-trigger
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
|
@ -39,9 +42,9 @@ steps:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: notifications
|
name: notifications
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
|
@ -51,42 +54,43 @@ platform:
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
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:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- tag
|
- tag
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- kaniko-build
|
- 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
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: notifications-cronbuild
|
name: notifications-cronbuild
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
|
@ -96,36 +100,36 @@ platform:
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
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:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
event:
|
event:
|
||||||
- cron
|
- cron
|
||||||
cron:
|
cron:
|
||||||
- nightly
|
- nightly
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- kaniko-build
|
- 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
|
|
||||||
|
|
Loading…
Reference in New Issue