forked from woodpecker-ci/helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
42 lines (38 loc) · 1.5 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
variables:
- &helm_image alpine/helm:latest
when:
- event: tag
- event: push
branch: main
- event: pull_request
pipeline:
set-version:
image: *helm_image
commands:
# use tag name or 0.0.0 if not running on a tag
- export CHART_VERSION="${CI_COMMIT_TAG##v}"
- export CHART_VERSION=$${CHART_VERSION:=0.0.0}
- echo "Version $CHART_VERSION"
- sed -i "s/<version>/$CHART_VERSION/g" charts/agent/Chart.yaml
- sed -i "s/<version>/$CHART_VERSION/g" charts/server/Chart.yaml
- cat charts/agent/Chart.yaml
- cat charts/server/Chart.yaml
lint:
image: *helm_image
commands:
- helm lint --with-subcharts
release:
image: quay.io/helmpack/chart-releaser:v1.5.0
secrets:
- source: github_token
target: CR_TOKEN
commands:
- git config --global user.email "[email protected]"
- git config --global user.name "woodpecker-bot"
- mkdir -p .cr-index
- cr package .
- cr upload --owner woodpecker-ci --git-repo woodpecker-ci.github.io --release-name-template "helm-{{ .Name }}-{{ .Version }}"
- git clone https://github.com/woodpecker-ci/woodpecker-ci.github.io.git
- cd woodpecker-ci.github.io/ && cr index --owner woodpecker-ci --git-repo woodpecker-ci.github.io --pages-branch master --package-path ../.cr-release-packages --index-path ../.cr-index/index.yaml --charts-repo https://woodpecker-ci.org --push --release-name-template "helm-{{ .Name }}-{{ .Version }}"
when:
event: tag