feat(go-traefik-certmanager): initial commit

This commit is contained in:
Tom Neuber 2025-01-21 21:29:51 +01:00
parent 913eaceaa4
commit c10b760c0b
Signed by: tom
GPG key ID: F17EFE4272D89FF6
14 changed files with 835 additions and 0 deletions

41
.woodpecker/.build.yaml Normal file
View file

@ -0,0 +1,41 @@
steps:
- name: docker
image: woodpeckerci/plugin-docker-buildx
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/go-traefik-certmanager
platforms:
- linux/amd64
- linux/arm64
tags:
- latest
- ${CI_PIPELINE_NUMBER}
when:
- branch: main
event: [push, manual]
- name: docker-staging
image: woodpeckerci/plugin-docker-buildx
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/go-traefik-certmanager
platforms:
- linux/amd64
- linux/arm64
tags:
- staging
- staging-${CI_PIPELINE_NUMBER}
dry_run: true
when:
- branch:
exclude: main
event: [push, manual]
depends_on:
- lint

58
.woodpecker/.deploy.yaml Normal file
View file

@ -0,0 +1,58 @@
skip_clone: true
steps:
- name: bump tag in deployment-repo (prod)
image: git.ar21.de/aaron/kustomize-ci
commands:
- git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo
- cd deployment-repo/traefik-certmanager/overlay
- kustomize edit set image git.ar21.de/yolokube/go-traefik-certmanager=git.ar21.de/yolokube/go-traefik-certmanager:${CI_PIPELINE_NUMBER}
when:
- branch: main
event: [push, manual]
- name: push new tag to deployment-repo (prod)
image: appleboy/drone-git-push
settings:
branch: "${CI_PIPELINE_NUMBER}_traefik-certmanager_prod"
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
path: deployment-repo
force: false
commit: true
commit_message: "traefik-certmanager: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
ssh_key:
from_secret: FORGEJO_SSH_KEY
when:
- branch: main
event: [push, manual]
- name: create pull request (prod)
image: git.ar21.de/tom/push-message-randomizer:latest
pull: true
settings:
gitea_address: https://git.ar21.de
gitea_token:
from_secret: FORGEJO_API
owner: ${CI_REPO_OWNER}
repo: core-deployments
branch: "${CI_PIPELINE_NUMBER}_traefik-certmanager_prod"
base_branch: main
pr_title: "traefik-certmanager: update image tag to ${CI_PIPELINE_NUMBER}"
pr_body: |
### traefik-certmanager image update
{- random-pr-message -}
### Configuration
📅 **Schedule**: Branch creation - At any time, Automerge - At any time.
🚦 **Automerge**: Enabled.
skip_on_missing_branch: true
close_pr_if_empty: true
delete_branch_if_pr_empty: true
merge_when_checks_succeed: true
delete_branch_after_merge: true
when:
- branch: main
event: [push, manual]
depends_on:
- build
- lint

20
.woodpecker/.lint.yaml Normal file
View file

@ -0,0 +1,20 @@
steps:
- name: gofmt
image: golang:1.23.5
commands:
- gofmt -l -s .
when:
- event: [push, manual]
- name: vuln-check
image: golang:1.23.5
commands:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
when:
- event: [push, manual]
- name: golangci-linter
image: golangci/golangci-lint:v1.63.4
commands:
- golangci-lint run ./...
when:
- event: [push, manual]