Commit 8bfa144a authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Adds helm chart and version replace script

parent 1d3656fe
.gradle
.idea
build
out
*.iml
chart/
\ No newline at end of file
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: table-data-transform
description: This chart starts a table data transform job.
type: application
version: 0.0.0
appVersion: 0.0.0
maintainers:
- name: Jonas Waeber
email: jonas.waeber@unibas.ch
\ No newline at end of file
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 }}"
SHEET_INDEX: "{{ .Values.sheetIndex }}"
HEADER_COUNT: "{{ .Values.headerCount }}"
HEADER_LINE_INDEX: "{{ .Values.headerLineIndex }}"
IDENTIFIER_INDEX: "{{ .Values.identifierIndex }}"
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:
- secretRef:
name: "{{ .Values.sftpConfigs }}"
- configMapRef:
name: "{{ .Values.kafkaConfigs }}"
- configMapRef:
name: "{{ .Values.processId }}-{{ .Values.jobId }}-app-config"
restartPolicy: Never
backoffLimit: 0
#image values
registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/table-data-transform"
tag: "latest"
jobName: table-data-transform
processId: p0001
jobId: j0002
lastJobId: j0001
lastJobName: text-file-validation
institutionId: placeholder
recordSetId: placeholder
kafkaConfigs: prod-kafka-bootstrap-servers
sftpConfigs: internal-sftp-config
# DEFAULT APP CONFIG VALUES
# all index values begin at ONE and not at ZERO!
# sheetIndex is the index of the sheet inside of an .xslx, .xsl or .ods file. Ignored for .csv, .tsv.
sheetIndex: "1"
# headerCount is the number of lines to skip before creating records
headerCount: "1"
# headerLineIndex is the index of the header row to use for property names.
headerLineIndex: "1"
# identifierIndex is the index of the column used as an unique identifier for each row.
identifierIndex: "1"
\ No newline at end of file
#!/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