Files
autobackup-operator/.woodpecker/pre-commit.yaml
T
unkin-agent 1c4d2db5e8
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Switch Go CI steps to gobuilder + S3 build cache
Cuts go vet/go test wall time via a shared package-object cache.

- pre-commit and test steps move from docker.io/golang:1.26 to the
  pinned estate gobuilder image (go1.26.7, trusts the internal CA)
- wire GOCACHEPROG to go-cache-plugin against the S3 cache bucket,
  creds from org-level GOCACHE_AWS_* secrets
- bump test step memory limit to 4Gi for envtest + -race headroom
- buildx steps (build.yaml, docker.yaml) untouched: compilation
  happens inside Dockerfile.operator, not the Woodpecker step
2026-10-02 23:40:40 +10:00

31 lines
912 B
YAML

when:
- event: pull_request
steps:
- name: pre-commit
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:0.1.2-alma9
commands:
- test -z "$(gofmt -l cmd/ internal/)"
- go vet -mod=vendor ./...
environment:
GOCACHE_S3_BUCKET: gocache
GOCACHE_S3_REGION: us-east-1
GOCACHE_S3_ENDPOINT_URL: "https://s3.ceph.unkin.net"
GOCACHE_S3_PATH_STYLE: "true"
GOCACHE_KEY_PREFIX: ci-autobackup-operator
GOCACHEPROG: "go-cache-plugin --cache-dir=/tmp/gocache"
AWS_ACCESS_KEY_ID:
from_secret: GOCACHE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: GOCACHE_AWS_SECRET_ACCESS_KEY
backend_options:
kubernetes:
serviceAccountName: autobackup-operator-ci
resources:
requests:
memory: 512Mi
cpu: 1
limits:
memory: 2Gi
cpu: 2