docker-archlinux/.drone.yml
surtur 30419ebfc3
All checks were successful
continuous-integration/drone/push Build is passing
ci,dockerile,makefile: use FQ image paths
2023-10-18 15:02:18 +02:00

146 lines
3.6 KiB
YAML

---
kind: pipeline
type: docker
name: testing
platform:
os: linux
arch: amd64
steps:
- name: hadolint
pull: always
image: docker.io/hadolint/hadolint:v2.12.0-alpine
commands:
- hadolint --version
- hadolint Dockerfile
when:
ref:
- refs/heads/master
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
- name: kaniko-build
pull: always
image: docker.io/immawanderer/drone-kaniko:linux-amd64
settings:
dockerfile: Dockerfile
context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
when:
ref:
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
- name: kaniko-publish
pull: always
image: docker.io/immawanderer/drone-kaniko:linux-amd64
settings:
dockerfile: Dockerfile
context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
tags:
- latest
- linux-amd64
- ${DRONE_COMMIT_SHA:0:8}
repo: immawanderer/archlinux
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
ref:
- refs/heads/master
event:
exclude: [pull_request, tag]
trigger:
event: [push, pull_request, cron, tag]
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
status:
- success
- failure
event:
exclude:
- cron
depends_on:
- testing
steps:
- name: discord
pull: if-not-exists
image: docker.io/appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/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:
branch:
- master
event:
- cron
cron:
- nightly-build
status:
- success
- failure
depends_on:
- testing
steps:
- name: discord
pull: always
image: docker.io/appleboy/drone-discord:latest
settings:
message: "{{#success build.status}} ✅ [Scheduled build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{else}} ❌ [Scheduled build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n {{/success}}\n"
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token
---
kind: signature
hmac: bc36fd53d1d57053f660e05df07722e8cb2e82edc732ec8898d7308ad891b905
...