Skip to content

Commit

Permalink
Auto generate chart readme file (#50)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored May 2, 2020
1 parent 47f4250 commit 39f4ca1
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 98 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Run checks
- name: Prepare Host
run: |
sudo apt-get -qq update || true
sudo apt-get install -y bzr
Expand All @@ -35,6 +35,9 @@ jobs:
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Run checks
run: |
make ci
kubernetes:
Expand All @@ -43,7 +46,7 @@ jobs:
needs: build
strategy:
matrix:
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]
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]
steps:

- name: Check out code into the Go module directory
Expand All @@ -70,12 +73,6 @@ jobs:
echo
kubectl version
echo
echo "installing local-path provisioner ..."
kubectl delete storageclass --all
kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/v0.0.12/deploy/local-path-storage.yaml
kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
kubectl apply -f hack/kubernetes/storageclass/standard.yaml
echo
echo "create docker-registry secret"
kubectl create secret docker-registry ${REGISTRY_SECRET} --namespace=kube-system --docker-server=https://index.docker.io/v1/ --docker-username=${USERNAME} --docker-password=${DOCKER_TOKEN}
Expand Down
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,23 @@ gen-values-schema:
@yq r api/crds/installer.stash.appscode.com_stashoperators.yaml spec.validation.openAPIV3Schema.properties.spec > /tmp/stash-values.openapiv3_schema.yaml
@yq d /tmp/stash-values.openapiv3_schema.yaml description > charts/stash/values.openapiv3_schema.yaml

.PHONY: gen-chart-doc
gen-chart-doc: gen-chart-doc-stash

gen-chart-doc-%:
@echo "Generate $* chart docs"
@docker run --rm \
-u $$(id -u):$$(id -g) \
-v /tmp:/.cache \
-v $$(pwd):$(DOCKER_REPO_ROOT) \
-w $(DOCKER_REPO_ROOT) \
--env HTTP_PROXY=$(HTTP_PROXY) \
--env HTTPS_PROXY=$(HTTPS_PROXY) \
$(BUILD_IMAGE) \
chart-doc-gen -d ./charts/$*/doc.yaml -v ./charts/$*/values.yaml > ./charts/$*/README.md

.PHONY: manifests
manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema
manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema gen-chart-doc

.PHONY: gen
gen: clientset gen-crd-protos manifests openapi
Expand Down
Loading

0 comments on commit 39f4ca1

Please sign in to comment.