docker-archlinux-cdev/.drone.yml

134 lines
3.1 KiB
YAML
Raw Normal View History

---
kind: pipeline
type: docker
name: testing
platform:
os: linux
arch: amd64
steps:
- name: hadolint
pull: always
2022-03-24 16:56:23 +01:00
image: hadolint/hadolint:v2.9.3-alpine
commands:
- hadolint --version
- hadolint Dockerfile
when:
ref:
- refs/heads/master
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
2020-12-02 02:50:15 +01:00
- name: kaniko-build
pull: always
image: immawanderer/drone-kaniko:linux-amd64
settings:
dockerfile: Dockerfile
context: .
when:
ref:
- "refs/heads/feature-**"
- "refs/pull/**"
- "refs/tags/**"
event:
exclude: [cron]
2020-12-02 02:50:15 +01:00
- name: kaniko-publish
2020-12-02 02:50:15 +01:00
pull: always
image: immawanderer/drone-kaniko:linux-amd64
2020-12-02 02:50:15 +01:00
settings:
dockerfile: Dockerfile
context: .
tags:
- latest
- linux-amd64
- ${DRONE_COMMIT_SHA:0:8}
repo: immawanderer/archlinux-cdev
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]
2020-12-02 02:50:15 +01:00
2020-03-02 20:41:48 +01:00
---
kind: pipeline
type: docker
2020-03-02 20:41:48 +01:00
name: notifications
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
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
2020-03-02 20:41:48 +01:00
trigger:
2020-03-09 08:08:29 +01:00
branch:
- master
2020-03-02 20:41:48 +01:00
event:
- push
2020-03-02 20:41:48 +01:00
status:
- success
- failure
2020-03-02 20:41:48 +01:00
depends_on:
- testing
---
kind: pipeline
type: docker
name: notifications-cronbuild
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} ✅ [Nightly 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}}`{{else}} ❌ [Nightly 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}}` {{/success}}"
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token
trigger:
branch:
- master
event:
- cron
cron:
- nightly
status:
- success
- failure
depends_on:
- testing