This repository has been archived on 2024-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
cups/.drone.jsonnet
Robert Kaussow 10b9674a06
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
fix: fix german localization template (#7)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
2021-12-16 11:22:09 +01:00

133 lines
2.9 KiB
Plaintext

local PipelineTest = {
kind: 'pipeline',
name: 'test',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'markdownlint',
image: 'thegeeklab/markdownlint-cli',
commands: [
"markdownlint 'README.md'",
],
},
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
},
};
local DistVersion(version='7') = {
name: 'build-el' + version,
image: 'thegeeklab/rpmbuild:' + version,
commands: [
'make all',
'ls -l /drone/src/dist/RPMS/x86_64/',
],
};
local PipelineBuildPackage = {
kind: 'pipeline',
name: 'build-packages',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
DistVersion(version='7'),
DistVersion(version='8'),
{
name: 'checksum',
image: 'alpine',
commands: [
'cd /drone/src/dist/RPMS/x86_64/ && sha256sum * > /drone/src/dist/sha256sum.txt',
],
},
{
name: 'changelog-generate',
image: 'thegeeklab/git-chglog',
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',
],
},
{
name: 'publish-gitea',
image: 'plugins/gitea-release',
settings: {
api_key: {
from_secret: 'gitea_token',
},
base_url: 'https://gitea.rknet.org',
files: [
'/drone/src/dist/RPMS/x86_64/*',
'/drone/src/dist/sha256sum.txt',
],
note: 'CHANGELOG.md',
overwrite: true,
title: '${DRONE_TAG}',
},
when: {
ref: [
'refs/tags/**',
],
},
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineNotifications = {
kind: 'pipeline',
name: 'notifications',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: '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 }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}',
username: { from_secret: 'matrix_username' },
password: { from_secret: 'matrix_password' },
},
when: {
status: ['success', 'failure'],
},
},
],
depends_on: [
'build-packages',
],
trigger: {
ref: ['refs/heads/master', 'refs/tags/**'],
status: ['success', 'failure'],
},
};
[
PipelineTest,
PipelineBuildPackage,
PipelineNotifications,
]