From c6713b15803b8d148c6c5a1e5066fdb5fec9e83e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 7 Dec 2023 10:56:20 +0100 Subject: [PATCH 1/2] ci: migrate to woodpecker --- .drone.yml | 72 ------------------------------------------ .woodpecker/docs.yml | 23 ++++++++++++++ .woodpecker/notify.yml | 26 +++++++++++++++ .woodpecker/test.yml | 13 ++++++++ README.md | 4 +-- 5 files changed, 64 insertions(+), 74 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker/docs.yml create mode 100644 .woodpecker/notify.yml create mode 100644 .woodpecker/test.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index a7ad6e0..0000000 --- a/.drone.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -kind: pipeline -name: test - -platform: - os: linux - arch: amd64 - -concurrency: - limit: 1 - -steps: - - name: markdownlint - image: quay.io/thegeeklab/markdownlint-cli - commands: - - markdownlint 'README.md' - - - name: spellcheck - image: quay.io/thegeeklab/alpine-tools - commands: - - spellchecker --files 'README.md' -d .dictionary -p spell indefinite-article syntax-urls - environment: - FORCE_COLOR: true - NPM_CONFIG_LOGLEVEL: error - - - name: lint - image: docker.io/koalaman/shellcheck-alpine:stable - commands: - - grep -ErlI '^#!(.*/|.*env +)(sh|bash|ksh)' ./shell/ | xargs -r shellcheck - -trigger: - ref: - - refs/heads/main - - refs/tags/** - - refs/pull/** - ---- -kind: pipeline -name: notifications - -platform: - os: linux - arch: amd64 - -steps: - - name: matrix - image: quay.io/thegeeklab/drone-matrix - settings: - homeserver: - from_secret: matrix_homeserver - password: - from_secret: matrix_password - roomid: - from_secret: matrix_roomid - template: "Status: **{{ .Build.Status }}**
Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}
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: - - test diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml new file mode 100644 index 0000000..4df7ade --- /dev/null +++ b/.woodpecker/docs.yml @@ -0,0 +1,23 @@ +--- +when: + - event: [pull_request, tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + markdownlint: + image: quay.io/thegeeklab/markdownlint-cli + commands: + - markdownlint 'README.md' + + spellcheck: + image: quay.io/thegeeklab/alpine-tools + commands: + - spellchecker --files 'README.md' -d .dictionary -p spell indefinite-article syntax-urls + environment: + FORCE_COLOR: "true" + NPM_CONFIG_LOGLEVEL: "error" + +depends_on: + - test diff --git a/.woodpecker/notify.yml b/.woodpecker/notify.yml new file mode 100644 index 0000000..a851904 --- /dev/null +++ b/.woodpecker/notify.yml @@ -0,0 +1,26 @@ +--- +when: + - event: [tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +runs_on: [success, failure] + +steps: + matrix: + image: quay.io/thegeeklab/wp-matrix + settings: + homeserver: + from_secret: matrix_homeserver + password: + from_secret: matrix_password + roomid: + from_secret: matrix_roomid + username: + from_secret: matrix_username + when: + - status: [success, failure] + +depends_on: + - docs diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..be8f342 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,13 @@ +--- +when: + - event: [pull_request, tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + lint: + group: test + image: docker.io/koalaman/shellcheck-alpine:stable + commands: + - shellcheck ./retry diff --git a/README.md b/README.md index 97d171a..2c55fb2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # helpers -[![Build Status](https://img.shields.io/drone/build/xoxys/helpers?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/xoxys/helpers) +[![status-badge](https://ci.rknet.org/api/badges/xoxys/helpers/status.svg)](https://ci.rknet.org/repos/xoxys/helpers) -Collection of shell helpers, snippets and command cheatsheets for recurring tasks. Most of the things in this repository don't work out of the box and don't have proper error handling. Think before you use them! +Collection of shell helpers, snippets and command cheatsheets for recurring tasks. Most of the scripts in this repository don't work out of the box and don't have proper error handling. Use it on your own risk. ## License -- 2.45.2 From 06798537ec54656c27faa8e05ef87d2ac3f1ff81 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 7 Dec 2023 10:57:05 +0100 Subject: [PATCH 2/2] fix shellcheck command --- .woodpecker/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index be8f342..1949fb3 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -10,4 +10,4 @@ steps: group: test image: docker.io/koalaman/shellcheck-alpine:stable commands: - - shellcheck ./retry + - grep -ErlI '^#!(.*/|.*env +)(sh|bash|ksh)' ./shell/ | xargs -r shellcheck -- 2.45.2