2022-10-10 10:49:30 +00:00
|
|
|
variables:
|
|
|
|
- &when_path
|
|
|
|
- "charts/**"
|
|
|
|
- ".woodpecker/helm.yml"
|
|
|
|
|
2021-09-24 12:04:54 +00:00
|
|
|
pipeline:
|
|
|
|
set-version:
|
|
|
|
image: alpine/helm:3.5.3
|
|
|
|
commands:
|
|
|
|
# use tag name or 0.0.0 if not running on a tag
|
2021-11-25 19:43:31 +00:00
|
|
|
- export CHART_VERSION="${CI_COMMIT_TAG##v}"
|
2021-09-24 12:04:54 +00:00
|
|
|
- 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
|
2022-10-14 11:38:03 +00:00
|
|
|
when:
|
|
|
|
path: *when_path
|
2021-09-24 12:04:54 +00:00
|
|
|
|
|
|
|
lint:
|
|
|
|
image: alpine/helm:3.5.3
|
|
|
|
commands:
|
|
|
|
- helm lint charts/woodpecker-agent/
|
|
|
|
- helm lint charts/woodpecker-server/
|
2022-10-14 11:38:03 +00:00
|
|
|
when:
|
|
|
|
path: *when_path
|
2021-09-24 12:04:54 +00:00
|
|
|
|
|
|
|
release:
|
2022-04-14 06:58:28 +00:00
|
|
|
image: quay.io/helmpack/chart-releaser:v1.4.0
|
2021-09-24 12:04:54 +00:00
|
|
|
secrets:
|
|
|
|
- source: github_token
|
|
|
|
target: CR_TOKEN
|
|
|
|
commands:
|
2022-01-24 10:41:39 +00:00
|
|
|
- git config --global user.email "woodpecker-bot@obermui.de"
|
|
|
|
- git config --global user.name "woodpecker-bot"
|
2021-09-24 12:04:54 +00:00
|
|
|
- mkdir -p .cr-index
|
|
|
|
- cr package charts/woodpecker-server
|
|
|
|
- cr package charts/woodpecker-agent
|
2022-04-14 06:58:28 +00:00
|
|
|
- cr upload --owner woodpecker-ci --git-repo woodpecker-ci.github.io --release-name-template "helm-{{ .Name }}-{{ .Version }}"
|
2022-01-24 10:41:39 +00:00
|
|
|
- git clone https://github.com/woodpecker-ci/woodpecker-ci.github.io.git
|
2022-04-14 06:58:28 +00:00
|
|
|
- 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 }}"
|
2021-09-24 12:04:54 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
2022-10-14 11:38:03 +00:00
|
|
|
path: *when_path
|