Skip to content

Commit 357d6b8

Browse files
committed
feat(ci): move to woodpecker for ci
1 parent d4c5226 commit 357d6b8

File tree

7 files changed

+112
-136
lines changed

7 files changed

+112
-136
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/on-push-lint-charts.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/workflows/on-push-master-publish-chart.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.woodpecker/chart-testing.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
when:
2+
- event: [push, pull_request, manual]
3+
path:
4+
include:
5+
- 'charts/**'
6+
- '.woodpecker/**'
7+
- '.ci/**'
8+
9+
matrix:
10+
KUBE_VERSION:
11+
- "1.32.8"
12+
- "1.33.4"
13+
- "1.34.0"
14+
15+
steps:
16+
- name: chart-lint
17+
image: quay.io/helmpack/chart-testing:v3.11.0
18+
commands:
19+
- git fetch origin master
20+
- ct lint --config .ci/ct-config.yaml
21+
22+
- name: check-changed
23+
image: quay.io/helmpack/chart-testing:v3.11.0
24+
commands:
25+
- git fetch origin master
26+
- |
27+
changed=$(ct list-changed --config .ci/ct-config.yaml)
28+
if [ -n "$changed" ]; then
29+
echo "Charts changed: $changed"
30+
echo "CHARTS_CHANGED=true" >> /tmp/env
31+
else
32+
echo "No charts changed"
33+
echo "CHARTS_CHANGED=false" >> /tmp/env
34+
fi

.woodpecker/lint-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
when:
2+
- event: [push, pull_request, manual]
3+
path:
4+
include:
5+
- 'charts/**'
6+
- '.woodpecker/**'
7+
- '.ci/**'
8+
9+
variables:
10+
- &kube_score_version "1.17.0"
11+
- &helm_version "v3.19.0"
12+
13+
steps:
14+
- name: kube-score
15+
image: alpine:3.20
16+
commands:
17+
- apk add --no-cache bash wget curl
18+
- curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash
19+
- wget https://github.com/zegl/kube-score/releases/download/v${KUBE_SCORE_VERSION}/kube-score_${KUBE_SCORE_VERSION}_linux_amd64 -O /usr/local/bin/kube-score
20+
- chmod 755 /usr/local/bin/kube-score
21+
- .ci/scripts/kube-score.sh
22+
environment:
23+
KUBE_SCORE: /usr/local/bin/kube-score
24+
KUBE_SCORE_VERSION: *kube_score_version
25+
HELM_VERSION: *helm_version

.woodpecker/publish-chart.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
when:
2+
- event: push
3+
branch: [master, main]
4+
path:
5+
include:
6+
- 'charts/**'
7+
- '.woodpecker/**'
8+
- event: manual
9+
branch: [master, main]
10+
11+
steps:
12+
- name: package-charts
13+
image: quay.io/helmpack/chart-testing:v3.11.0
14+
commands:
15+
- mkdir -p .cr-release-packages
16+
- |
17+
for chart in charts/*/; do
18+
if [ -f "$chart/Chart.yaml" ]; then
19+
helm package "$chart" -d .cr-release-packages
20+
fi
21+
done
22+
23+
- name: publish-charts
24+
image: quay.io/helmpack/chart-testing:v3.11.0
25+
environment:
26+
GITEA_USERNAME:
27+
from_secret: gitea_username
28+
GITEA_TOKEN:
29+
from_secret: gitea_token
30+
commands:
31+
- |
32+
for pkg in .cr-release-packages/*.tgz; do
33+
if [ -f "$pkg" ]; then
34+
echo "Publishing $pkg to Gitea..."
35+
curl -s -f \
36+
-u "${GITEA_USERNAME}:${GITEA_TOKEN}" \
37+
--upload-file "$pkg" \
38+
"${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/helm/api/charts"
39+
fi
40+
done

.woodpecker/unittest.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
when:
2+
- event: [push, pull_request, manual]
3+
path:
4+
include:
5+
- 'charts/**'
6+
- '.woodpecker/**'
7+
- '.ci/**'
8+
9+
steps:
10+
- name: helm-unittest
11+
image: helmunittest/helm-unittest:3.16.4-0.6.3
12+
commands:
13+
- helm unittest charts/*

0 commit comments

Comments
 (0)