eb3a18ff1c
Each Woodpecker workflow file maps to one ci/woodpecker/pr/<file> status context, so break the single build.yaml into three PR workflows to expose three separate PR checks: - .woodpecker/pre-commit.yaml runs the pre-commit hooks via make pre-commit. - .woodpecker/test.yaml runs make test (go test ./...). - .woodpecker/build.yaml keeps only the container dry-run build-check. Add .pre-commit-config.yaml (gofmt/go vet/go unit tests + whitespace/yaml hooks) and a make pre-commit target. docker.yaml (tag release) is unchanged.
29 lines
911 B
YAML
29 lines
911 B
YAML
when:
|
|
- event: [pull_request, push]
|
|
|
|
steps:
|
|
# Validate the image builds without pushing. The CA-baked buildx plugin trusts
|
|
# the internal registry's CA; the plain woodpeckerci plugin fails x509 here.
|
|
- name: build-check
|
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest
|
|
settings:
|
|
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/waitfordb
|
|
dockerfile: Dockerfile
|
|
dry_run: true
|
|
platforms: linux/amd64
|
|
build_args:
|
|
VERSION: ${CI_COMMIT_SHA}
|
|
buildkit_config: |
|
|
[registry."artifactapi.k8s.syd1.au.unkin.net"]
|
|
ca = ["/etc/docker/certs.d/artifactapi.k8s.syd1.au.unkin.net/ca.crt"]
|
|
backend_options:
|
|
kubernetes:
|
|
serviceAccountName: default
|
|
resources:
|
|
requests:
|
|
memory: 1Gi
|
|
cpu: 1
|
|
limits:
|
|
memory: 4Gi
|
|
cpu: 2
|