Fix containerized generation

This commit is contained in:
Christoph Blecker 2024-02-18 20:14:37 -08:00
parent 44086e96ed
commit c7da084db7
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
3 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
IMAGE_NAME=golang:1.18
export GOPROXY?=https://proxy.golang.org
CONTAINER_ENGINE?=$(shell command -v docker 2>/dev/null || command -v podman 2>/dev/null)
default: \
generate \
@ -10,19 +10,19 @@ reset-docs:
generate:
go run ./generator/app.go
generate-dockerized:
docker run --rm -e WHAT -e GOPROXY -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app generate
generate-containerized:
$(CONTAINER_ENGINE) run --rm -e WHAT -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app generate
verify:
@hack/verify.sh
verify-dockerized:
docker run --rm -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app verify
verify-containerized:
$(CONTAINER_ENGINE) run --rm -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app verify
test:
go test -v ./generator/...
test-dockerized:
docker run --rm -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app test
test-containerized:
$(CONTAINER_ENGINE) run --rm -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app test
.PHONY: default reset-docs generate generate-dockerized verify test test-dockerized
.PHONY: default reset-docs generate generate-containerized verify verify-containerized test test-containerized

View File

@ -1,7 +1,7 @@
# SIG Doc builder
This folder contains scripts to automatically generate documentation about the
different Special Interest Groups (SIGs), Working Groups (WGs)
different Special Interest Groups (SIGs), Working Groups (WGs)
and Committees of Kubernetes. The authoritative
source for SIG information is the [`sigs.yaml`](/sigs.yaml) file in the project root.
All updates must be done there.
@ -49,9 +49,9 @@ To (re)build documentation for all the SIGs in a go environment, run:
```bash
make generate
```
or to run this inside a docker container:
or to run this inside a container:
```bash
make generate-dockerized
make generate-containerized
```
To build docs for one SIG, run one of these commands:

View File

@ -32,7 +32,7 @@ fi
# Excluded check patterns are always skipped.
EXCLUDED_PATTERNS=(
"verify-all.sh" # this script calls the make rule and would cause a loop
"verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
"verify-*-containerized.sh" # Don't run any scripts that intended to be run containerized
)
EXCLUDED_CHECKS=$(ls ${EXCLUDED_PATTERNS[@]/#/${KUBE_ROOT}\/hack\/} 2>/dev/null || true)