From 084365f9854107e53acac0acb6219b12415ec720 Mon Sep 17 00:00:00 2001 From: DeveloperDurpBot Date: Sun, 9 Apr 2023 19:41:28 +0000 Subject: [PATCH] ci: render Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/832211494 --- pipelines/build-container.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pipelines/build-container.yml b/pipelines/build-container.yml index 9af5f38..2c35e73 100644 --- a/pipelines/build-container.yml +++ b/pipelines/build-container.yml @@ -17,8 +17,34 @@ build-container: # Begin of docker-build.sh - | #Build Docker Container - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:latest . + docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:$GITVERSION -t $CI_REGISTRY/$CI_PROJECT_PATH:latest . docker push "$CI_REGISTRY/$CI_PROJECT_PATH:latest" + docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$GITVERSION" # End of docker-build.sh only: - main +HelmChart: + image: dtzar/helm-kubectl + stage: build + 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-package.sh + - | + #Helm Package + for chart in charts/*; do + if [ -d "$chart" ]; then + helm package "$chart" -d ./packages --version ${GITVERSION} + fi + done + # End of helm-package.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 + only: + - main