Skip to content

Commit 312faa0

Browse files
Eneman DonatienDonatien26
authored andcommitted
[BUG] 🐛 fix invalid ci for chart
1 parent 83190a4 commit 312faa0

File tree

4 files changed

+57
-29
lines changed

4 files changed

+57
-29
lines changed

.github/ci/ct.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
chart-dirs:
2+
- deploy/charts
3+
helm-extra-args: "--timeout=5m"
4+
check-version-increment: false
5+
target-branch: main

.github/workflows/ci-chart.yaml

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,81 @@ name: Helm CI
33
on:
44
push:
55
branches:
6-
- "**"
7-
paths-ignore:
8-
- 'docs/**'
9-
tags:
10-
- "*"
6+
- main
7+
- release-*
8+
paths:
9+
- "deploy/charts/**"
1110
pull_request:
12-
paths-ignore:
13-
- 'docs/**'
11+
paths:
12+
- "deploy/charts/**"
1413

1514
jobs:
16-
17-
helm-lint:
15+
helm-lint-test:
1816
runs-on: ubuntu-latest
1917
steps:
2018
- name: Checkout
21-
uses: actions/checkout@v4
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
2222

23-
- name: Install Helm on Runner
23+
- name: Set up Helm
2424
uses: azure/[email protected]
25+
with:
26+
version: v3.17.0
2527

26-
- name: Lint Chart
27-
run: helm lint .
28-
29-
helm-unitest:
30-
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v4
28+
- uses: actions/[email protected]
29+
with:
30+
python-version: "3.x"
31+
check-latest: true
3332

34-
- name: Install Helm on Runner
35-
uses: azure/[email protected].0
33+
- name: Set up chart-testing
34+
uses: helm/[email protected].0
3635

37-
- name: Lint Chart
38-
run: echo "TODO"
36+
- name: Run chart-testing (list-changed)
37+
id: list-changed
38+
run: |
39+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
40+
if [[ -n "$changed" ]]; then
41+
echo "changed=true" >> "$GITHUB_OUTPUT"
42+
fi
43+
44+
- name: Run chart-testing (lint)
45+
if: steps.list-changed.outputs.changed == 'true'
46+
run: ct lint --config=.github/ci/ct.yaml --target-branch ${{ github.event.repository.default_branch }}
47+
48+
- name: Create kind cluster
49+
if: steps.list-changed.outputs.changed == 'true'
50+
uses: helm/[email protected]
51+
52+
- name: Run chart-testing (install)
53+
if: steps.list-changed.outputs.changed == 'true'
54+
run: ct install --config=.github/ci/ct.yaml --target-branch ${{ github.event.repository.default_branch }}
3955

4056
release_helm:
4157
runs-on: ubuntu-latest
58+
if: |
59+
github.ref == 'refs/heads/main' ||
60+
startsWith(github.ref, 'refs/heads/release-')
4261
steps:
4362
- name: Checkout
4463
uses: actions/checkout@v4
45-
46-
- name: Install Helm on Runner
47-
uses: azure/[email protected]
64+
with:
65+
fetch-depth: 0
4866

4967
- name: Configure Git
5068
run: |
5169
git config user.name "$GITHUB_ACTOR"
5270
git config user.email "[email protected]"
5371
72+
- name: Install Helm on Runner
73+
uses: azure/[email protected]
74+
75+
5476
- name: Run chart-releaser
5577
uses: helm/[email protected]
5678
with:
5779
charts_dir: deploy/charts
5880
skip_existing: true
5981
env:
60-
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
82+
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
83+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

deploy/charts/s3-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.6.0
16+
version: 0.7.0
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: "1.0.0"
21+
appVersion: "v0.12.0"

deploy/charts/s3-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ s3:
4545
# allowedNamespaces: ""
4646
# Should the operator try to delete the resource from the S3 backend upon CR deletion ?
4747
deletion:
48-
bucket: false
48+
bucket: true
4949
path: false
5050
policy: false
5151
s3user: false

0 commit comments

Comments
 (0)