ci: switch Go steps to gobuilder with S3-backed build cache
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

Use the estate gobuilder image for the Go test and pre-commit steps
and enable the shared GOCACHEPROG S3 cache to speed up CI builds.
This commit is contained in:
2026-10-02 23:48:13 +10:00
parent 0567505a51
commit b91fdb2601
2 changed files with 26 additions and 2 deletions
+13 -1
View File
@@ -3,7 +3,7 @@ when:
steps:
- name: pre-commit
image: golang:1.25
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:0.1.2-alma9
backend_options:
kubernetes:
serviceAccountName: kea-operator-ci
@@ -14,6 +14,18 @@ steps:
limits:
memory: 2Gi
cpu: "2"
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-kea-operator
GOCACHE_METRICS: "true"
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
commands:
- test -z "$(gofmt -l .)"
- go vet ./...
+13 -1
View File
@@ -3,7 +3,7 @@ when:
steps:
- name: test
image: golang:1.25
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:0.1.2-alma9
backend_options:
kubernetes:
serviceAccountName: kea-operator-ci
@@ -14,5 +14,17 @@ steps:
limits:
memory: 2Gi
cpu: "2"
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-kea-operator
GOCACHE_METRICS: "true"
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
commands:
- go test -race -count=1 ./api/... ./internal/...