From 871f851c075149151932805c10ae89b8c0bae51d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:04:40 +0100 Subject: [PATCH 1/9] refactor: migrate to woodpecker ci --- .dictionary | 0 .drone.yml | 176 ------------------ .woodpecker/build-container.yml | 89 +++++++++ .woodpecker/docs.yml | 61 ++++++ .woodpecker/notify.yml | 26 +++ ...rfile.multiarch => Containerfile.multiarch | 0 6 files changed, 176 insertions(+), 176 deletions(-) create mode 100644 .dictionary delete mode 100644 .drone.yml create mode 100644 .woodpecker/build-container.yml create mode 100644 .woodpecker/docs.yml create mode 100644 .woodpecker/notify.yml rename Dockerfile.multiarch => Containerfile.multiarch (100%) diff --git a/.dictionary b/.dictionary new file mode 100644 index 0000000..e69de29 diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 59a1246..0000000 --- a/.drone.yml +++ /dev/null @@ -1,176 +0,0 @@ ---- -kind: pipeline -name: test - -platform: - os: linux - arch: amd64 - -steps: - - name: markdownlint - image: thegeeklab/markdownlint-cli - commands: - - markdownlint 'README.md' - -trigger: - ref: - - refs/heads/main - - refs/tags/** - - refs/pull/** - ---- -kind: pipeline -name: build-container - -platform: - os: linux - arch: amd64 - -steps: - - name: tags - image: thegeeklab/docker-autotag - environment: - DOCKER_AUTOTAG_FORCE_LATEST: True - DOCKER_AUTOTAG_IGNORE_PRERELEASE: True - DOCKER_AUTOTAG_OUTPUT_FILE: .tags - DOCKER_AUTOTAG_VERSION: ${DRONE_TAG} - - - name: dryrun - image: thegeeklab/drone-docker-buildx:23 - settings: - dockerfile: Dockerfile.multiarch - dry_run: true - platforms: - - linux/amd64 - - linux/arm64 - - linux/arm/v7 - - linux/arm/v6 - provenance: false - repo: thegeeklab/${DRONE_REPO_NAME} - when: - ref: - - refs/pull/** - depends_on: - - tags - - - name: publish-dockerhub - image: thegeeklab/drone-docker-buildx:23 - settings: - dockerfile: Dockerfile.multiarch - password: - from_secret: docker_password - platforms: - - linux/amd64 - - linux/arm64 - - linux/arm/v7 - - linux/arm/v6 - provenance: false - 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-buildx:23 - settings: - dockerfile: Dockerfile.multiarch - password: - from_secret: quay_password - platforms: - - linux/amd64 - - linux/arm64 - - linux/arm/v7 - - linux/arm/v6 - provenance: false - 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: notifications - -platform: - os: linux - arch: amd64 - -steps: - - 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: Custom Alpine image including a common toolset - 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 }}**
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: - - build-container - ---- -kind: signature -hmac: d617b5f20a39e588746d4bbffe6b257578af7be614eb281945ad835e7bcebacd - -... diff --git a/.woodpecker/build-container.yml b/.woodpecker/build-container.yml new file mode 100644 index 0000000..916ddae --- /dev/null +++ b/.woodpecker/build-container.yml @@ -0,0 +1,89 @@ +--- +when: + - event: [pull_request, tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + security-build: + image: quay.io/thegeeklab/wp-docker-buildx:1 + settings: + containerfile: Containerfile.multiarch + output: type=oci,dest=oci/${CI_REPO_NAME},tar=false + repo: ${CI_REPO} + + security-scan: + image: ghcr.io/aquasecurity/trivy + commands: + - trivy -v + - trivy image --input oci/${CI_REPO_NAME} + environment: + TRIVY_EXIT_CODE: 1 + TRIVY_IGNORE_UNFIXED: True + TRIVY_NO_PROGRESS: True + TRIVY_SEVERITY: HIGH,CRITICAL + TRIVY_TIMEOUT: 1m + TRIVY_SKIP_FILES: /usr/local/bin/gomplate + + dryrun: + image: quay.io/thegeeklab/wp-docker-buildx:1 + settings: + containerfile: Containerfile.multiarch + dry_run: true + platforms: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + provenance: false + repo: ${CI_REPO} + when: + - event: [pull_request] + + publish-dockerhub: + group: container + image: quay.io/thegeeklab/wp-docker-buildx:1 + settings: + auto_tag: true + containerfile: Containerfile.multiarch + password: + from_secret: docker_password + platforms: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + provenance: false + repo: ${CI_REPO} + username: + from_secret: docker_username + when: + - event: [tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + + publish-quay: + group: container + image: quay.io/thegeeklab/wp-docker-buildx:1 + settings: + auto_tag: true + containerfile: Containerfile.multiarch + password: + from_secret: quay_password + platforms: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + provenance: false + registry: quay.io + repo: quay.io/${CI_REPO} + username: + from_secret: quay_username + when: + - event: [tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +depends_on: + - test diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml new file mode 100644 index 0000000..4b388fa --- /dev/null +++ b/.woodpecker/docs.yml @@ -0,0 +1,61 @@ +--- +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 '_docs/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls + environment: + FORCE_COLOR: "true" + NPM_CONFIG_LOGLEVEL: "error" + + link-validation: + image: docker.io/lycheeverse/lychee + group: test + commands: + - lychee --no-progress --format detailed README.md + + pushrm-dockerhub: + image: docker.io/chko/docker-pushrm:1 + secrets: + - source: docker_password + target: DOCKER_PASS + - source: docker_username + target: DOCKER_USER + environment: + PUSHRM_FILE: README.md + PUSHRM_SHORT: Custom Alpine image including a common toolset + PUSHRM_TARGET: ${CI_REPO} + when: + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + status: [success] + + pushrm-quay: + image: docker.io/chko/docker-pushrm:1 + secrets: + - source: quay_token + target: APIKEY__QUAY_IO + environment: + PUSHRM_FILE: README.md + PUSHRM_TARGET: quay.io/${CI_REPO} + when: + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + status: [success] + +depends_on: + - build-package + - build-container 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/Dockerfile.multiarch b/Containerfile.multiarch similarity index 100% rename from Dockerfile.multiarch rename to Containerfile.multiarch -- 2.24.4 From 2b4dfd705a7b3daae8d8df09d598286b6908dc64 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:06:29 +0100 Subject: [PATCH 2/9] fix env vars --- .woodpecker/build-container.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/build-container.yml b/.woodpecker/build-container.yml index 916ddae..16208bd 100644 --- a/.woodpecker/build-container.yml +++ b/.woodpecker/build-container.yml @@ -19,9 +19,9 @@ steps: - trivy -v - trivy image --input oci/${CI_REPO_NAME} environment: - TRIVY_EXIT_CODE: 1 - TRIVY_IGNORE_UNFIXED: True - TRIVY_NO_PROGRESS: True + TRIVY_EXIT_CODE: "1" + TRIVY_IGNORE_UNFIXED: "true" + TRIVY_NO_PROGRESS: "true" TRIVY_SEVERITY: HIGH,CRITICAL TRIVY_TIMEOUT: 1m TRIVY_SKIP_FILES: /usr/local/bin/gomplate -- 2.24.4 From bb72f70e2ce10a1455076e97197ec4dcfd52aff6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:21:45 +0100 Subject: [PATCH 4/9] fix conditions --- .woodpecker/build-container.yml | 3 --- .woodpecker/docs.yml | 1 - 2 files changed, 4 deletions(-) diff --git a/.woodpecker/build-container.yml b/.woodpecker/build-container.yml index 16208bd..9203a0c 100644 --- a/.woodpecker/build-container.yml +++ b/.woodpecker/build-container.yml @@ -84,6 +84,3 @@ steps: - event: [push, manual] branch: - ${CI_REPO_DEFAULT_BRANCH} - -depends_on: - - test diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 4b388fa..0cbc467 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -57,5 +57,4 @@ steps: status: [success] depends_on: - - build-package - build-container -- 2.24.4 From 5997041420c50cd55c2d591dbda0c72bdc7cd819 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:22:51 +0100 Subject: [PATCH 5/9] cleanup --- .woodpecker/build-container.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.woodpecker/build-container.yml b/.woodpecker/build-container.yml index 9203a0c..87849ad 100644 --- a/.woodpecker/build-container.yml +++ b/.woodpecker/build-container.yml @@ -26,20 +26,6 @@ steps: TRIVY_TIMEOUT: 1m TRIVY_SKIP_FILES: /usr/local/bin/gomplate - dryrun: - image: quay.io/thegeeklab/wp-docker-buildx:1 - settings: - containerfile: Containerfile.multiarch - dry_run: true - platforms: - - linux/amd64 - - linux/arm64 - - linux/arm/v7 - provenance: false - repo: ${CI_REPO} - when: - - event: [pull_request] - publish-dockerhub: group: container image: quay.io/thegeeklab/wp-docker-buildx:1 -- 2.24.4 From 9688467f5128e922316a840650f9d7336446913b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:27:11 +0100 Subject: [PATCH 6/9] fix spellcheck --- .woodpecker/docs.yml | 2 +- README.md | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 0cbc467..22e7141 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -34,7 +34,7 @@ steps: target: DOCKER_USER environment: PUSHRM_FILE: README.md - PUSHRM_SHORT: Custom Alpine image including a common toolset + PUSHRM_SHORT: Custom Alpine image including a common toolkit PUSHRM_TARGET: ${CI_REPO} when: - event: [push, manual] diff --git a/README.md b/README.md index 94f953e..a5cee2b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # alpine -Custom Alpine image including a common toolset +Custom Alpine image including a common toolkit [![Build Status](https://img.shields.io/drone/build/docker/alpine-tools?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/alpine-tools) [![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/alpine) @@ -8,10 +8,12 @@ Custom Alpine image including a common toolset [![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/alpine-tools) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/alpine-tools/src/branch/main/LICENSE) -Custom Alpine image including a common toolset. +Custom Alpine image including a common toolkit. **Included software:** + + - curl - make - tar @@ -22,6 +24,7 @@ Custom Alpine image including a common toolset. - spellchecker-cli - js-beautify - yamllint + ## License -- 2.24.4 From f6cfc0ee83c67b039249b063bb25b7a3bfb552b9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 09:32:07 +0100 Subject: [PATCH 7/9] fix spellcheck --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a5cee2b..26dc889 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,16 @@ Custom Alpine image including a common toolkit + + [![Build Status](https://img.shields.io/drone/build/docker/alpine-tools?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/alpine-tools) [![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/alpine) [![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/alpine) [![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/alpine-tools) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/alpine-tools/src/branch/main/LICENSE) + + Custom Alpine image including a common toolkit. **Included software:** @@ -24,6 +28,7 @@ Custom Alpine image including a common toolkit. - spellchecker-cli - js-beautify - yamllint + ## License -- 2.24.4 From f8ac6135ce2145d53d8a095eca705794185bd80a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 10:17:03 +0100 Subject: [PATCH 8/9] cleanup --- .woodpecker/build-package.yml | 29 +++++++++++++++++++++++++++++ .woodpecker/docs.yml | 1 + README.md | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/build-package.yml diff --git a/.woodpecker/build-package.yml b/.woodpecker/build-package.yml new file mode 100644 index 0000000..e98d80a --- /dev/null +++ b/.woodpecker/build-package.yml @@ -0,0 +1,29 @@ +--- +when: + - event: [pull_request, tag] + - event: [push, manual] + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + changelog: + image: quay.io/thegeeklab/git-sv + commands: + - git fetch --depth=2147483647 + - git sv current-version + - git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md + - cat CHANGELOG.md + + publish-gitea: + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_token + base_url: https://gitea.rknet.org + files: + - dist/* + note: CHANGELOG.md + overwrite: true + title: ${CI_COMMIT_TAG} + when: + - event: [tag] diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 22e7141..39a1476 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -57,4 +57,5 @@ steps: status: [success] depends_on: + - build-package - build-container diff --git a/README.md b/README.md index 26dc889..1c16aa1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Custom Alpine image including a common toolkit -[![Build Status](https://img.shields.io/drone/build/docker/alpine-tools?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/alpine-tools) +[![Build Status](https://ci.rknet.org/api/badges/container/alpine-tools/status.svg)](https://ci.rknet.org/repos/container/alpine-tools) [![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/alpine) [![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/alpine) [![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/alpine-tools) -- 2.24.4 From dcf3084eb339909af533330a83ed7659497ece28 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 7 Nov 2023 10:24:09 +0100 Subject: [PATCH 9/9] add gitsv config --- .gitsv/config.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitsv/config.yml diff --git a/.gitsv/config.yml b/.gitsv/config.yml new file mode 100644 index 0000000..acaf506 --- /dev/null +++ b/.gitsv/config.yml @@ -0,0 +1,47 @@ +--- +version: "1.1" + +versioning: + update-major: [] + update-minor: [feat] + update-patch: [fix, perf, refactor, chore, test, ci, docs] + +tag: + pattern: "v%d.%d.%d" + +release-notes: + sections: + - name: Features + commit-types: [feat] + section-type: commits + - name: Bug Fixes + commit-types: [fix] + section-type: commits + - name: Performance Improvements + commit-types: [perf] + section-type: commits + - name: Code Refactoring + commit-types: [refactor] + section-type: commits + - name: Others + commit-types: [chore] + section-type: commits + - name: Testing + commit-types: [test] + section-type: commits + - name: CI Pipeline + commit-types: [ci] + section-type: commits + - name: Documentation + commit-types: [docs] + section-type: commits + - name: BREAKING CHANGES + section-type: breaking-changes + +commit-message: + footer: + issue: + key: issue + add-value-prefix: "#" + issue: + regex: "#?[0-9]+" -- 2.24.4