forked from CameronJGrant/telegram-scam-baiter
Move helm packaging to script
This commit is contained in:
19
.drone.yml
19
.drone.yml
@@ -65,24 +65,7 @@ steps:
|
||||
commands:
|
||||
- apk add --no-cache bash coreutils git curl
|
||||
- helm plugin install https://github.com/chartmuseum/helm-push
|
||||
|
||||
# Compute semver (strip leading "v" if present)
|
||||
- |
|
||||
VERSION="${DRONE_TAG#v}"; echo "Using version: $VERSION"
|
||||
|
||||
# Package the chart with version/appVersion = git tag (sans 'v')
|
||||
- helm package "$CHART_DIR" \
|
||||
--version "${VERSION}" \
|
||||
--app-version "${VERSION}"
|
||||
|
||||
# Add the Gitea Helm repo with basic auth (stored in Helm config)
|
||||
- helm repo add "${DRONE_REPO_NAME}" "https://git.itzana.me/api/packages/${DRONE_REPO_OWNER}/helm" \
|
||||
--username "${GITEA_USERNAME}" \
|
||||
--password "${GITEA_TOKEN}"
|
||||
|
||||
# Push the packaged chart to Gitea (ChartMuseum API-compatible)
|
||||
- helm cm-push "telegram-scam-baiter-${VERSION}.tgz" "${DRONE_REPO_NAME}"
|
||||
|
||||
- hack/push-chart.sh
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
18
hack/push-chart.sh
Executable file
18
hack/push-chart.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Compute semver (strip leading "v" if present)
|
||||
VERSION="${DRONE_TAG#v}"
|
||||
echo "Using version: ${VERSION}"
|
||||
|
||||
# Package the chart with version/appVersion = git tag (sans 'v')
|
||||
helm package "${CHART_DIR}" \
|
||||
--version "${VERSION}" \
|
||||
--app-version "${VERSION}"
|
||||
|
||||
# Add the Gitea Helm repo with basic auth (stored in Helm config)
|
||||
helm repo add "${DRONE_REPO_NAME}" "https://git.itzana.me/api/packages/${DRONE_REPO_OWNER}/helm" \
|
||||
--username "${GITEA_USERNAME}" \
|
||||
--password "${GITEA_TOKEN}"
|
||||
|
||||
# Push the packaged chart to Gitea (ChartMuseum API-compatible)
|
||||
helm cm-push "telegram-scam-baiter-${VERSION}.tgz" "${DRONE_REPO_NAME}"
|
||||
Reference in New Issue
Block a user