refactor: moderniue drone config
continuous-integration/drone/pr Build encountered an error Details

This commit is contained in:
Robert Kaussow 2021-10-23 16:45:03 +02:00
parent 0ee2d92880
commit 5532de7f2d
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 72 additions and 70 deletions

2
.drone.env Normal file
View File

@ -0,0 +1,2 @@
# renovate: datasource=github-releases depName=OpenPrinting/cups
export CUPS_VERSION="${CUPS_VERSION:-v2.3.3op1}"

View File

@ -7,62 +7,54 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: build - name: build
image: thegeeklab/rpmbuild image: thegeeklab/rpmbuild
commands: commands:
- "[ -z \"$BUILD_VERSION\" ] && BUILD_VERSION=2.3.3" - source .drone.env
- wget -q https://github.com/apple/cups/releases/download/v$BUILD_VERSION/cups-$BUILD_VERSION-source.tar.gz - wget -q https://github.com/OpenPrinting/cups/releases/download/v$CUPS_VERSION/cups-v$CUPS_VERSION-source.tar.gz
- rpmbuild -ta --without libusb1 cups-$BUILD_VERSION-source.tar.gz - rpmbuild -ta --without libusb1 cups-${CUPS_VERSION##v}-source.tar.gz
environment:
BUILD_VERSION: ${DRONE_TAG##v}
- name: checksum - name: checksum
image: alpine image: thegee
commands: commands:
- apk add --no-cache coreutils - cd /drone/src/dist/RPMS/x86_64/ && sha256sum * > /drone/src/dist/sha256sum.txt
- sha256sum -b dist/RPMS/x86_64/* > dist/sha256sum.txt
- name: gpgsign - name: changelog-generate
pull: always image: thegeeklab/git-chglog
image: plugins/gpgsign:1 commands:
settings: - git fetch -tq
detach_sign: true - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
files: depends_on:
- dist/RPMS/x86_64/* - tags
key:
from_secret: gpgsign_key
passphrase:
from_secret: gpgsign_passphrase
- name: release - name: changelog-format
image: plugins/gitea-release image: thegeeklab/alpine-tools
settings: commands:
api_key: - prettier CHANGELOG.md
from_secret: gitea_token - prettier -w CHANGELOG.md
base_url: https://gitea.rknet.org depends_on:
files: - changelog-generate
- dist/RPMS/x86_64/*
- dist/sha256sum.txt
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
- name: repository - name: publish-gitea
image: plugins/s3 image: plugins/gitea-release
settings: settings:
access_key: api_key:
from_secret: s3_access_key from_secret: gitea_token
bucket: packages base_url: https://gitea.rknet.org
endpoint: https://sp.rknet.org files:
path_style: true - /drone/src/dist/RPMS/x86_64/*
secret_key: - /drone/src/dist/sha256sum.txt
from_secret: s3_secret_access_key note: CHANGELOG.md
source: dist/RPMS/x86_64/*.rpm overwrite: true
strip_prefix: dist/RPMS/ title: ${DRONE_TAG}
target: /centos/7/ when:
when: ref:
ref: - refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/pull/**
- refs/tags/** - refs/tags/**
--- ---
@ -74,32 +66,36 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: matrix - name: matrix
image: plugins/matrix image: thegeeklab/drone-matrix
settings: settings:
homeserver: homeserver:
from_secret: matrix_homeserver from_secret: matrix_homeserver
password: password:
from_secret: matrix_password from_secret: matrix_password
roomid: roomid:
from_secret: matrix_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 }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
username: username:
from_secret: matrix_username from_secret: matrix_username
when:
status:
- success
- failure
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
- refs/tags/** - refs/tags/**
status: status:
- success - success
- failure - failure
depends_on: depends_on:
- build - build
--- ---
kind: signature kind: signature
hmac: a48861856f45a5fea19c866058aa857abcdd77d604be1835d254407e7d7d0688 hmac: ef12dc4cc2bd5bdd48ad22c1671fbc838e4e3e40163b3a3a3b8c893d19ea7e19
... ...

4
renovate.json Normal file
View File

@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>thegeeklab/renovate-presets:docker"]
}