softplayer-helm-lib/.woodpecker/helm.yaml

59 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2024-05-05 16:51:37 +00:00
---
when:
event:
- push
.chart-testing-image: &chart-testing-image
image: quay.io/helmpack/chart-testing:v3.10.1
clone:
git:
image: woodpeckerci/plugin-git
settings:
partial: false
steps:
changed:
<<: *chart-testing-image
name: Check changed charts
commands:
- git fetch origin
- ct lint --target-branch main --print-config --debug
- ct list-changed --target-branch main > .changed
lint:
<<: *chart-testing-image
name: Lint charts
commands:
- git fetch origin
- |
if [ -s .changed ]; then
ct lint --target-branch main --validate-maintainers=false
fi
release:
<<: *chart-testing-image
name: Release charts
when:
- branch: main
secrets:
2024-07-23 19:22:39 +00:00
- registry_password
2024-05-05 16:51:37 +00:00
environment:
- DISABLE_FORCE_OVERWRITE='true'
- ALLOW_OVERWRITE='false'
2024-09-04 18:41:52 +00:00
- REGISTRY_URL=zot.badhouseplants.net
2024-07-23 19:20:23 +00:00
- REGISTRY_USERNAME=woody
2024-05-05 16:51:37 +00:00
commands:
- |
2024-07-23 19:20:23 +00:00
helm registry login $REGISTRY_URL \
--username $REGISTRY_USERNAME \
--password $REGISTRY_PASSWORD
2024-05-05 16:51:37 +00:00
- |
for chart in $(find charts -maxdepth 1 -mindepth 1 -type d); do
helm package $chart -d chart-packages;
done
- |
for chart in $(find chart-packages -maxdepth 1 -mindepth 1 -type f); do
2024-07-23 19:20:23 +00:00
helm push $chart oci://$REGISTRY_URL/softplayer/helm
2024-05-05 16:51:37 +00:00
done