updates
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#%%MULTILINE_YAML_START
|
||||
#Build Docker Container
|
||||
docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:latest .
|
||||
docker push "$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"
|
||||
5
scripts/helm-addrepo.sh
Normal file
5
scripts/helm-addrepo.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#%%MULTILINE_YAML_START
|
||||
#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
|
||||
9
scripts/helm-package.sh
Normal file
9
scripts/helm-package.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#%%MULTILINE_YAML_START
|
||||
#Helm Package
|
||||
|
||||
for chart in charts/*; do
|
||||
if [ -d "$chart" ]; then
|
||||
helm package "$chart" -d ./packages --version ${GITVERSION}
|
||||
fi
|
||||
done
|
||||
8
scripts/helm-push.sh
Normal file
8
scripts/helm-push.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#%%MULTILINE_YAML_START
|
||||
#Helm Push
|
||||
|
||||
helm plugin install https://github.com/chartmuseum/helm-push
|
||||
for chart in packages/*; do
|
||||
helm cm-push ./$chart ${CI_PROJECT_NAME}
|
||||
done
|
||||
@@ -1,5 +1,6 @@
|
||||
stages:
|
||||
- build
|
||||
|
||||
build-container:
|
||||
image: docker:20.10.16
|
||||
variables:
|
||||
@@ -11,4 +12,14 @@ build-container:
|
||||
- ./scripts/docker-login.sh
|
||||
- ./scripts/docker-build.sh
|
||||
only:
|
||||
- main
|
||||
- main
|
||||
|
||||
HelmChart:
|
||||
image: dtzar/helm-kubectl
|
||||
stage: build
|
||||
script:
|
||||
- ./scripts/helm-addrepo.sh
|
||||
- ./scripts/helm-package.sh
|
||||
- ./scripts/helm-push.sh
|
||||
only:
|
||||
- main
|
||||
Reference in New Issue
Block a user