Compare commits

...

122 Commits
v2.1.1 ... main

Author SHA1 Message Date
Robert Kaussow 859af56907
add deprecation notice 2023-08-29 21:37:15 +02:00
renovate[bot] 58324ea013 chore(deps): update dependency golangci/golangci-lint to v1.54.2 2023-08-28 03:35:07 +00:00
renovate[bot] 79e26bb632
fix(deps): update module github.com/urfave/cli/v2 to v2.25.7 (#164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 15:37:06 +02:00
renovate[bot] 0754418521
fix(deps): update module maunium.net/go/mautrix to v0.16.0 (#184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 15:16:31 +02:00
renovate[bot] 53a89ddfbb chore(docker): update golang:1.20 docker digest to 741d6f9 2023-08-17 09:37:18 +00:00
renovate[bot] d3fbe4e61f chore(docker): update golang:1.20 docker digest to 839ba88 2023-08-17 00:02:15 +00:00
renovate[bot] e30ef55ea4 chore(docker): update golang:1.20 docker digest to 2db0b25 2023-08-16 17:05:27 +00:00
renovate[bot] a7d28a7951 chore(deps): update dependency golangci/golangci-lint to v1.54.1 2023-08-14 03:53:01 +00:00
renovate[bot] 6419992fbb chore(docker): update golang:1.20 docker digest to 37c7d85 2023-08-10 11:40:04 +00:00
renovate[bot] 05db9e9a74 chore(docker): update alpine:3.18 docker digest to 7144f7b 2023-08-08 01:58:18 +00:00
renovate[bot] 11c6c763c7 chore(docker): update golang:1.20 docker digest to bc5f0b5 2023-08-02 01:13:23 +00:00
renovate[bot] 26459ff9f5 chore(docker): update golang:1.20 docker digest to 010a0ff 2023-07-30 01:40:58 +00:00
renovate[bot] 4ca81a65cd chore(docker): update golang:1.20 docker digest to 3952625 2023-07-29 06:08:24 +00:00
renovate[bot] 8e66224545
fix(deps): update module maunium.net/go/mautrix to v0.15.4 (#173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 10:09:49 +02:00
renovate[bot] 0dd5074567
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.25 (#174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 09:55:07 +02:00
renovate[bot] b2d5d83c42 chore(docker): update golang:1.20 docker digest to cfc9d1b 2023-07-14 00:43:13 +00:00
renovate[bot] 269f5f18b9 chore(docker): update golang:1.20 docker digest to 8e5a006 2023-07-12 00:47:36 +00:00
renovate[bot] 7981ce56e3 chore(docker): update golang:1.20 docker digest to fd9306e 2023-07-06 03:59:12 +00:00
renovate[bot] 18b782666c chore(docker): update golang:1.20 docker digest to 20ee7c8 2023-07-05 13:24:21 +00:00
renovate[bot] edf48bb4d7 chore(docker): update golang:1.20 docker digest to 7954299 2023-07-05 01:48:26 +00:00
renovate[bot] 2635496a15 chore(docker): update golang:1.20 docker digest to 344193a 2023-06-24 06:38:17 +00:00
renovate[bot] 50abb001e1 chore(docker): update golang:1.20 docker digest to 8f958bf 2023-06-22 14:06:20 +00:00
renovate[bot] caded57cc4 chore(docker): update golang:1.20 docker digest to 9d0422f 2023-06-22 06:53:07 +00:00
renovate[bot] 605c0c1782 chore(deps): update dependency golangci/golangci-lint to v1.53.3 2023-06-19 04:40:02 +00:00
renovate[bot] 50cf80cd21 chore(docker): update docker digests 2023-06-18 12:34:03 +00:00
renovate[bot] e3b8f7d59c
fix(deps): update module maunium.net/go/mautrix to v0.15.3 (#162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-16 21:50:05 +02:00
renovate[bot] f61e1e1c55 chore(docker): update golang:1.20 docker digest to e7bb4d1 2023-06-14 14:37:42 +00:00
renovate[bot] 145ca32aff chore(docker): update golang:1.20 docker digest to f28300f 2023-06-14 03:05:19 +00:00
renovate[bot] b7df408b8a chore(docker): update golang:1.20 docker digest to 4b1fc02 2023-06-07 00:02:00 +00:00
renovate[bot] cdd2631224
fix(deps): update module github.com/thegeeklab/drone-plugin-lib/v2 to v2.3.4 (#157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 14:12:16 +02:00
renovate[bot] 08b2a90bc8
fix(deps): update module github.com/urfave/cli/v2 to v2.25.5 (#155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 10:15:34 +02:00
renovate[bot] 96fa39b8eb
fix(deps): update module github.com/sirupsen/logrus to v1.9.3 (#154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 10:00:47 +02:00
renovate[bot] 448c87ef90
chore(deps): update dependency golangci/golangci-lint to v1.53.2 (#156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2023-06-05 09:50:44 +02:00
renovate[bot] b89bf6b64b
fix(deps): update module github.com/thegeeklab/drone-plugin-lib/v2 to v2.3.3 (#153)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 14:22:17 +02:00
renovate[bot] 7f41641188
fix(deps): update module github.com/urfave/cli/v2 to v2.25.4 (#152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-29 11:39:26 +02:00
renovate[bot] 2c20920694
chore(deps): update alpine docker tag to v3.18 (#145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 15:28:12 +02:00
renovate[bot] 3bc5876529
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.24 (#148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 15:21:34 +02:00
renovate[bot] a9be08ba0a
fix(deps): update module maunium.net/go/mautrix to v0.15.2 (#146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-26 10:59:56 +02:00
renovate[bot] 638be1b8f9
fix(deps): update module github.com/sirupsen/logrus to v1.9.2 (#147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-26 10:57:59 +02:00
renovate[bot] 747c47188f chore(docker): update golang:1.20 docker digest to 690e413 2023-05-24 06:42:40 +00:00
renovate[bot] 9a2ddcbc44 chore(docker): update golang:1.20 docker digest to 3f1f050 2023-05-24 01:32:54 +00:00
renovate[bot] 8877d535cd chore(docker): update golang:1.20 docker digest to c6447e1 2023-05-23 12:19:33 +00:00
renovate[bot] aefcb8c989
fix(deps): update module github.com/urfave/cli/v2 to v2.25.3 (#143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-13 11:14:22 +02:00
renovate[bot] 5446de9d38 chore(docker): update golang:1.20 docker digest to 685a22e 2023-05-10 06:35:22 +00:00
renovate[bot] 79f79dce7f chore(docker): update golang:1.20 docker digest to 31a8f92 2023-05-05 05:39:54 +00:00
renovate[bot] f40d51f01c chore(docker): update golang:1.20 docker digest to 6876eff 2023-05-04 05:09:36 +00:00
Robert Kaussow 5de0d6213f
fix bare url in contribution file (#141) 2023-05-03 11:51:05 +02:00
renovate[bot] 3b3af35ece
fix(deps): update module maunium.net/go/mautrix to v0.15.1 (#138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 10:01:13 +02:00
renovate[bot] f02d54a01e chore(deps): update dependency mvdan/gofumpt to v0.5.0 2023-04-17 05:27:16 +00:00
renovate[bot] 1abfe1f0f1
fix(deps): update module github.com/thegeeklab/drone-plugin-lib/v2 to v2.3.2 (#137)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-14 23:26:59 +02:00
renovate[bot] aea04a44c4 chore(docker): update golang:1.20 docker digest to 403f486 2023-04-13 12:14:11 +00:00
renovate[bot] 66c5a36ffb chore(docker): update golang:1.20 docker digest to b9709ec 2023-04-13 03:25:43 +00:00
renovate[bot] 92d174ce5d chore(docker): update golang:1.20 docker digest to 2fa5a28 2023-04-12 07:40:43 +00:00
renovate[bot] 64d46fd356 chore(docker): update golang:1.20 docker digest to 23050c2 2023-04-05 01:57:54 +00:00
renovate[bot] def62ceb99 chore(docker): update alpine:3.17 docker digest to 124c7d2 2023-03-30 01:45:26 +00:00
renovate[bot] 42ab07d61d chore(docker): update golang:1.20 docker digest to f709934 2023-03-28 01:27:56 +00:00
renovate[bot] f7f8042707 chore(deps): update dependency golangci/golangci-lint to v1.52.2 2023-03-27 09:16:01 +00:00
renovate[bot] 127da2ead6 chore(docker): update golang:1.20 docker digest to 1724dc3 2023-03-25 13:37:17 +00:00
renovate[bot] 07fc9785bd chore(docker): update golang:1.20 docker digest to 80950aa 2023-03-24 08:09:09 +00:00
renovate[bot] 5e40991e5f chore(docker): update golang:1.20 docker digest to 8114f4a 2023-03-24 01:22:07 +00:00
renovate[bot] cedde82ebd chore(docker): update golang:1.20 docker digest to a13b5e3 2023-03-23 20:10:40 +00:00
renovate[bot] e2e8c326f4
fix(deps): update module maunium.net/go/mautrix to v0.15.0 (#122) 2023-03-20 09:36:40 +01:00
renovate[bot] a0a03383b7 chore(deps): update dependency golangci/golangci-lint to v1.52.0 2023-03-20 04:59:47 +00:00
renovate[bot] 92461b0536 chore(docker): update golang:1.20 docker digest to 5990c4f 2023-03-16 17:38:07 +00:00
renovate[bot] a1322625e4 chore(docker): update alpine:3.17 docker digest to ff6bdca 2023-03-14 00:54:53 +00:00
renovate[bot] bcce33c2fa
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.23 (#117) 2023-03-09 20:48:00 +01:00
renovate[bot] db5fc374f9 chore(docker): update golang:1.20 docker digest to 74a3829 2023-03-08 05:37:13 +00:00
renovate[bot] 589f9f4948 chore(docker): update golang:1.20 docker digest to 52921e6 2023-03-02 09:25:40 +00:00
renovate[bot] 26b38f07c4 chore(docker): update golang:1.20 docker digest to 6beefc2 2023-03-01 22:39:14 +00:00
renovate[bot] 5863c6ead9 chore(deps): update dependency golangci/golangci-lint to v1.51.2 2023-02-20 07:07:38 +00:00
renovate[bot] 3a613ac87b
fix(deps): update module maunium.net/go/mautrix to v0.14.0 (#111) 2023-02-18 14:23:30 +01:00
renovate[bot] 227de48d72 chore(docker): update golang:1.20 docker digest to 2edf6aa 2023-02-16 06:37:03 +00:00
renovate[bot] 7693b3a18f chore(docker): update golang:1.20 docker digest to 9911e93 2023-02-15 03:59:31 +00:00
renovate[bot] c6a886775e chore(docker): update docker digests 2023-02-11 09:59:22 +00:00
renovate[bot] c7d7debbe0 chore(docker): update golang:1.20 docker digest to 53b7958 2023-02-10 10:14:07 +00:00
renovate[bot] caff09164f chore(docker): update golang:1.20 docker digest to 6e835db 2023-02-09 16:37:37 +00:00
Robert Kaussow 26b063afae
ci: bump container build plugin to drone-docker-buildx:23 (#105) 2023-02-09 08:54:15 +01:00
Robert Kaussow ea5039fcfe
fix template conditions 2023-02-08 16:48:45 +01:00
Robert Kaussow 63e9e76266
fix used template package (#104) 2023-02-08 16:30:46 +01:00
Robert Kaussow 22ead9610a
chore: replace deprecated template-lib (#103)
BREAKING CHANGE: The new template helper provided by https://github.com/thegeeklab/drone-plugin-lib/pull/28 is using pure Golang templates and sprig functions. As the unmaintained Golang handlebar library was removed entirely, the template syntax has changed and custom templates need to be adjusted. For more details, please read the [documentation](https://drone-plugin-index.geekdocs.de/plugins/drone-matrix/#parameters).
2023-02-08 16:22:10 +01:00
Robert Kaussow 0de593e83d
Revert "chore: replace deprecated template-lib (#101)"
This reverts commit 2048bc2d8f.
2023-02-08 14:33:18 +01:00
Robert Kaussow 2048bc2d8f
chore: replace deprecated template-lib (#101) 2023-02-08 14:25:50 +01:00
renovate[bot] a568e96489
fix(deps): update module github.com/joho/godotenv to v1.5.1 (#95) 2023-02-08 11:07:30 +01:00
renovate[bot] 5145d0829a
chore(deps): update golang docker tag to v1.20 (#94) 2023-02-08 10:22:49 +01:00
Robert Kaussow 63e61cf83d
refactor: add more linters and fix findings (#100) 2023-02-08 10:14:07 +01:00
renovate[bot] 8a36a90279 chore(deps): update dependency golangci/golangci-lint to v1.51.1 2023-02-06 05:21:23 +00:00
renovate[bot] c99ee2334f chore(docker): update golang:1.19 docker digest to 09009d4 2023-02-05 15:44:37 +00:00
renovate[bot] dd5eca7503 chore(docker): update golang:1.19 docker digest to 101204a 2023-02-05 04:40:44 +00:00
renovate[bot] 7f16000243 chore(docker): update golang:1.19 docker digest to 9e577b0 2023-02-04 16:53:11 +00:00
renovate[bot] 9cec6e7cd2
fix(deps): update module github.com/urfave/cli/v2 to v2.24.3 (#93) 2023-02-03 08:48:09 +01:00
renovate[bot] aef7868194
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.22 (#92) 2023-02-02 09:10:00 +01:00
renovate[bot] 8f5b0d9522
fix(deps): update module maunium.net/go/mautrix to v0.13.0 (#91) 2023-01-18 13:15:41 +01:00
Robert Kaussow 82b3c34ec5
ci: replace outdated gh-pages plugin (#90) 2023-01-14 23:21:08 +01:00
Robert Kaussow 5f39284e7d
unify makefile syntax (#89) 2023-01-14 22:58:37 +01:00
Robert Kaussow 1cc87df000
refactor: use buildx for multiarch container builds (#88) 2023-01-14 22:43:15 +01:00
renovate[bot] c4cb1acce2 chore(docker): update docker digests 2023-01-10 00:47:55 +00:00
Robert Kaussow 727ecbc0a5
ci: switch to buildx plugin (#86) 2023-01-08 15:40:16 +01:00
Robert Kaussow ffa4c6070b
BREAKING CHANGE: remove support for arm32 (#85) 2023-01-08 15:05:48 +01:00
renovate[bot] 7a5eb898b7
fix(deps): update module github.com/thegeeklab/drone-template-lib/v2 to v2.2.1 (#84) 2022-12-21 09:54:54 +01:00
renovate[bot] 226fac7e8b
fix(deps): update module github.com/thegeeklab/drone-plugin-lib/v2 to v2.2.1 (#83) 2022-12-21 08:45:06 +01:00
renovate[bot] 7b172cc7d7
fix(deps): update module github.com/urfave/cli/v2 to v2.23.7 (#81) 2022-12-20 21:27:46 +01:00
renovate[bot] 238fc11576
fix(deps): update module maunium.net/go/mautrix to v0.12.4 (#82) 2022-12-20 20:59:34 +01:00
Robert Kaussow b6167f04ae
docs: fix properties file syntax due to changes in the theme (#80) 2022-11-24 15:09:28 +01:00
renovate[bot] 95dc36013a
fix(deps): update module github.com/urfave/cli/v2 to v2.23.5 (#71) 2022-11-24 10:03:06 +01:00
renovate[bot] 91887597ad
chore(deps): update alpine docker tag to v3.17 (#75) 2022-11-24 10:02:55 +01:00
renovate[bot] 32b7921f1c
chore(deps): update arm32v7/alpine docker tag to v3.17 (#76) 2022-11-24 10:02:45 +01:00
renovate[bot] 3c869a1ca9
chore(deps): update arm64v8/alpine docker tag to v3.17 (#77) 2022-11-24 10:02:38 +01:00
Robert Kaussow 5bd6ad6293
ci: create symlink for xgo source directory (#79) 2022-11-24 09:43:51 +01:00
renovate[bot] e726cf4036
fix(deps): update module maunium.net/go/mautrix to v0.12.3 (#74) 2022-11-17 21:41:32 +01:00
renovate[bot] 6cb2e5f757 chore(docker): update docker digests 2022-11-12 08:53:45 +00:00
renovate[bot] c2118deee0 chore(docker): update docker digests 2022-11-11 01:45:37 +00:00
renovate[bot] e67399fe46
fix(deps): update module github.com/thegeeklab/drone-plugin-lib/v2 to v2.2.0 (#70) 2022-10-31 19:59:16 +01:00
renovate[bot] c5f3e19f0c
fix(deps): update module github.com/urfave/cli/v2 to v2.23.0 (#59) 2022-10-31 13:12:47 +01:00
renovate[bot] 9b854ec70c
fix(deps): update module maunium.net/go/mautrix to v0.12.2 (#68) 2022-10-31 12:43:21 +01:00
renovate[bot] 944f91b84f chore(deps): update dependency golangci/golangci-lint to v1.50.1 2022-10-24 04:54:43 +00:00
renovate[bot] f0f12bcc61 chore(deps): update dependency golangci/golangci-lint to v1.50.0 2022-10-10 03:35:06 +00:00
renovate[bot] 000fee1d97
fix(deps): update github.com/matrix-org/gomatrix digest to ceba4d9 (#64) 2022-10-04 09:58:26 +02:00
renovate[bot] b503940786
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.21 (#66) 2022-10-04 09:12:08 +02:00
renovate[bot] c379351dea chore(deps): update dependency mvdan/gofumpt to v0.4.0 2022-10-03 04:55:39 +00:00
renovate[bot] 4d7e6bf16b
fix(deps): update module maunium.net/go/mautrix to v0.12.1 (#63) 2022-09-19 09:11:13 +02:00
renovate[bot] 74cd10bfc8
fix(deps): update module github.com/microcosm-cc/bluemonday to v1.0.20 (#62) 2022-09-05 10:06:37 +02:00
renovate[bot] 0f96c1c97d chore(deps): update dependency golangci/golangci-lint to v1.49.0 2022-08-29 06:00:46 +00:00
21 changed files with 246 additions and 995 deletions

View File

@ -1,2 +0,0 @@
*
!dist/

View File

@ -1,350 +0,0 @@
local PipelineTest = {
kind: 'pipeline',
name: 'test',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'deps',
image: 'golang:1.19',
commands: [
'make deps',
],
volumes: [
{
name: 'godeps',
path: '/go',
},
],
},
{
name: 'lint',
image: 'golang:1.19',
commands: [
'make lint',
],
volumes: [
{
name: 'godeps',
path: '/go',
},
],
},
{
name: 'test',
image: 'golang:1.19',
commands: [
'make test',
],
volumes: [
{
name: 'godeps',
path: '/go',
},
],
},
],
volumes: [
{
name: 'godeps',
temp: {},
},
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildBinaries = {
kind: 'pipeline',
name: 'build-binaries',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'build',
image: 'techknowlogick/xgo:go-1.19.x',
commands: [
'make release',
],
},
{
name: 'executable',
image: 'alpine',
commands: [
'$(find dist/ -executable -type f -iname ${DRONE_REPO_NAME}-linux-amd64) --help',
],
},
{
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',
image: 'plugins/github-release',
settings: {
overwrite: true,
api_key: {
from_secret: 'github_token',
},
files: ['dist/*'],
title: '${DRONE_TAG}',
note: 'CHANGELOG.md',
},
when: {
ref: [
'refs/tags/**',
],
},
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineBuildContainer(arch='amd64') = {
kind: 'pipeline',
name: 'build-container-' + arch,
platform: {
os: 'linux',
arch: arch,
},
steps: [
{
name: 'build',
image: 'golang:1.19',
commands: [
'make build',
],
},
{
name: 'dryrun',
image: 'thegeeklab/drone-docker:19',
settings: {
dry_run: true,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
},
depends_on: ['build'],
when: {
ref: ['refs/pull/**'],
},
},
{
name: 'publish-dockerhub',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
depends_on: ['dryrun'],
},
{
name: 'publish-quay',
image: 'thegeeklab/drone-docker:19',
settings: {
auto_tag: true,
auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile.' + arch,
registry: 'quay.io',
repo: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
},
when: {
ref: ['refs/heads/main', 'refs/tags/**'],
},
depends_on: ['dryrun'],
},
],
depends_on: [
'test',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineDocs = {
kind: 'pipeline',
name: 'docs',
platform: {
os: 'linux',
arch: 'amd64',
},
concurrency: {
limit: 1,
},
steps: [
{
name: 'markdownlint',
image: 'thegeeklab/markdownlint-cli',
commands: [
"markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'",
],
},
{
name: 'spellcheck',
image: 'thegeeklab/alpine-tools',
commands: [
"spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{
name: 'publish',
image: 'plugins/gh-pages',
settings: {
username: { from_secret: 'github_username' },
password: { from_secret: 'github_token' },
pages_directory: '_docs/',
target_branch: 'docs',
},
when: {
ref: ['refs/heads/main'],
},
},
],
depends_on: [
'build-binaries',
'build-container-amd64',
'build-container-arm64',
'build-container-arm',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineNotifications = {
kind: 'pipeline',
name: 'notifications',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
image: 'plugins/manifest',
name: 'manifest-dockerhub',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'docker/manifest.tmpl',
},
when: {
status: ['success'],
},
},
{
image: 'plugins/manifest',
name: 'manifest-quay',
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: 'quay_username' },
password: { from_secret: 'quay_password' },
spec: 'docker/manifest-quay.tmpl',
},
when: {
status: ['success'],
},
},
{
name: 'pushrm-dockerhub',
image: 'chko/docker-pushrm:1',
environment: {
DOCKER_PASS: {
from_secret: 'docker_password',
},
DOCKER_USER: {
from_secret: 'docker_username',
},
PUSHRM_FILE: 'README.md',
PUSHRM_SHORT: 'Drone plugin to to send messages to Matrix',
PUSHRM_TARGET: 'thegeeklab/${DRONE_REPO_NAME}',
},
when: {
status: ['success'],
},
},
{
name: 'pushrm-quay',
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}',
},
when: {
status: ['success'],
},
},
{
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: [
'docs',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**'],
status: ['success', 'failure'],
},
};
[
PipelineTest,
PipelineBuildBinaries,
PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64'),
PipelineBuildContainer(arch='arm'),
PipelineDocs,
PipelineNotifications,
]

View File

@ -1,458 +0,0 @@
---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
- name: deps
image: golang:1.19
commands:
- make deps
volumes:
- name: godeps
path: /go
- name: lint
image: golang:1.19
commands:
- make lint
volumes:
- name: godeps
path: /go
- name: test
image: golang:1.19
commands:
- make test
volumes:
- name: godeps
path: /go
volumes:
- name: godeps
temp: {}
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
kind: pipeline
name: build-binaries
platform:
os: linux
arch: amd64
steps:
- name: build
image: techknowlogick/xgo:go-1.19.x
commands:
- make release
- name: executable
image: alpine
commands:
- $(find dist/ -executable -type f -iname ${DRONE_REPO_NAME}-linux-amd64) --help
- 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
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
image: golang:1.19
commands:
- make build
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.amd64
dry_run: true
repo: thegeeklab/${DRONE_REPO_NAME}
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: amd64
dockerfile: docker/Dockerfile.amd64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm64
platform:
os: linux
arch: arm64
steps:
- name: build
image: golang:1.19
commands:
- make build
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm64
dry_run: true
repo: thegeeklab/${DRONE_REPO_NAME}
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: docker/Dockerfile.arm64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm
platform:
os: linux
arch: arm
steps:
- name: build
image: golang:1.19
commands:
- make build
- name: dryrun
image: thegeeklab/drone-docker:19
settings:
dockerfile: docker/Dockerfile.arm
dry_run: true
repo: thegeeklab/${DRONE_REPO_NAME}
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
- name: publish-quay
image: thegeeklab/drone-docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: docker/Dockerfile.arm
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- dryrun
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: docs
platform:
os: linux
arch: amd64
concurrency:
limit: 1
steps:
- name: markdownlint
image: thegeeklab/markdownlint-cli
commands:
- markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
- name: spellcheck
image: thegeeklab/alpine-tools
commands:
- spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: publish
image: plugins/gh-pages
settings:
pages_directory: _docs/
password:
from_secret: github_token
target_branch: docs
username:
from_secret: github_username
when:
ref:
- refs/heads/main
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- build-binaries
- build-container-amd64
- build-container-arm64
- build-container-arm
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: manifest-dockerhub
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
when:
status:
- success
- name: manifest-quay
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: quay_password
spec: docker/manifest-quay.tmpl
username:
from_secret: quay_username
when:
status:
- success
- name: pushrm-dockerhub
image: chko/docker-pushrm:1
environment:
DOCKER_PASS:
from_secret: docker_password
DOCKER_USER:
from_secret: docker_username
PUSHRM_FILE: README.md
PUSHRM_SHORT: Drone plugin to to send messages to Matrix
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
when:
status:
- success
- name: pushrm-quay
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}
when:
status:
- success
- name: matrix
image: thegeeklab/drone-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
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
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
depends_on:
- docs
---
kind: signature
hmac: 154b26ea387b4101168b7efe6a0819de9f0a0b528b6e8970db1fe783ee57de9f
...

View File

@ -1,25 +1,91 @@
linters:
enable:
- gosimple
- deadcode
- typecheck
- govet
- errcheck
- staticcheck
- unused
- structcheck
- varcheck
- dupl
- gofmt
- misspell
- gocritic
- bidichk
- ineffassign
- revive
- gofumpt
- depguard
enable-all: false
disable-all: true
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forcetypeassert
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- interfacebloat
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- prealloc
- predeclared
- promlinter
- reassign
- revive
# - rowserrcheck
# - sqlclosecheck
# - structcheck
- stylecheck
- tagliatelle
- tenv
- testableexamples
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
# - wastedassign
- whitespace
- wsl
fast: false
run:
@ -28,4 +94,4 @@ run:
linters-settings:
gofumpt:
extra-rules: true
lang-version: "1.18"
lang-version: "1.20"

View File

@ -3,7 +3,7 @@
## Security
If you think you have found a **security issue**, please do not mention it in this repository.
Instead, send an email to security@thegeeklab.de with as many details as possible so it can be handled confidential.
Instead, send an email to `security@thegeeklab.de` with as many details as possible so it can be handled confidential.
## Bug Reports and Feature Requests

View File

@ -1,4 +1,14 @@
FROM arm32v7/alpine:3.16@sha256:0c673ee68853a04014c0c623ba5ee21ee700e1d71f7ac1160ddb2e31c6fdbb18
FROM --platform=$BUILDPLATFORM golang:1.20@sha256:741d6f9bcab778441efe05c8e4369d4f8ff56c9a635a97d77f55d8b0ec62f907 as build
ARG TARGETOS
ARG TARGETARCH
ADD . /src
WORKDIR /src
RUN make build
FROM alpine:3.18@sha256:7144f7bab3d4c2648d7e59409f15ec52a18006a128c733fcff20d3a4a54ba44a
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
@ -7,5 +17,5 @@ LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-matrix"
ADD dist/drone-matrix /bin/
COPY --from=build /src/dist/drone-matrix /bin/drone-matrix
ENTRYPOINT [ "/bin/drone-matrix" ]

View File

@ -1,7 +1,7 @@
# renovate: datasource=github-releases depName=mvdan/gofumpt
GOFUMPT_PACKAGE_VERSION := v0.3.1
GOFUMPT_PACKAGE_VERSION := v0.5.0
# renovate: datasource=github-releases depName=golangci/golangci-lint
GOLANGCI_LINT_PACKAGE_VERSION := v1.48.0
GOLANGCI_LINT_PACKAGE_VERSION := v1.54.2
EXECUTABLE := drone-matrix
@ -19,9 +19,14 @@ GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@$(G
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GENERATE ?=
XGO_VERSION := go-1.19.x
XGO_VERSION := go-1.20.x
XGO_TARGETS ?= linux/amd64,linux/arm-6,linux/arm-7,linux/arm64
TARGETOS ?= linux
TARGETARCH ?= amd64
ifneq ("$(TARGETVARIANT)","")
GOARM ?= $(subst v,,$(TARGETVARIANT))
endif
TAGS ?= netgo
ifndef VERSION
@ -69,7 +74,7 @@ test:
build: $(DIST)/$(EXECUTABLE)
$(DIST)/$(EXECUTABLE): $(SOURCES)
$(GO) build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) GOARM=$(GOARM) $(GO) build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
$(DIST_DIRS):
mkdir -p $(DIST_DIRS)

View File

@ -1,6 +1,6 @@
# drone-matrix
Drone plugin to to send messages to Matrix
DISCONTINUED: Drone plugin to to send messages to Matrix
[![Build Status](https://img.shields.io/drone/build/thegeeklab/drone-matrix?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/drone-matrix)
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/drone-matrix)
@ -10,6 +10,8 @@ Drone plugin to to send messages to Matrix
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-matrix)
[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/drone-matrix)](https://github.com/thegeeklab/drone-matrix/blob/main/LICENSE)
> **DISCONTINUED:** As I don't use Drone CI anymore, this project is unmaintained. If you are interested in a free and open source CI system check out [Woodpecker CI](https://woodpecker-ci.org/).
Drone plugin to to send messages to a Matrix room. You can find the full documentation at [https://drone-plugin-index.geekdocs.de](https://drone-plugin-index.geekdocs.de/plugins/drone-matrix).
## Contributors

View File

@ -37,7 +37,7 @@ steps:
<!-- prettier-ignore-start -->
<!-- spellchecker-disable -->
{{< propertylist name=drone-matrix.data >}}
{{< propertylist name=drone-matrix.data sort=name >}}
<!-- spellchecker-enable -->
<!-- prettier-ignore-end -->

View File

@ -1,38 +1,40 @@
---
properties:
username:
- name: username
description: Authentication username. If set, the `password` parameter is required as well.
type: string
required: false
password:
- name: password
description: Authentication password.
type: string
required: false
user_id:
- name: user_id
description: Aauthentication User ID. If set, the `access_token` parameter is required as well.
type: string
required: false
access_token:
- name: access_token
description: Authentication access token.
type: string
required: false
homeserver:
- name: homeserver
description: The Matrix homeserver url to use.
defaultValue: https://matrix.org
type: string
required: false
roomid:
- name: roomid
description: Room ID to send messages to.
type: string
required: false
template:
description: Golang template for the messages.
defaultValue: build {{ build.status }} [{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
- name: template
description: |
Golang template for the message. The [pipeline struct](https://pkg.go.dev/github.com/thegeeklab/drone-plugin-lib/v2/drone#Pipeline)
is exposed to the template and all fields can be referenced. To extend the functionality, [sprig functions](https://masterminds.github.io/sprig/) can also be used.
defaultValue: "Build {{ .Build.Status }} [{{ .Repo.Owner }}/{{ .Repo.Name }}#{{ trunc 8 .Commit.SHA }}]({{ .Build.Link }}) ({{ .Build.Branch }}) by {{ .Commit.Author }}"
type: string
required: false

View File

@ -58,10 +58,11 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
Category: category,
},
&cli.StringFlag{
Name: "template",
EnvVars: []string{"PLUGIN_TEMPLATE", "MATRIX_TEMPLATE"},
Usage: "message template",
Value: "Build {{ build.Status }} [{{ repo.Owner }}/{{ repo.Name }}#{{ truncate commit.SHA 8 }}]({{ build.Link }}) ({{ build.Branch }}) by {{ commit.Author }}",
Name: "template",
EnvVars: []string{"PLUGIN_TEMPLATE", "MATRIX_TEMPLATE"},
Usage: "message template",
//nolint:lll
Value: "Build {{ .Build.Status }} [{{ .Repo.Owner }}/{{ .Repo.Name }}#{{ trunc 8 .Commit.SHA }}]({{ .Build.Link }}) ({{ .Build.Branch }}) by {{ .Commit.Author }}",
Destination: &settings.Template,
Category: category,
},

View File

@ -17,6 +17,7 @@ import (
"github.com/urfave/cli/v2"
)
//nolint:gochecknoglobals
var (
BuildVersion = "devel"
BuildDate = "00000000"

View File

@ -1,11 +0,0 @@
FROM alpine:3.16@sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="drone-matrix"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-matrix"
ADD dist/drone-matrix /bin/
ENTRYPOINT [ "/bin/drone-matrix" ]

View File

@ -1,11 +0,0 @@
FROM arm64v8/alpine:3.16@sha256:ed73e2bee79b3428995b16fce4221fc715a849152f364929cdccdc83db5f3d5c
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="drone-matrix"
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-matrix"
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-matrix"
ADD dist/drone-matrix /bin/
ENTRYPOINT [ "/bin/drone-matrix" ]

View File

@ -1,24 +0,0 @@
image: quay.io/thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: quay.io/thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: quay.io/thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: quay.io/thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

View File

@ -1,24 +0,0 @@
image: thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
platform:
architecture: amd64
os: linux
- image: thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
platform:
architecture: arm64
os: linux
variant: v8
- image: thegeeklab/drone-matrix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
platform:
architecture: arm
os: linux
variant: v7

41
go.mod
View File

@ -1,40 +1,45 @@
module github.com/drone-plugins/drone-matrix
go 1.19
go 1.20
require (
github.com/joho/godotenv v1.4.0
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
github.com/microcosm-cc/bluemonday v1.0.19
github.com/joho/godotenv v1.5.1
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530
github.com/microcosm-cc/bluemonday v1.0.25
github.com/russross/blackfriday/v2 v2.1.0
github.com/sirupsen/logrus v1.9.0
github.com/thegeeklab/drone-plugin-lib/v2 v2.1.0
github.com/thegeeklab/drone-template-lib/v2 v2.2.0
github.com/urfave/cli/v2 v2.11.1
maunium.net/go/mautrix v0.12.0
github.com/sirupsen/logrus v1.9.3
github.com/thegeeklab/drone-plugin-lib/v2 v2.3.4
github.com/urfave/cli/v2 v2.25.7
maunium.net/go/mautrix v0.16.0
)
require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/flowchartsman/handlebars/v3 v3.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/rs/zerolog v1.30.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/tidwall/gjson v1.14.1 // indirect
github.com/tidwall/gjson v1.16.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.4 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
go.mau.fi/util v0.0.0-20230805171708-199bf3eec776 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.11.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
maunium.net/go/maulogger/v2 v2.4.1 // indirect
)

114
go.sum
View File

@ -1,50 +1,57 @@
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/flowchartsman/handlebars/v3 v3.0.1 h1:16YAX2vJ2X2wgliz4QoUNyOJDLmnZ7Uldg/5w49/z3A=
github.com/flowchartsman/handlebars/v3 v3.0.1/go.mod h1:HGaRKxnZS8F2cteR3rusKeY+lI9fbnqwwesT+A3a18I=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16 h1:ZtO5uywdd5dLDCud4r0r55eP4j9FuUNpl60Gmntcop4=
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
github.com/microcosm-cc/bluemonday v1.0.19 h1:OI7hoF5FY4pFz2VA//RN8TfM0YJ2dJcl4P4APrCWy6c=
github.com/microcosm-cc/bluemonday v1.0.19/go.mod h1:QNzV2UbLK2/53oIIwTOyLUSABMkjZ4tqiyC1g/DyqxE=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 h1:kHKxCOLcHH8r4Fzarl4+Y3K5hjothkVW5z7T1dUM11U=
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg=
github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c=
github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
@ -52,36 +59,63 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/thegeeklab/drone-plugin-lib/v2 v2.1.0 h1:RtEiRTQFCeMEnLQOmbswETWoNHVEvb9W4EnV3ZbuIdg=
github.com/thegeeklab/drone-plugin-lib/v2 v2.1.0/go.mod h1:2sHIUXma4CozXNTgh55MxGcvSK8u0ITlkOKZwDDmVAk=
github.com/thegeeklab/drone-template-lib/v2 v2.2.0 h1:lDNGPyXX6s1jiuyngeUTOi1JKJ+tAuyp//pjzG9dEzw=
github.com/thegeeklab/drone-template-lib/v2 v2.2.0/go.mod h1:2oF8ar9A6yUpp0+jrLalbngDqjQRXl/AnY/F9rBcppY=
github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo=
github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/thegeeklab/drone-plugin-lib/v2 v2.3.4 h1:Quzrike/xRAR0izxQ0d+ocJyIUm4h1497Oyo9grcRzg=
github.com/thegeeklab/drone-plugin-lib/v2 v2.3.4/go.mod h1:qWVUZCmwL0Ntwa/hvyqM03EeIr1ReBR2XJsmIc7MGus=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg=
github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.2.4 h1:cuiLzLnaMeBhRmEv00Lpk3tkYrcxpmbU81tAY4Dw0tc=
github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM=
github.com/urfave/cli/v2 v2.11.1 h1:UKK6SP7fV3eKOefbS87iT9YHefv7iB/53ih6e+GNAsE=
github.com/urfave/cli/v2 v2.11.1/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=
github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.mau.fi/util v0.0.0-20230805171708-199bf3eec776 h1:VrxDCO/gLFHLQywGUsJzertrvt2mUEMrZPf4hEL/s18=
go.mau.fi/util v0.0.0-20230805171708-199bf3eec776/go.mod h1:AxuJUMCxpzgJ5eV9JbPWKRH8aAJJidxetNdUj7qcb84=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU=
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@ -89,5 +123,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
maunium.net/go/mautrix v0.12.0 h1:jyT1TkJBIRJ7+OW7NhmMHmnEEBLsQe9ml+FYwSLhlaU=
maunium.net/go/mautrix v0.12.0/go.mod h1:hHvNi5iKVAiI2MAdAeXHtP4g9BvNEX2rsQpSF/x6Kx4=
maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8=
maunium.net/go/maulogger/v2 v2.4.1/go.mod h1:omPuYwYBILeVQobz8uO3XC8DIRuEb5rXYlQSuqrbCho=
maunium.net/go/mautrix v0.16.0 h1:iUqCzJE2yqBC1ddAK6eAn159My8rLb4X8g4SFtQh2Dk=
maunium.net/go/mautrix v0.16.0/go.mod h1:XAjE9pTSGcr6vXaiNgQGiip7tddJ8FQV1a29u2QdBG4=

View File

@ -7,6 +7,7 @@
package plugin
import (
"errors"
"fmt"
"strings"
@ -14,7 +15,7 @@ import (
"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday/v2"
"github.com/sirupsen/logrus"
"github.com/thegeeklab/drone-template-lib/v2/template"
"github.com/thegeeklab/drone-plugin-lib/v2/template"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
@ -31,10 +32,13 @@ type Settings struct {
Template string
}
var ErrAuthSourceNotSet = errors.New("either username and password or userid and accesstoken are required")
// Validate handles the settings validation of the plugin.
func (p *Plugin) Validate() error {
if (p.settings.Username == "" || p.settings.Password == "") && (p.settings.UserID == "" || p.settings.AccessToken == "") {
return fmt.Errorf("either username and password or userid and accesstoken are required")
if (p.settings.Username == "" || p.settings.Password == "") &&
(p.settings.UserID == "" || p.settings.AccessToken == "") {
return ErrAuthSourceNotSet
}
return nil
@ -43,6 +47,7 @@ func (p *Plugin) Validate() error {
// Execute provides the implementation of the plugin.
func (p *Plugin) Execute() error {
muid := id.NewUserID(prepend("@", p.settings.UserID), p.settings.Homeserver)
client, err := mautrix.NewClient(p.settings.Homeserver, muid, p.settings.AccessToken)
if err != nil {
return fmt.Errorf("failed to initialize client: %w", err)
@ -60,14 +65,15 @@ func (p *Plugin) Execute() error {
return fmt.Errorf("failed to authenticate user: %w", err)
}
}
logrus.Info("successfully logged in")
logrus.Info("logged in successfully")
joined, err := client.JoinRoom(prepend("!", p.settings.RoomID), "", nil)
if err != nil {
return fmt.Errorf("failed to join room: %w", err)
}
message, err := template.RenderTrim(p.settings.Template, p.pipeline)
message, err := template.RenderTrim(p.network.Context, *p.network.Client, p.settings.Template, p.pipeline)
if err != nil {
return fmt.Errorf("failed to render template: %w", err)
}
@ -86,19 +92,20 @@ func (p *Plugin) Execute() error {
if _, err := client.SendMessageEvent(joined.RoomID, event.EventMessage, content); err != nil {
return fmt.Errorf("failed to submit message: %w", err)
}
logrus.Info("message sent successfully")
return nil
}
func prepend(prefix, s string) string {
if s == "" {
return s
func prepend(prefix, input string) string {
if strings.TrimSpace(input) == "" {
return input
}
if strings.HasPrefix(s, prefix) {
return s
if strings.HasPrefix(input, prefix) {
return input
}
return prefix + s
return prefix + input
}

View File

@ -18,7 +18,7 @@ type Plugin struct {
}
// New initializes a plugin from the given Settings, Pipeline, and Network.
func New(settings Settings, pipeline drone.Pipeline, network drone.Network) drone.Plugin {
func New(settings Settings, pipeline drone.Pipeline, network drone.Network) *Plugin {
return &Plugin{
settings: settings,
pipeline: pipeline,

View File

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