From 1d7e6467f5000ccf0d2214b2e264772c369cc959 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Wed, 12 Jul 2023 18:39:24 +0400 Subject: [PATCH] ci: fix linting for vlogs-single 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. --- .github/ci/helm-repos.yaml | 39 ++++++++++++++++++++++++++++++++++++++ Makefile | 4 ++++ 2 files changed, 43 insertions(+) create mode 100644 .github/ci/helm-repos.yaml diff --git a/.github/ci/helm-repos.yaml b/.github/ci/helm-repos.yaml new file mode 100644 index 000000000..739d31cfb --- /dev/null +++ b/.github/ci/helm-repos.yaml @@ -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: "" diff --git a/Makefile b/Makefile index c506362a8..7b0619a5e 100644 --- a/Makefile +++ b/Makefile @@ -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 \ @@ -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 \ @@ -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 @@ -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: