09f8fcd83d
Branch protection on this repo will require the contexts ci/woodpecker/pr/pre-commit, ci/woodpecker/pr/test and ci/woodpecker/pr/build, mirroring the node-lookup workflow layout. - Adds .woodpecker/pre-commit.yaml running pre-commit via uvx - Adds .pre-commit-config.yaml mirroring node-lookup (vendored web/static assets excluded) - Adds .woodpecker/test.yaml with vet + gofmt check + race tests - Reworks build.yaml to compile via make build plus the existing buildx dry-run image check, PR events only - Renames docker.yaml to release.yaml per node-lookup convention (tag-driven docker release unchanged)
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
when:
|
|
- event: pull_request
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.25
|
|
commands:
|
|
- make build
|
|
backend_options:
|
|
kubernetes:
|
|
serviceAccountName: default
|
|
resources:
|
|
requests:
|
|
memory: 512Mi
|
|
cpu: 1
|
|
limits:
|
|
memory: 2Gi
|
|
cpu: 2
|
|
|
|
# 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/logviewer
|
|
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
|