Merge branch 'master' of gitea.dhswt.de:dhswt/build-scripts

This commit is contained in:
David Hiendl 2022-12-06 16:06:09 +01:00
commit 9f151bb1cf
2 changed files with 11 additions and 1 deletions

View File

@ -40,6 +40,7 @@
MERGE_REGISTRY_JSON: "true"
DEBUG_STEP: "false"
PUSH_TAGS: "true"
DOCKER_BUILDKIT: 1
commands:
- &ContainerImageDockerCommands |

View File

@ -22,6 +22,7 @@
CHART_PATH: "./chart"
TAG_CHART_VERSION_ENABLE: "false"
TAG_COMMIT_ENABLE: "true"
TAG_COMMIT_BASE_VERSION: "0.0.0"
TAG_COMMIT_PREFIX: "commit-"
@ -61,7 +62,15 @@
if [[ "$GITLAB_HELM_REPO_AUTH" == "true" ]]; then
helm repo add --username="${CI_REGISTRY_USER}" --password="${CI_REGISTRY_PASSWORD}" "$HELM_REPO_NAME" $HELM_STABLE_ENDPOINT
fi
# tag based on chart version, install jq first
- |
if [[ "$TAG_CHART_VERSION_ENABLE" == "true" ]]; then
apk add jq
CHART_VERSION=$(cat Chart.yaml | yq .version)
helm cm-push . "$HELM_REPO_NAME" --version=$CHART_VERSION
fi
# default tag based on commit
- |
if [[ "$TAG_COMMIT_ENABLE" == "true" ]]; then