diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 574c0ce8d1954fdc38e935089e3317618c44024c..c9705af0842c39955504f14169b4d2fcc7732f76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,9 @@ test: .helm: before_script: - apk add --no-cache helm git curl + script: + - helm package --version=${HELM_CHART_VERSION} src/main/helm + - curl -u ${NEXUS_USER}:${NEXUS_PASSWORD} https://nexus.ozg-sh.de/service/rest/v1/components?repository=${NEXUS_HELM_REPO_NAME} -F file=@${PROJECT_ARTIFACTID}-${HELM_CHART_VERSION}.tgz test-helm: stage: test @@ -83,13 +86,16 @@ push-merge-request-image-nexus: push-merge-request-helm-nexus: stage: publish + variables: + NEXUS_HELM_REPO_NAME: ozg-base-apps-snapshot before_script: - !reference [.get-version, before_script] - !reference [.helm, before_script] script: - export HELM_CHART_VERSION=${PROJECT_VERSION}-MR-${CI_MERGE_REQUEST_IID} - - helm package --version=${HELM_CHART_VERSION} src/main/helm - - curl -u ${NEXUS_USER}:${NEXUS_PASSWORD} https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@${PROJECT_ARTIFACTID}-${HELM_CHART_VERSION}.tgz + - !reference [.helm, script] + - export HELM_CHART_VERSION=${PROJECT_VERSION}-MR-${CI_MERGE_REQUEST_IID}-${CI_COMMIT_SHORT_SHA} + - !reference [.helm, script] rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' when: manual diff --git a/src/main/helm/templates/certificate.yaml b/src/main/helm/templates/certificate.yaml index 8d1bf81f625a755505e396bd0316d1bde891d2a1..434f8b47e278f58b970c9f8a90d7a59fb9d2d2f7 100644 --- a/src/main/helm/templates/certificate.yaml +++ b/src/main/helm/templates/certificate.yaml @@ -12,9 +12,8 @@ spec: algorithm: ECDSA size: 256 issuerRef: - name: xta-test-cluster-issuer - kind: ClusterIssuer - group: cert-manager.io + name: {{ include "app.namespace" . }}-ca-issuer + kind: Issuer duration: 8760h0m0s # 1 Jahr renewBefore: 5840h0m0s # 8 Monate commonName: {{ .Release.Name }} diff --git a/src/main/helm/templates/selfsigned_cluster_issuer.yaml b/src/main/helm/templates/selfsigned_cluster_issuer.yaml deleted file mode 100644 index a988ee33a89d88a84517995cead7e5c2d99d4397..0000000000000000000000000000000000000000 --- a/src/main/helm/templates/selfsigned_cluster_issuer.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: cert-manager.io/v1 -kind: ClusterIssuer -metadata: - name: xta-test-cluster-issuer - namespace: {{ include "app.namespace" . }} - labels: - {{- include "app.defaultLabels" . | indent 4 }} -spec: - selfSigned: {} \ No newline at end of file