diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index a53df74..0000000 --- a/.drone.yml +++ /dev/null @@ -1,225 +0,0 @@ ---- -kind: pipeline -name: test - -platform: - os: linux - arch: amd64 - -steps: - - name: lint - image: koalaman/shellcheck-alpine:stable - commands: - - shellcheck ./retry - - - name: test - image: bats/bats - commands: - - bats ./retry.bats - -trigger: - ref: - - refs/heads/main - - refs/tags/** - - refs/pull/** - ---- -kind: pipeline -name: build-package - -platform: - os: linux - arch: amd64 - -steps: - - name: checksum - image: alpine - commands: - - sha256sum retry > 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-github - image: plugins/github-release - settings: - api_key: - from_secret: github_token - files: - - retry - - sha256sum.txt - 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 - -platform: - os: linux - arch: amd64 - -steps: - - 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/** - - - name: publish-dockerhub - image: thegeeklab/drone-docker-buildx:23 - settings: - auto_tag: true - 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: - auto_tag: true - 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 - pull: always - image: chko/docker-pushrm:1 - environment: - DOCKER_PASS: - from_secret: docker_password - DOCKER_USER: - from_secret: docker_username - PUSHRM_FILE: README.md - PUSHRM_SHORT: Poor-mans docker service synchronizer - PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME} - when: - status: - - success - - - name: pushrm-quay - pull: always - 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: 50ff052940d66ca2f64357dfa44c2bebde42c4a9991076991f292258c26fa154 - -... diff --git a/.github/settings.yml b/.github/settings.yml index c5e2ef7..f89e901 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -50,7 +50,9 @@ branches: required_status_checks: strict: false contexts: - - continuous-integration/drone/pr + - ci/woodpecker/pr/test + - ci/woodpecker/pr/binary + - ci/woodpecker/pr/container enforce_admins: true required_linear_history: true restrictions: null diff --git a/.prettierignore b/.prettierignore index 23a4f05..135c35d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,2 @@ -.drone.yml *.tpl.md LICENSE diff --git a/renovate.json b/.renovate.json similarity index 100% rename from renovate.json rename to .renovate.json diff --git a/.woodpecker/container.yml b/.woodpecker/container.yml new file mode 100644 index 0000000..e1a40d8 --- /dev/null +++ b/.woodpecker/container.yml @@ -0,0 +1,67 @@ +--- +when: + - ref: refs/heads/${CI_REPO_DEFAULT_BRANCH} + - ref: refs/tags/** + - ref: refs/pull/** + +steps: + dryrun: + image: quay.io/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/${CI_REPO_NAME} + when: + - ref: refs/pull/** + + publish-dockerhub: + group: build + image: quay.io/thegeeklab/drone-docker-buildx:23 + settings: + auto_tag: true + dockerfile: Dockerfile.multiarch + password: + from_secret: docker_password + platforms: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + - linux/arm/v6 + provenance: false + repo: thegeeklab/${CI_REPO_NAME} + username: + from_secret: docker_username + when: + - ref: refs/heads/main + - ref: refs/tags/** + + publish-quay: + group: build + image: quay.io/thegeeklab/drone-docker-buildx:23 + settings: + auto_tag: true + 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/${CI_REPO_NAME} + username: + from_secret: quay_username + when: + - ref: refs/heads/main + - ref: refs/tags/** + +depends_on: + - test diff --git a/.woodpecker/notify.yml b/.woodpecker/notify.yml new file mode 100644 index 0000000..d13d8ec --- /dev/null +++ b/.woodpecker/notify.yml @@ -0,0 +1,27 @@ +--- +when: + - ref: refs/heads/${CI_REPO_DEFAULT_BRANCH} + - ref: refs/tags/** + +steps: + 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 + +depends_on: + - test + - container + - release diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml new file mode 100644 index 0000000..2f4d236 --- /dev/null +++ b/.woodpecker/release.yml @@ -0,0 +1,40 @@ +--- +when: + - ref: refs/heads/${CI_REPO_DEFAULT_BRANCH} + - ref: refs/tags/** + - ref: refs/pull/** + +steps: + checksum: + image: docker.io/alpine + commands: + - sha256sum retry > sha256sum.txt + + changelog-generate: + image: quay.io/thegeeklab/git-chglog + commands: + - git fetch -tq + - git-chglog --no-color --no-emoji -o CHANGELOG.md ${CI_COMMIT_TAG:---next-tag unreleased unreleased} + + changelog-format: + image: quay.io/thegeeklab/alpine-tools + commands: + - prettier CHANGELOG.md + - prettier -w CHANGELOG.md + + publish-github: + image: docker.io/plugins/github-release + settings: + api_key: + from_secret: github_token + files: + - retry + - sha256sum.txt + note: CHANGELOG.md + overwrite: true + title: ${CI_COMMIT_TAG} + when: + - ref: refs/tags/** + +depends_on: + - test diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..250dfa0 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,18 @@ +--- +when: + - ref: refs/heads/${CI_REPO_DEFAULT_BRANCH} + - ref: refs/tags/** + - ref: refs/pull/** + +steps: + lint: + group: test + image: docker.io/koalaman/shellcheck-alpine:stable + commands: + - shellcheck ./retry + + test: + group: test + image: docker.io/bats/bats + commands: + - bats ./retry.bats diff --git a/README.md b/README.md index c25849d..05197c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Poor-mans servie synchronizer -[![Build Status](https://img.shields.io/drone/build/thegeeklab/retry?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/retry) +[![Build Status](https://ci.thegeeklab.de/api/badges/4/status.svg)](https://ci.thegeeklab.de/4) [![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/retry) [![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/retry) [![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/retry)](https://github.com/thegeeklab/retry/graphs/contributors)