mirror of
https://github.com/submariner-io/submariner-charts.git
synced 2026-09-22 21:20:35 +00:00
Extract helm-docs generation/testing to Makefile
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
This commit is contained in:
committed by
Daniel Farrell
parent
4b48a3d30c
commit
2f9156cf34
@@ -65,20 +65,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Run helm-docs and verify docs are up-to-date
|
- name: Run helm-docs and verify docs are up-to-date
|
||||||
run: |
|
run: make helm-docs
|
||||||
HELM_DOCS_VERSION="0.15.0"
|
|
||||||
# Avoid polluting repo with helm-docs' README/LICENSE or other files in the release archive
|
|
||||||
cd /tmp
|
|
||||||
curl -sL "https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz" | tar zx
|
|
||||||
cd -
|
|
||||||
/tmp/helm-docs
|
|
||||||
if [[ ! -z "$(git status --porcelain)" ]]; then
|
|
||||||
echo "Helm docs not up-to-date:"
|
|
||||||
git status --porcelain
|
|
||||||
git diff
|
|
||||||
echo "Run helm-docs, as the CI does above, and commit the updated docs."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
markdown-link-check:
|
markdown-link-check:
|
||||||
name: Markdown Links (modified files)
|
name: Markdown Links (modified files)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export DEPLOY_ARGS
|
|||||||
GH_URL=https://submariner-io.github.io/submariner-charts/charts
|
GH_URL=https://submariner-io.github.io/submariner-charts/charts
|
||||||
CHARTS_DIR=charts
|
CHARTS_DIR=charts
|
||||||
CHARTS_VERSION=0.7.0
|
CHARTS_VERSION=0.7.0
|
||||||
|
HELM_DOCS_VERSION=0.15.0
|
||||||
REPO_URL=$(shell git config remote.origin.url)
|
REPO_URL=$(shell git config remote.origin.url)
|
||||||
|
|
||||||
# Process extra flags from the `using=a,b,c` optional flag
|
# Process extra flags from the `using=a,b,c` optional flag
|
||||||
@@ -42,6 +43,20 @@ e2e: E2E_ARGS=cluster1 cluster2
|
|||||||
helm dep update $(subst -$(CHARTS_VERSION),,$(basename $(@F)))
|
helm dep update $(subst -$(CHARTS_VERSION),,$(basename $(@F)))
|
||||||
helm package --version $(CHARTS_VERSION) $(subst -$(CHARTS_VERSION),,$(basename $(@F)))
|
helm package --version $(CHARTS_VERSION) $(subst -$(CHARTS_VERSION),,$(basename $(@F)))
|
||||||
|
|
||||||
|
helm-docs:
|
||||||
|
# Avoid polluting repo with helm-docs' README/LICENSE or other files in the release archive
|
||||||
|
cd /tmp && \
|
||||||
|
curl -sL https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/helm-docs_$(HELM_DOCS_VERSION)_Linux_x86_64.tar.gz | tar zx && \
|
||||||
|
cd -
|
||||||
|
/tmp/helm-docs
|
||||||
|
if [ ! -z $(git status --porcelain) ]; then \
|
||||||
|
echo "Helm docs not up-to-date:"; \
|
||||||
|
git status --porcelain; \
|
||||||
|
git diff; \
|
||||||
|
echo "Run make helm-docs locally to generate updated docs, commit the updates."; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
release: submariner-k8s-broker-$(CHARTS_VERSION).tgz submariner-operator-$(CHARTS_VERSION).tgz
|
release: submariner-k8s-broker-$(CHARTS_VERSION).tgz submariner-operator-$(CHARTS_VERSION).tgz
|
||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
mv *.tgz $(CHARTS_DIR)
|
mv *.tgz $(CHARTS_DIR)
|
||||||
@@ -51,7 +66,7 @@ release: submariner-k8s-broker-$(CHARTS_VERSION).tgz submariner-operator-$(CHART
|
|||||||
helm repo index $(CHARTS_DIR) --url $(GH_URL); \
|
helm repo index $(CHARTS_DIR) --url $(GH_URL); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release helm-docs
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user