File tree Expand file tree Collapse file tree 3 files changed +63
-1
lines changed Expand file tree Collapse file tree 3 files changed +63
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : check_helm
2
+ on :
3
+ pull_request :
4
+ branches :
5
+ - ' *'
6
+ push :
7
+ branches :
8
+ - ' *'
9
+
10
+ jobs :
11
+ test_helm :
12
+ name : Test Helm Chart
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+
19
+ - uses : medyagh/setup-minikube@master
20
+ with :
21
+ driver : docker
22
+ container-runtime : containerd
23
+ kubernetes-version : v1.31.0
24
+ cpus : max
25
+ memory : max
26
+
27
+ - name : Local Helm Test
28
+ run : |
29
+ set -xe
30
+ helm install -n test test-operator ./deploy/helm/clickhouse-operator/
31
+ sleep 10
32
+ workflow_count=$(kubectl get all --all-namespaces | grep -c "test-operator")
33
+ configmap_count=$(kubectl get cm --all-namespaces | grep -c "test-operator")
34
+ if [ "$workflow_count" -lt 4 ]; then
35
+ echo "Error: Workload count is less than 4. Current count: $workflow_count"
36
+ exit 1
37
+ fi
38
+
39
+ if [ "$configmap_count" -lt 9 ]; then
40
+ echo "Error: ConfigMap count is less than 9. Current count: $configmap_count"
41
+ exit 1
42
+ fi
Original file line number Diff line number Diff line change @@ -15,14 +15,34 @@ jobs:
15
15
uses : actions/checkout@v4
16
16
with :
17
17
fetch-depth : 0
18
+
18
19
- name : Install chart-releaser
19
20
run : |
20
21
wget https://github.com/helm/chart-releaser/releases/download/v1.4.1/chart-releaser_1.4.1_linux_amd64.tar.gz
21
22
tar -zxf chart-releaser_1.4.1_linux_amd64.tar.gz cr
22
23
sudo install cr /usr/local/bin/
23
24
rm -f cr chart-releaser_1.4.1_linux_amd64.tar.gz
25
+
24
26
- name : Package Chart
25
27
run : cr package deploy/helm/clickhouse-operator
28
+
29
+ - name : Get Release Assets
30
+ run : |
31
+ CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
32
+ ASSET_NAME=$(basename ${CHART_PATH})
33
+ ASSET_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
34
+ "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets" | \
35
+ jq -r ".[] | select(.name == \"$ASSET_NAME\") | .id")
36
+
37
+ echo "Asset ID is $ASSET_ID"
38
+ echo "::set-output name=asset_id::$ASSET_ID"
39
+
40
+ - name : Delete Existing Release Artifacts
41
+ if : steps.get_assets.outputs.asset_id != ''
42
+ run : |
43
+ curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
44
+ "https://api.github.com/repos/${{ github.repository
45
+
26
46
- name : Upload Release Artifacts
27
47
run : |
28
48
CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
Original file line number Diff line number Diff line change 47
47
with :
48
48
driver : docker
49
49
container-runtime : containerd
50
- kubernetes-version : v1.30 .0
50
+ kubernetes-version : v1.31 .0
51
51
cpus : max
52
52
memory : max
53
53
You can’t perform that action at this time.
0 commit comments