Skip to content

Commit 39f4ca1

Browse files
authored
Auto generate chart readme file (#50)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 47f4250 commit 39f4ca1

File tree

5 files changed

+157
-98
lines changed

5 files changed

+157
-98
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Check out code into the Go module directory
2424
uses: actions/checkout@v1
2525

26-
- name: Run checks
26+
- name: Prepare Host
2727
run: |
2828
sudo apt-get -qq update || true
2929
sudo apt-get install -y bzr
@@ -35,6 +35,9 @@ jobs:
3535
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
3636
chmod +x ./kubectl
3737
sudo mv ./kubectl /usr/local/bin/kubectl
38+
39+
- name: Run checks
40+
run: |
3841
make ci
3942
4043
kubernetes:
@@ -43,7 +46,7 @@ jobs:
4346
needs: build
4447
strategy:
4548
matrix:
46-
k8s: [v1.11.10, v1.12.10, v1.13.12, v1.14.10, v1.15.7, v1.16.4, v1.17.2, v1.18.0]
49+
k8s: [v1.11.10, v1.12.10, v1.13.12, v1.14.10, v1.15.7, v1.16.4, v1.17.2, v1.18.2]
4750
steps:
4851

4952
- name: Check out code into the Go module directory
@@ -70,12 +73,6 @@ jobs:
7073
echo
7174
kubectl version
7275
echo
73-
echo "installing local-path provisioner ..."
74-
kubectl delete storageclass --all
75-
kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/v0.0.12/deploy/local-path-storage.yaml
76-
kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
77-
kubectl apply -f hack/kubernetes/storageclass/standard.yaml
78-
echo
7976
echo "create docker-registry secret"
8077
kubectl create secret docker-registry ${REGISTRY_SECRET} --namespace=kube-system --docker-server=https://index.docker.io/v1/ --docker-username=${USERNAME} --docker-password=${DOCKER_TOKEN}
8178

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,23 @@ gen-values-schema:
228228
@yq r api/crds/installer.stash.appscode.com_stashoperators.yaml spec.validation.openAPIV3Schema.properties.spec > /tmp/stash-values.openapiv3_schema.yaml
229229
@yq d /tmp/stash-values.openapiv3_schema.yaml description > charts/stash/values.openapiv3_schema.yaml
230230

231+
.PHONY: gen-chart-doc
232+
gen-chart-doc: gen-chart-doc-stash
233+
234+
gen-chart-doc-%:
235+
@echo "Generate $* chart docs"
236+
@docker run --rm \
237+
-u $$(id -u):$$(id -g) \
238+
-v /tmp:/.cache \
239+
-v $$(pwd):$(DOCKER_REPO_ROOT) \
240+
-w $(DOCKER_REPO_ROOT) \
241+
--env HTTP_PROXY=$(HTTP_PROXY) \
242+
--env HTTPS_PROXY=$(HTTPS_PROXY) \
243+
$(BUILD_IMAGE) \
244+
chart-doc-gen -d ./charts/$*/doc.yaml -v ./charts/$*/values.yaml > ./charts/$*/README.md
245+
231246
.PHONY: manifests
232-
manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema
247+
manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema gen-chart-doc
233248

234249
.PHONY: gen
235250
gen: clientset gen-crd-protos manifests openapi

0 commit comments

Comments
 (0)