Skip to content

Commit f810bdf

Browse files
moved e2e and lint folders to respective charts to simplify ci conditions
1 parent b5f53ab commit f810bdf

File tree

41 files changed

+64
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+64
-27
lines changed

.github/workflows/run-lint.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: "Lint charts"
22

33
on:
44
push:
5-
paths-ignore:
6-
- 'packages/**'
7-
- 'index.yaml'
8-
- '**.md'
5+
paths:
6+
- Makefile
7+
- 'charts/*/lint/**'
8+
- '.github/workflows/run-lint.yaml'
99
branches:
1010
- master
1111
pull_request:
12-
paths-ignore:
13-
- 'packages/**'
14-
- 'index.yaml'
15-
- '**.md'
12+
paths:
13+
- Makefile
14+
- 'charts/*/lint/**'
15+
- '.github/workflows/run-lint.yaml'
1616
branches:
1717
- master
1818

.github/workflows/run-testing.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: "Test charts"
22

33
on:
44
push:
5-
paths-ignore:
6-
- 'charts/victoria-metrics-common/**'
7-
- 'charts/victoria-metrics-operator-crds/**'
8-
- '**.md'
5+
paths:
6+
- Makefile
7+
- 'charts/*/e2e/**'
8+
- '.github/workflows/run-testing.yaml'
99
branches:
1010
- master
1111
pull_request:
12-
paths-ignore:
13-
- 'charts/victoria-metrics-common/**'
14-
- 'charts/victoria-metrics-operator-crds/**'
15-
- '**.md'
12+
paths:
13+
- Makefile
14+
- 'charts/*/e2e/**'
15+
- '.github/workflows/run-testing.yaml'
1616
branches:
1717
- master
1818

@@ -37,6 +37,7 @@ jobs:
3737
id: changed-charts
3838
uses: tj-actions/changed-files@v46
3939
with:
40+
matrix: true
4041
files: |
4142
charts/**
4243
@@ -45,15 +46,15 @@ jobs:
4546
# this bash pipeline extracts unique chart names from the list
4647
- name: Build charts diff
4748
id: charts-diff
48-
run: jq |
49-
charts=$(echo "${{ steps.changed-charts.outputs.all_modified_files }}" | sed 's/ /\n/g' | awk -F/ '{print $2}' | sort | uniq | jq -ncR '[inputs]')
49+
run: |
50+
charts=$(echo '${{ steps.changed-charts.outputs.all_changed_files }}' | jq -c '. | map(. | split("/").[1] | select(. != null)) | unique');
5051
echo "charts=$charts" >> $GITHUB_OUTPUT
5152
5253
install-chart:
5354
name: Install chart
5455
runs-on: ubuntu-24.04
5556
needs: get-changed-charts
56-
if: ${{ needs.get-changed-charts.outputs.charts != '[""]' }}
57+
if: ${{ needs.get-changed-charts.outputs.charts != '[]' }}
5758
permissions:
5859
contents: read
5960
strategy:
@@ -104,11 +105,11 @@ jobs:
104105
if [ "${{ matrix.chart }}" != "victoria-metrics-k8s-stack" ] && [ "${{ matrix.chart }}" != "victoria-metrics-distributed" ]; then
105106
helm template charts/${{ matrix.chart }} \
106107
--namespace ${{ matrix.chart }}-testing \
107-
--values ./hack/helm/${{ matrix.chart }}/e2e/simple.yaml \
108+
--values charts/${{ matrix.chart }}/e2e/simple.yaml \
108109
--validate | kubectl apply -f - --dry-run=server
109110
fi
110111
ct install \
111112
--namespace ${{ matrix.chart }}-testing \
112113
--config .github/ci/ct.yaml \
113114
--charts "charts/${{ matrix.chart }}" \
114-
--helm-extra-set-args "--values ./hack/helm/${{ matrix.chart }}/e2e/simple.yaml" --skip-clean-up
115+
--helm-extra-set-args "--values charts/${{ matrix.chart }}/e2e/simple.yaml" --skip-clean-up

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ helm-repo-update:
6868

6969
# Run linter for helm chart
7070
lint: helm-repo-update
71-
$(foreach values,$(wildcard hack/helm/*/lint/*.yaml), \
72-
$(eval chart := $(word 3, $(subst /, ,$(values)))) \
71+
$(foreach values,$(wildcard charts/*/lint/*.yaml), \
72+
$(eval chart := $(word 2, $(subst /, ,$(values)))) \
7373
CMD="dep build charts/$(chart)" $(MAKE) $(HELM) || exit 1; \
7474
CMD="lint charts/$(chart) -f $(values)" $(MAKE) $(HELM) || exit 1; \
7575
)
7676

7777
update: helm-repo-update
78-
$(foreach values,$(wildcard hack/helm/*/lint/*.yaml), \
79-
$(eval chart := $(word 3, $(subst /, ,$(values)))) \
78+
$(foreach values,$(wildcard charts/*/lint/*.yaml), \
79+
$(eval chart := $(word 2, $(subst /, ,$(values)))) \
8080
CMD="dep update charts/$(chart)" $(MAKE) $(HELM) || exit 1; \
8181
)
8282

8383
# Run template for helm charts
8484
template: helm-repo-update
85-
$(foreach values,$(wildcard hack/helm/*/lint/*.yaml), \
86-
$(eval chart := $(word 3, $(subst /, ,$(values)))) \
85+
$(foreach values,$(wildcard charts/*/lint/*.yaml), \
86+
$(eval chart := $(word 2, $(subst /, ,$(values)))) \
8787
CMD="dep build charts/$(chart)" $(MAKE) $(HELM) || exit 1; \
8888
CMD="template charts/$(chart) -f $(values)" $(MAKE) $(HELM) || exit 1; \
8989
)

charts/victoria-logs-cluster/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-logs-single/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-agent/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
.vscode/
2424
*.md
2525
*.md.gotmpl
26+
e2e/
27+
lint/
28+
tests/

charts/victoria-metrics-alert/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
.vscode/
2424
*.md
2525
*.md.gotmpl
26+
e2e/
27+
lint/
28+
tests/

charts/victoria-metrics-anomaly/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-auth/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-cluster/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-distributed/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
.vscode/
2424
*.md
2525
*.md.gotmpl
26+
e2e/
27+
lint/
28+
tests/

charts/victoria-metrics-gateway/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-k8s-stack/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@
2626
img/
2727
*.md
2828
*.md.gotmpl
29+
e2e/
30+
lint/
31+
tests/

charts/victoria-metrics-operator/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

charts/victoria-metrics-single/.helmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
.vscode/
2323
*.md
2424
*.md.gotmpl
25+
e2e/
26+
lint/
27+
tests/

0 commit comments

Comments
 (0)