Merge pull request 'Switch Go CI steps to gobuilder + S3 build cache' (#4) from benvin/gocache into main
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -3,10 +3,21 @@ when:
|
||||
|
||||
steps:
|
||||
- name: pre-commit
|
||||
image: golang:1.26
|
||||
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
|
||||
|
||||
+13
-2
@@ -3,12 +3,23 @@ when:
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.26
|
||||
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:0.1.2-alma9
|
||||
commands:
|
||||
# Fetch the envtest control-plane binaries; the controller tests skip
|
||||
# gracefully if this cannot be downloaded.
|
||||
- export KUBEBUILDER_ASSETS="$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use 1.31.0 -p path 2>/dev/null)"
|
||||
- go test -race -count=1 -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
|
||||
@@ -17,5 +28,5 @@ steps:
|
||||
memory: 1Gi
|
||||
cpu: 1
|
||||
limits:
|
||||
memory: 2Gi
|
||||
memory: 4Gi
|
||||
cpu: 2
|
||||
|
||||
Reference in New Issue
Block a user