Skip to content

Commit 5d551ce

Browse files
ci: Add CI support for Helm v4 (#2215)
* ci: Add CI support for Helm v4 * Address review: keeping old Helm v3 versions Signed-off-by: vanshiz <vanshikabhargava29@gmail.com> * Refactor CI workflows --------- Signed-off-by: vanshiz <vanshikabhargava29@gmail.com> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
1 parent aa17424 commit 5d551ce

7 files changed

Lines changed: 168 additions & 11 deletions

File tree

.github/workflows/collector-test.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
collector-test:
14+
collector-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.9.4"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,6 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
30+
helm-version: ${{ matrix.helm-version }}
2531

2632
- name: Run chart-testing (install)
2733
run: ct install --charts charts/opentelemetry-collector
@@ -31,3 +37,17 @@ jobs:
3137
kubectl apply -f ./charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered
3238
kubectl rollout status daemonset example-opentelemetry-collector-agent --timeout=30s
3339
kubectl rollout status deployment example-opentelemetry-collector --timeout=30s
40+
41+
collector-test:
42+
if: always()
43+
runs-on: ubuntu-latest
44+
needs: [collector-test-matrix]
45+
steps:
46+
- name: Check matrix result
47+
run: |
48+
if [[ "${{ needs.collector-test-matrix.result }}" == "success" ]]; then
49+
echo "All matrix jobs passed!"
50+
else
51+
echo "One or more matrix jobs failed."
52+
exit 1
53+
fi

.github/workflows/demo-test.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
demo-test:
14+
demo-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.14.4"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,7 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
25-
helm-version: "v3.14.4"
30+
helm-version: ${{ matrix.helm-version }}
2631

2732
- name: Run chart-testing (install)
2833
run: "ct install --charts charts/opentelemetry-demo
@@ -31,3 +36,17 @@ jobs:
3136
--chart-repos grafana=https://grafana-community.github.io/helm-charts
3237
--chart-repos jaeger=https://jaegertracing.github.io/helm-charts
3338
--chart-repos opensearch=https://opensearch-project.github.io/helm-charts"
39+
40+
demo-test:
41+
if: always()
42+
runs-on: ubuntu-latest
43+
needs: [demo-test-matrix]
44+
steps:
45+
- name: Check matrix result
46+
run: |
47+
if [[ "${{ needs.demo-test-matrix.result }}" == "success" ]]; then
48+
echo "All matrix jobs passed!"
49+
else
50+
echo "One or more matrix jobs failed."
51+
exit 1
52+
fi

.github/workflows/ebpf-test.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
ebpf-test:
14+
ebpf-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.9.4"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,6 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
30+
helm-version: ${{ matrix.helm-version }}
2531

2632
- name: Run chart-testing (install)
2733
run: ct install --charts charts/opentelemetry-ebpf
@@ -38,3 +44,17 @@ jobs:
3844
kubectl rollout status deployment example-opentelemetry-ebpf-cloud-collector --timeout=30s
3945
kubectl rollout status deployment example-opentelemetry-ebpf-k8s-collector --timeout=30s
4046
kubectl rollout status deployment example-opentelemetry-ebpf-reducer --timeout=30s
47+
48+
ebpf-test:
49+
if: always()
50+
runs-on: ubuntu-latest
51+
needs: [ebpf-test-matrix]
52+
steps:
53+
- name: Check matrix result
54+
run: |
55+
if [[ "${{ needs.ebpf-test-matrix.result }}" == "success" ]]; then
56+
echo "All matrix jobs passed!"
57+
else
58+
echo "One or more matrix jobs failed."
59+
exit 1
60+
fi

.github/workflows/kube-stack-test.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
opentelemetry-kube-stack-test:
14+
kube-stack-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.11.3"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,7 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
25-
helm-version: "v3.11.3"
30+
helm-version: ${{ matrix.helm-version }}
2631

2732
# We'll need this eventually, but for now leave it commented.
2833
- name: Install cert-manager
@@ -35,3 +40,17 @@ jobs:
3540
run: |
3641
helm dep build charts/opentelemetry-kube-stack
3742
helm install opentelemetry-kube-stack charts/opentelemetry-kube-stack
43+
44+
opentelemetry-kube-stack-test:
45+
if: always()
46+
runs-on: ubuntu-latest
47+
needs: [kube-stack-test-matrix]
48+
steps:
49+
- name: Check matrix result
50+
run: |
51+
if [[ "${{ needs.kube-stack-test-matrix.result }}" == "success" ]]; then
52+
echo "All matrix jobs passed!"
53+
else
54+
echo "One or more matrix jobs failed."
55+
exit 1
56+
fi

.github/workflows/lint.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
lint-test:
12+
lint-test-matrix:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
helm-version:
17+
- "v3.14.4"
18+
- "v4.0.3"
1419
steps:
1520
- name: Checkout
1621
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -20,7 +25,7 @@ jobs:
2025
uses: ./.github/actions/setup
2126
with:
2227
create-kind-cluster: "false"
23-
helm-version: "v3.14.4"
28+
helm-version: ${{ matrix.helm-version }}
2429

2530
- name: Run chart-testing (lint)
2631
run: "ct lint --target-branch main
@@ -32,3 +37,17 @@ jobs:
3237

3338
- name: Run make check-examples
3439
run: make check-examples
40+
41+
lint-test:
42+
if: always()
43+
runs-on: ubuntu-latest
44+
needs: [lint-test-matrix]
45+
steps:
46+
- name: Check matrix result
47+
run: |
48+
if [[ "${{ needs.lint-test-matrix.result }}" == "success" ]]; then
49+
echo "All matrix jobs passed!"
50+
else
51+
echo "One or more matrix jobs failed."
52+
exit 1
53+
fi

.github/workflows/operator-test.yaml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
operator-test:
14+
operator-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.9.4"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,6 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
30+
helm-version: ${{ matrix.helm-version }}
2531

2632
- name: Check CRDs
2733
run: make check-operator-crds
@@ -77,8 +83,27 @@ jobs:
7783
mkdir -p ./.testresults/e2e
7884
chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps" --exclude-test-regex "chainsaw/smoke-pod-dns-config" --exclude-test-regex "chainsaw/operator-metrics"
7985
80-
operator-test-no-certmanager:
86+
operator-test:
87+
if: always()
88+
runs-on: ubuntu-latest
89+
needs: [operator-test-matrix]
90+
steps:
91+
- name: Check matrix result
92+
run: |
93+
if [[ "${{ needs.operator-test-matrix.result }}" == "success" ]]; then
94+
echo "All matrix jobs passed!"
95+
else
96+
echo "One or more matrix jobs failed."
97+
exit 1
98+
fi
99+
100+
operator-test-no-certmanager-matrix:
81101
runs-on: ubuntu-latest
102+
strategy:
103+
matrix:
104+
helm-version:
105+
- "v3.9.4"
106+
- "v4.0.3"
82107
steps:
83108
- name: Checkout
84109
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -88,6 +113,7 @@ jobs:
88113
uses: ./.github/actions/setup
89114
with:
90115
create-kind-cluster: "true"
116+
helm-version: ${{ matrix.helm-version }}
91117

92118
- name: Check CRDs
93119
run: make check-operator-crds
@@ -137,3 +163,17 @@ jobs:
137163
run: |
138164
mkdir -p ./.testresults/e2e
139165
chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps" --exclude-test-regex "chainsaw/smoke-pod-dns-config" --exclude-test-regex "chainsaw/operator-metrics"
166+
167+
operator-test-no-certmanager:
168+
if: always()
169+
runs-on: ubuntu-latest
170+
needs: [operator-test-no-certmanager-matrix]
171+
steps:
172+
- name: Check matrix result
173+
run: |
174+
if [[ "${{ needs.operator-test-no-certmanager-matrix.result }}" == "success" ]]; then
175+
echo "All matrix jobs passed!"
176+
else
177+
echo "One or more matrix jobs failed."
178+
exit 1
179+
fi

.github/workflows/ta-test.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
ta-test:
14+
ta-test-matrix:
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
helm-version:
19+
- "v3.9.4"
20+
- "v4.0.3"
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -22,6 +27,7 @@ jobs:
2227
uses: ./.github/actions/setup
2328
with:
2429
create-kind-cluster: "true"
30+
helm-version: ${{ matrix.helm-version }}
2531

2632
- name: Run chart-testing (install)
2733
run: ct install --charts charts/opentelemetry-target-allocator
@@ -30,3 +36,17 @@ jobs:
3036
run: |
3137
kubectl apply -f ./charts/opentelemetry-target-allocator/examples/consistent-hashing/rendered
3238
kubectl rollout status deployment example-opentelemetry-target-allocator-ta --timeout=30s
39+
40+
ta-test:
41+
if: always()
42+
runs-on: ubuntu-latest
43+
needs: [ta-test-matrix]
44+
steps:
45+
- name: Check matrix result
46+
run: |
47+
if [[ "${{ needs.ta-test-matrix.result }}" == "success" ]]; then
48+
echo "All matrix jobs passed!"
49+
else
50+
echo "One or more matrix jobs failed."
51+
exit 1
52+
fi

0 commit comments

Comments
 (0)