Files
data-api/.woodpecker.yaml
T
ask 4834d2153a
ci/woodpecker/push/woodpecker Pipeline was successful
build(ci): pin docker-tags-plugin to 0.2.1-abh
2026-05-24 01:34:37 -07:00

85 lines
1.8 KiB
YAML

when:
- event: [push, pull_request, tag, manual]
clone:
git:
image: woodpeckerci/plugin-git
settings:
tags: true
variables:
- &go_env
GOMODCACHE: /go/pkg/mod
GOCACHE: /go/pkg/cache
- &go_volumes
- go-pkg:/go/pkg
steps:
- name: vendor
image: golang:1.26
pull: true
environment:
GOMODCACHE: /go/pkg/mod
GOCACHE: /go/pkg/cache
GITEA_TOKEN:
from_secret: gitea_token
volumes: *go_volumes
commands:
- printf "machine gitea.develooper.com\nlogin __token__\npassword $GITEA_TOKEN\n" > ~/.netrc
- go mod vendor
- rm -f ~/.netrc
- name: test
image: golang:1.26
pull: true
environment: *go_env
volumes: *go_volumes
commands:
- go test -v ./...
- go build ./...
depends_on: [vendor]
- name: goreleaser
image: golang:1.26
pull: true
environment: *go_env
volumes: *go_volumes
commands:
- ./scripts/run-goreleaser
backend_options:
kubernetes:
resources:
requests:
cpu: 6000m
memory: 1Gi
limits:
cpu: 10000m
memory: 4Gi
depends_on: [test]
- name: generate-tags
image: ghcr.io/abh/woodpecker-docker-tags-plugin:0.2.1-abh
settings:
tags: |
branch
sha
semver --auto
edge -v latest
when:
- event: [push, tag, manual]
depends_on: [goreleaser]
- name: docker
image: woodpeckerci/plugin-kaniko
settings:
registry: harbor.ntppool.org
repo: ntppool/data-api
cache: true
username:
from_secret: harbor_username
password:
from_secret: harbor_password
when:
- event: [push, tag, manual]
depends_on: [goreleaser, generate-tags]