27504777f8
Cut CI time/network by caching go build/vet/test artifacts in S3. - bump build/test/pre-commit/release(test,build) to artifactapi.../gobuilder:0.1.2-alma9 - wire GOCACHEPROG via go-cache-plugin with an absolute cache dir - add GOCACHE_* env (ci-tomswall prefix) and AWS creds from org secrets - leave rpm package/upload steps untouched (no Go toolchain)
31 lines
873 B
YAML
31 lines
873 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:
|
|
- uvx pre-commit run --all-files
|
|
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-tomswall
|
|
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
|