switch to drone-matrix

This commit is contained in:
Robert Kaussow 2021-09-19 21:32:11 +02:00
parent ed2bca16d9
commit e829496461
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 318 additions and 278 deletions

View File

@ -214,11 +214,11 @@ local PipelineNotifications = {
},
{
name: 'matrix',
image: 'plugins/matrix',
image: 'thegeeklab/drone-matrix',
settings: {
homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' },
template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}',
template: 'Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}) ({{ build.Branch }}) by {{ commit.Author }}<br/> Message: {{ commit.Message }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},

View File

@ -1,49 +1,56 @@
---
kind: pipeline
name: test
platform:
arch: amd64
os: linux
arch: amd64
steps:
- commands:
- shellcheck ./wait-for
- name: lint
image: koalaman/shellcheck-alpine:stable
name: lint
- commands:
- bats ./wait-for.bats
commands:
- shellcheck ./wait-for
- name: test
image: bats/bats
name: test
commands:
- bats ./wait-for.bats
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- test
kind: pipeline
name: build-package
platform:
arch: amd64
os: linux
arch: amd64
steps:
- commands:
- sha256sum wait-for > sha256sum.txt
- name: checksum
image: alpine
name: checksum
- commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased
unreleased}
commands:
- sha256sum wait-for > sha256sum.txt
- name: changelog-generate
image: thegeeklab/git-chglog
name: changelog-generate
- commands:
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
image: thegeeklab/alpine-tools
name: changelog-format
- image: plugins/github-release
name: publish-github
- name: publish-github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
@ -56,22 +63,27 @@ steps:
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- test
- test
---
kind: pipeline
name: build-container-amd64
platform:
arch: amd64
os: linux
arch: amd64
steps:
- image: thegeeklab/drone-docker:19
name: dryrun
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.amd64
dry_run: true
@ -83,8 +95,9 @@ steps:
when:
ref:
- refs/pull/**
- image: thegeeklab/drone-docker:19
name: publish-dockerhub
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
@ -98,8 +111,9 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
- image: thegeeklab/drone-docker:19
name: publish-quay
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
@ -114,22 +128,27 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- test
- test
---
kind: pipeline
name: build-container-arm64
platform:
arch: arm64
os: linux
arch: arm64
steps:
- image: thegeeklab/drone-docker:19
name: dryrun
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm64
dry_run: true
@ -141,8 +160,9 @@ steps:
when:
ref:
- refs/pull/**
- image: thegeeklab/drone-docker:19
name: publish-dockerhub
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
@ -156,8 +176,9 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
- image: thegeeklab/drone-docker:19
name: publish-quay
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
@ -172,22 +193,27 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- test
- test
---
kind: pipeline
name: build-container-arm
platform:
arch: arm
os: linux
arch: arm
steps:
- image: thegeeklab/drone-docker:19
name: dryrun
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm
dry_run: true
@ -199,8 +225,9 @@ steps:
when:
ref:
- refs/pull/**
- image: thegeeklab/drone-docker:19
name: publish-dockerhub
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
@ -214,8 +241,9 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
- image: thegeeklab/drone-docker:19
name: publish-quay
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
@ -230,24 +258,27 @@ steps:
ref:
- refs/heads/main
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- build-container-amd64
- build-container-arm
- build-container-arm64
- test
---
kind: pipeline
name: notifications
platform:
arch: amd64
os: linux
arch: amd64
steps:
- image: plugins/manifest
name: manifest-dockerhub
- name: manifest-dockerhub
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
@ -259,8 +290,9 @@ steps:
when:
status:
- success
- image: plugins/manifest
name: manifest-quay
- name: manifest-quay
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
@ -272,7 +304,11 @@ steps:
when:
status:
- success
- environment:
- name: pushrm-dockerhub
pull: always
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
@ -280,25 +316,24 @@ steps:
PUSHRM_FILE: README.md
PUSHRM_SHORT: Poor-mans docker service synchronizer
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
image: chko/docker-pushrm:1
name: pushrm-dockerhub
pull: always
when:
status:
- success
- environment:
- name: pushrm-quay
pull: always
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO:
from_secret: quay_token
PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
image: chko/docker-pushrm:1
name: pushrm-quay
pull: always
when:
status:
- success
- image: plugins/matrix
name: matrix
- name: matrix
image: thegeeklab/drone-matrix
settings:
homeserver:
from_secret: matrix_homeserver
@ -306,15 +341,14 @@ steps:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name
}}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message:
{{ build.message }}'
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}) ({{ build.Branch }}) by {{ commit.Author }}<br/> Message: {{ commit.Message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
@ -322,8 +356,14 @@ trigger:
status:
- success
- failure
depends_on:
- build-container-amd64
- build-container-arm
- build-container-arm64
---
kind: signature
hmac: 6fbd749273f067a96f12909fd22d46b28fa32bf61a13000ecd04a760f628140d
hmac: 143f9d09d77fa20b876a15ac9c120f81c80c7b27aefe9cab7e8e0f92760638a6
...