Commit d8c471c4 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Adds helm chart to repository

parent 8c9b4ffc
Pipeline #9156 failed with stages
in 2 minutes and 16 seconds
......@@ -7,9 +7,11 @@ stages:
test:
stage: test
image: openjdk:8
image: gradle:6.3-jdk8
tags:
- mbr
script:
- ./gradlew --no-daemon test --fail-fast --tests "org.memobase.Tests"
- gradle --no-daemon --no-scan --no-build-cache test --fail-fast --tests "org.memobase.Tests"
.build-image:
......@@ -56,3 +58,26 @@ build-feature-branch-image:
except:
- master
- tags
test-chart:
stage: test
image: dtzar/helm-kubectl:3.2.0
tags:
- mbr
script:
- helm lint chart/
publish-chart:
stage: publish
image: dtzar/helm-kubectl:3.2.0
tags:
- mbr
script:
- export HELM_EXPERIMENTAL_OCI=1
- helm registry login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- ./insert_chart_versions.sh
- helm chart save chart/ "$CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_TAG-chart"
- helm chart push "$CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_TAG-chart"
- helm registry logout "$CI_REGISTRY"
only:
- tags
\ No newline at end of file
apiVersion: v2
name: mapper-service
description: The mapper service job for the import process.
type: application
version: 0.0.0
appVersion: 0.0.0
maintainers:
- name: Jonas Waeber
email: jonas.waeber@unibas.ch
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ .Values.processId }}-{{ .Values.jobId }}-app-config"
namespace: memobase
data:
JOB_ID: "{{ .Values.jobId }}"
APPLICATION_ID: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
INSTITUTION_ID: "{{ .Values.institutionId }}"
RECORD_SET_ID: "{{ .Values.recordSetId }}"
TOPIC_IN: "{{ .Values.processId }}-{{ .Values.lastJobId }}-{{ .Values.lastJobName }}"
TOPIC_OUT: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
TOPIC_PROCESS: "{{ .Values.processId }}-reporting"
\ No newline at end of file
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
namespace: memobase
labels:
institutionId: "{{ .Values.institutionId }}"
recordSetId: "{{ .Values.recordSetId }}"
jobType: "import-job"
spec:
template:
spec:
containers:
- name: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
image: "{{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}"
envFrom:
- configMapRef:
name: "{{ .Values.kafkaConfigs }}"
- configMapRef:
name: "{{ .Values.processId }}-{{ .Values.jobId }}-app-config"
volumeMounts:
- name: config-volume
mountPath: "/configs/mappings/{{ .Values.configFileName }}"
subPath: "{{ .Values.configFileName }}"
volumes:
- name: config-volume
configMap:
name: "{{ .Values.configMapName }}"
restartPolicy: Never
backoffLimit: 0
#image values
registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/mapper-service"
tag: "latest"
jobName: mapper-service
processId: p0001
jobId: j0003
lastJobId: j0002
lastJobName: table-data-transform
kafkaConfigs: prod-kafka-bootstrap-servers
institutionId: placeholder
recordSetId: placeholder
# configMapName holds the name of the config with the mappings for the service.
configMapName: placeholder
configFileName: mapping.yml
#!/usr/bin/env bash
echo Creating release: $1
sed -i "s/version: 0.0.0/version: $CI_COMMIT_TAG/g" ./chart/Chart.yaml
sed -i "s/appVersion: 0.0.0/appVersion: $CI_COMMIT_TAG/g" ./chart/Chart.yaml
sed -i "s/tag: \"latest\"/tag: $CI_COMMIT_TAG/g" ./chart/values.yaml
\ No newline at end of file
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