e24b4d1667
golang:1.25 lacked the estate CA trust and a build cache, paying full compile cost every run and risking TLS failures against internal endpoints. - switch pre-commit and test steps to the gobuilder image - wire GOCACHEPROG to go-cache-plugin against the shared S3 cache - add backend_options resources and serviceAccountName to both steps
34 lines
978 B
YAML
34 lines
978 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 .)"
|
|
- go vet ./...
|
|
environment:
|
|
# golib lives on Gitea; skip the public proxy/sum db.
|
|
GOPRIVATE: git.unkin.net
|
|
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-forgebot
|
|
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
|
|
backend_options:
|
|
kubernetes:
|
|
serviceAccountName: default
|
|
resources:
|
|
requests:
|
|
memory: 512Mi
|
|
cpu: 1
|
|
limits:
|
|
memory: 2Gi
|
|
cpu: 2
|