Files
yml/jobs/helm.yml

30 lines
993 B
YAML

.helm-build:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
# Begin of helm-package.sh
- |
#Helm Package
for chart in charts/*; do
if [ -d "$chart" ]; then
helm dependency update $chart
helm package "$chart" -d ./packages --version ${VERSION}
fi
done
# End of helm-package.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/packages
.helm-push:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
# Begin of helm-addrepo.sh
- |
#Helm repo add
helm repo add --username gitlab-ci-token --password ${CI_JOB_TOKEN} ${CI_PROJECT_NAME} ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
# End of helm-addrepo.sh
# Begin of helm-push.sh
- "#Helm Push \n \nhelm plugin install https://github.com/chartmuseum/helm-push\nfor chart in packages/*; do\n helm cm-push ./$chart ${CI_PROJECT_NAME}\ndone\n"
# End of helm-push.sh