mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-01 14:21:07 +00:00
0009c19f1c
closes #261
41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
clone:
|
|
git:
|
|
image: plugins/git:next
|
|
|
|
pipeline:
|
|
set-version:
|
|
image: alpine/helm:3.5.3
|
|
commands:
|
|
# use tag name or 0.0.0 if not running on a tag
|
|
- export CHART_VERSION="${DRONE_TAG##v}"
|
|
- export CHART_VERSION=$${CHART_VERSION:=0.0.0}
|
|
- echo "Version $CHART_VERSION"
|
|
- sed -i "s/<version>/$CHART_VERSION/g" charts/woodpecker-agent/Chart.yaml
|
|
- sed -i "s/<version>/$CHART_VERSION/g" charts/woodpecker-server/Chart.yaml
|
|
- cat charts/woodpecker-agent/Chart.yaml
|
|
- cat charts/woodpecker-server/Chart.yaml
|
|
when:
|
|
path: "charts/**"
|
|
|
|
lint:
|
|
image: alpine/helm:3.5.3
|
|
commands:
|
|
- helm lint charts/woodpecker-agent/
|
|
- helm lint charts/woodpecker-server/
|
|
when:
|
|
path: "charts/**"
|
|
|
|
release:
|
|
image: quay.io/helmpack/chart-releaser:v1.2.1
|
|
secrets:
|
|
- source: github_token
|
|
target: CR_TOKEN
|
|
commands:
|
|
- mkdir -p .cr-index
|
|
- cr package charts/woodpecker-server
|
|
- cr package charts/woodpecker-agent
|
|
- cr upload --owner woodpecker-ci --git-repo woodpecker-ci.github.io --release-name-template "helm-{{ .Name }}-{{ .Version }}"
|
|
- cr index --owner woodpecker-ci --git-repo woodpecker-ci.github.io --pages-branch main --charts-repo https://woodpecker-ci.github.io --push --release-name-template "helm-{{ .Name }}-{{ .Version }}"
|
|
when:
|
|
event: tag
|
|
path: "charts/**"
|