Fix containerized generation
This commit is contained in:
parent
44086e96ed
commit
c7da084db7
16
Makefile
16
Makefile
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue