From 64004f70cc972ce26e616c852e0b03890a43d0a4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 17 Apr 2023 12:07:52 +0200 Subject: [PATCH] initial commit --- .chglog/CHANGELOG.tpl.md | 23 +++++ .chglog/config.yml | 24 +++++ .drone.yml | 197 +++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + .markdownlint.yml | 6 ++ .prettierignore | 3 + Dockerfile | 29 ++++++ LICENSE | 21 +++++ README.md | 15 +++ overlay/.keep | 0 renovate.json | 4 + 11 files changed, 323 insertions(+) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100644 .markdownlint.yml create mode 100644 .prettierignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 overlay/.keep create mode 100644 renovate.json diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..cc0367b --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,23 @@ +# Changelog + +{{ range .Versions -}} +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }}) + +{{ range .CommitGroups -}} +### {{ .Title }} + +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(.*)/issues/(.*)" (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") "${1}/pulls/${2}") | trim }} +{{ end }} +{{- end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} + +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..a1418ba --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,24 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://gitea.rknet.org/docker/codecov +options: + commit_groups: + title_maps: + feat: Features + fix: Bug Fixes + perf: Performance Improvements + refactor: Code Refactoring + chore: Others + test: Testing + ci: CI Pipeline + header: + pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" + pattern_maps: + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5b51016 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,197 @@ +--- +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/pull/** + - refs/tags/** + +--- +kind: pipeline +name: build-container + +platform: + os: linux + arch: amd64 + +steps: + - name: dryrun + image: thegeeklab/drone-docker-buildx:23 + settings: + dockerfile: Dockerfile + dry_run: true + provenance: false + repo: thegeeklab/${DRONE_REPO_NAME} + when: + ref: + - refs/pull/** + + - 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} + when: + ref: + - refs/heads/main + - refs/tags/** + depends_on: + - dryrun + + - name: changelog-generate + image: thegeeklab/codecov + commands: + - git fetch -tq + - codecov --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased} + depends_on: + - tags + + - name: changelog-format + image: thegeeklab/alpine-tools + commands: + - prettier CHANGELOG.md + - prettier -w CHANGELOG.md + depends_on: + - changelog-generate + + - name: publish-dockerhub + image: thegeeklab/drone-docker-buildx:23 + settings: + dockerfile: Dockerfile + password: + from_secret: docker_password + provenance: false + repo: thegeeklab/${DRONE_REPO_NAME} + username: + from_secret: docker_username + when: + ref: + - refs/heads/main + - refs/tags/** + depends_on: + - changelog-format + + - name: publish-quay + image: thegeeklab/drone-docker-buildx:23 + settings: + dockerfile: Dockerfile + password: + from_secret: quay_password + 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: + - changelog-format + + - name: publish-gitea + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_token + base_url: https://gitea.rknet.org + note: CHANGELOG.md + overwrite: true + title: ${DRONE_TAG} + when: + ref: + - refs/tags/** + depends_on: + - publish-dockerhub + - publish-quay + +trigger: + ref: + - refs/heads/main + - refs/pull/** + - refs/tags/** + +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 image for codecov + 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: 02b33b0841393839d7e0f26c384d2f3455efe42403e8d92bb60d8cb6bd47e6cf + +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b763b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +CHANGELOG.md diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..b59a114 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,6 @@ +--- +default: True +MD013: False +MD041: False +MD004: + style: dash diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..23a4f05 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +.drone.yml +*.tpl.md +LICENSE diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..309990c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM thegeeklab/alpine:latest@sha256:b4bc009a2727bfbed5b3687db57bd013b3ebd9ae517488597678b9d8b515b2bb + +LABEL maintainer="Robert Kaussow " +LABEL org.opencontainers.image.authors="Robert Kaussow " +LABEL org.opencontainers.image.title="codecov" +LABEL org.opencontainers.image.url="https://gitea.rknet.org/docker/codecov" +LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/codecov" +LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/codecov" + +ARG BUILD_VERSION + +# renovate: datasource=github-releases depName=codecov/uploader +ENV CODECOV_VERSION="${BUILD_VERSION:-v0.4.0}" + +COPY overlay/ / + +RUN apk add --update --no-cache --virtual .build-deps tar && \ + apk add --update --no-cache curl gnupg coreutils && \ + echo "Installing codecov version '${CODECOV_VERSION##v}' ..." && \ + curl -SsfL -o /usr/local/bin/codecov "https://github.com/codecov/uploader/releases/download/${CODECOV_VERSION}/codecov-alpine " | \ + chmod 755 /usr/local/bin/codecov && \ + apk del .build-deps && \ + rm -rf /var/cache/apk/* && \ + rm -rf /tmp/* && \ + rm -rf /root/.cache/ + +USER root +CMD [] +ENTRYPOINT ["/usr/local/bin/codecov"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3812eb4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Robert Kaussow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e77528 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# codecov + +Custom image for codecov + +[![Build Status](https://img.shields.io/drone/build/docker/codecov?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/docker/codecov) +[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/codecov) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/codecov) +[![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/codecov) +[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/codecov/src/branch/main/LICENSE) + +Custom Docker image for the [Codecov Uploader](https://github.com/codecov/uploader). + +## License + +This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/codecov/src/branch/main/LICENSE) file for details. diff --git a/overlay/.keep b/overlay/.keep new file mode 100644 index 0000000..e69de29 diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5f02575 --- /dev/null +++ b/renovate.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["github>thegeeklab/renovate-presets:docker"] +}