Commit 22b0add5 authored by Sandro Mathys's avatar Sandro Mathys
Browse files

various gitlab ci changes

parent 13d1e9a0
......@@ -48,13 +48,12 @@ cache:
stages:
# on commit to main
- prepare
- precleanup
- pre-cleanup
- deploy
- verify
- postcleanup
- package
# on tag
- upload
- release
.cleanup:
interruptible: true
......@@ -94,8 +93,8 @@ prepare:
# just in case there's some left overs for some reason - because if so, the next job will fail
# we always want to perform an install (rather than an upgrade) in order to ensure the pre-install hooks work
precleanup:
stage: precleanup
pre-cleanup:
stage: pre-cleanup
environment:
name: main
only:
......@@ -131,39 +130,46 @@ verify:
# we always want to perform an install (rather than an upgrade) in order to ensure the pre-install hooks work
# thus we're making extra sure to delete everything
postcleanup:
stage: postcleanup
post-cleanup:
stage: post-cleanup
environment:
name: main
only:
- main
extends:
.cleanup
.set-helm-version:
before_script:
- sed "s/^\(version:\).*$/\1 ${CI_COMMIT_TAG}/" -i "${CI_PROJECT_DIR}/chart/Chart.yaml"
package:
stage: package
stage: release
environment:
name: main
name: release
only:
- main
variables:
- $CI_COMMIT_TAG
interruptible: true
extends:
.set-helm-version
script:
- sed "s/^\(version:\).*$/\1 ${CI_COMMIT_TAG}/" -i "${CI_PROJECT_DIR}/chart/Chart.yaml"
- helm package "${CI_PROJECT_DIR}/chart"
artifacts:
paths:
- ${CI_PROJECT_DIR}/*.tgz
upload:
stage: upload
stage: release
environment:
name: release
only:
variables:
- $CI_COMMIT_TAG
interruptible: true
extends:
.set-helm-version
script:
- sed "s/^\(version:\).*$/\1 ${CI_COMMIT_TAG}/" -i "${CI_PROJECT_DIR}/chart/Chart.yaml"
- echo "${SHIBBOLETH_SP_HELM_CHART_REGISTRY_TOKEN}" | helm registry login "${CI_REGISTRY_IMAGE}" -u "gitlab-ci-shibboleth-sp-helm-chart" --password-stdin
- helm chart save "${CI_PROJECT_DIR}/chart" "${CI_REGISTRY_IMAGE}"
- helm chart push "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment