chore: release prep part 2

This commit is contained in:
Dawid Wysokiński 2024-03-31 10:42:04 +02:00
parent c735850306
commit ebbcc24af1
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
3 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,37 @@
when:
event: tag
ref: refs/tags/v*
steps:
deploy:
image: alpine/k8s:1.27.11
secrets:
- kubeconfig
commands:
- mkdir ~/.kube && echo \"$KUBECONFIG\" > ~/.kube/twhelp
- cd ./k8s/overlays/prod
- kustomize edit set image twhelp=gitea.dwysokinski.me/twhelp/core:${CI_COMMIT_TAG##v}
- cd ../../..
- kubectl --kubeconfig ~/.kube/twhelp -n twhelp delete jobs.batch twhelp-migrations-job || true
- kustomize build ./k8s/overlays/prod | kubectl --kubeconfig ~/.kube/twhelp apply -n twhelp -f -
email:
image: deblan/woodpecker-email
settings:
dsn:
from_secret: email_dsn
from:
address:
from_secret: email_from_address
name: Woodpecker
recipients:
- notifications@twhelp.app
recipients_only: true
subject:
"[deployment - {{ pipeline.status }}] {{ repo.full_name }} ({{ commit.tag }}"
when:
status: [success, failure]
event: cron
depends_on:
- release

View File

@ -18,7 +18,7 @@ steps:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
notify:
email:
image: deblan/woodpecker-email
settings:
dsn:

View File

@ -1,5 +1,6 @@
when:
event: tag
ref: refs/tags/v*
variables:
- &go_image 'golang:1.22'