Skip to content

Commit

Permalink
ci: fix linting for vlogs-single
Browse files Browse the repository at this point in the history
Lint task was failing in case deps where not built manually before running.
Added repos configuration and task to run `dep build` for this chart before running lint and template.
  • Loading branch information
zekker6 committed Jul 12, 2023
1 parent 1b20843 commit 1d7e646
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/ci/helm-repos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: ""
generated: "0001-01-01T00:00:00Z"
repositories:
- caFile: ""
certFile: ""
insecure_skip_tls_verify: false
keyFile: ""
name: fluent
pass_credentials_all: false
password: ""
url: https://fluent.github.io/helm-charts
username: ""
- caFile: ""
certFile: ""
insecure_skip_tls_verify: false
keyFile: ""
name: victoria-metrics
pass_credentials_all: false
password: ""
url: https://victoriametrics.github.io/helm-charts
username: ""
- caFile: ""
certFile: ""
insecure_skip_tls_verify: false
keyFile: ""
name: prometheus
pass_credentials_all: false
password: ""
url: https://prometheus-community.github.io/helm-charts
username: ""
- caFile: ""
certFile: ""
insecure_skip_tls_verify: false
keyFile: ""
name: grafana
pass_credentials_all: false
password: ""
url: https://grafana.github.io/helm-charts
username: ""
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ helm-docker:
docker run --rm --name helm-exec \
--user $(shell id -u):$(shell id -g) \
--mount type=bind,src="$(shell pwd)",dst=/helm-charts \
--mount type=bind,src="$(shell pwd)/.github/ci/helm-repos.yaml",dst=/helm-charts/.helm/config/repositories.yaml \
-w /helm-charts \
-e HELM_CACHE_HOME=/helm-charts/.helm/cache \
-e HELM_CONFIG_HOME=/helm-charts/.helm/config \
Expand All @@ -25,6 +26,7 @@ ct-docker:
docker run --rm --name helm-exec \
--user $(shell id -u):$(shell id -g) \
--mount type=bind,src="$(shell pwd)",dst=/helm-charts \
--mount type=bind,src="$(shell pwd)/.github/ci/helm-repos.yaml",dst=/helm-charts/.helm/config/repositories.yaml \
-w /helm-charts \
-e HELM_CACHE_HOME=/helm-charts/.helm/cache \
-e HELM_CONFIG_HOME=/helm-charts/.helm/config \
Expand All @@ -46,6 +48,7 @@ lint:
CMD="lint charts/victoria-metrics-gateway -f hack/vmgateway-cluster-ratelimiting-minimum.yaml" $(MAKE) $(HELM)
CMD="lint charts/victoria-metrics-auth -f hack/vmauth-lint-hack.yaml" $(MAKE) $(HELM)
CMD="lint charts/victoria-metrics-anomaly -f hack/vmanomaly-lint-hack.yaml" $(MAKE) $(HELM)
CMD="dependency build charts/victoria-logs-single" $(MAKE) $(HELM)
CMD="lint charts/victoria-logs-single -f hack/vlsingle-lint-hack.yaml" $(MAKE) $(HELM)

# Run template for helm charts
Expand All @@ -57,6 +60,7 @@ template:
CMD="template charts/victoria-metrics-gateway -f hack/vmgateway-cluster-ratelimiting-minimum.yaml" $(MAKE) $(HELM)
CMD="template charts/victoria-metrics-auth -f hack/vmauth-lint-hack.yaml" $(MAKE) $(HELM)
CMD="template charts/victoria-metrics-anomaly -f hack/vmanomaly-lint-hack.yaml" $(MAKE) $(HELM)
CMD="dependency build charts/victoria-logs-single" $(MAKE) $(HELM)
CMD="template charts/victoria-logs-single -f hack/vlsingle-lint-hack.yaml" $(MAKE) $(HELM)

lint-ct:
Expand Down

0 comments on commit 1d7e646

Please sign in to comment.