Commit a5c9e516 authored by Sandro Mathys's avatar Sandro Mathys
Browse files

add the package stage to production and no longer hardcore version in upload

parent dcc24f46
......@@ -70,7 +70,7 @@ precleanup staging:
only:
- staging
extends:
.cleanup
- .cleanup
deploy staging:
stage: deploy
......@@ -107,12 +107,8 @@ postcleanup staging:
extends:
.cleanup
package staging:
stage: package
environment:
name: staging
only:
- staging
.package:
interruptible: true
script:
- helm package chart
......@@ -120,8 +116,25 @@ package staging:
paths:
- /builds/maps/shibboleth-sp-helm-chart/*.tgz
package staging:
stage: package
environment:
name: staging
only:
- staging
extends:
- .package
package production:
stage: package
environment:
name: production
only:
- production
extends:
- .package
# TODO: only run this in production
# TODO: save as artifact
upload staging:
stage: upload
environment:
......@@ -131,6 +144,6 @@ upload staging:
interruptible: true
script:
- echo "${SHIBBOLETH_SP_HELM_CHART_REGISTRY_TOKEN}" | helm registry login "${CI_REGISTRY}/maps/shibboleth-sp-helm-chart/" -u "gitlab-ci-shibboleth-sp-helm-chart" --password-stdin
# TODO: don't hardcode version
- helm chart save chart "cr.gitlab-int.switch.ch/maps/shibboleth-sp-helm-chart/chart/shibboleth-sp:0.2.1"
# - helm chart push "cr.gitlab-int.switch.ch/maps/shibboleth-sp-helm-chart/chart/shibboleth-sp:0.2.1"
- chart_version=${grep "^version:" chart/Chart.yaml | sed "s/^.*:\W*//"}
- helm chart save chart "cr.gitlab-int.switch.ch/maps/shibboleth-sp-helm-chart/chart/shibboleth-sp"
- helm chart push "cr.gitlab-int.switch.ch/maps/shibboleth-sp-helm-chart/chart/shibboleth-sp:${chart_version}"
Supports Markdown
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