In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

Commit 99f14cbc authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add helm chart to repository

parent 99a036c8
Pipeline #9144 failed with stages
in 1 minute and 58 seconds
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
build build
out out
chart
*.iml *.iml
...@@ -57,3 +57,26 @@ build-feature-branch-image: ...@@ -57,3 +57,26 @@ build-feature-branch-image:
except: except:
- master - master
- tags - tags
test-chart:
stage: test
image: dtzar/helm-kubectl:3.2.0
tags:
- mbr
script:
- helm lint $CI_PROJECT_NAME
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"
- 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
# 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: text-file-validation
description: A helm chart for the text-file-validation service.
type: application
version: 0.1.4
appVersion: 0.2.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 }}"
APP_DIRECTORY: "{{ .Values.appDirectory }}"
CLIENT_ID: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
TOPIC_IN: "{{ .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
\ 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 }}"
APP_DIRECTORY: "{{ .Values.appDirectory }}"
CLIENT_ID: "{{ .Values.processId }}-{{ .Values.jobId }}-{{ .Values.jobName }}"
TOPIC_IN: "{{ .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
\ No newline at end of file
#image values
registry: "cr.gitlab.switch.ch"
image: "memoriav/memobase-2020/services/import-process/text-file-validation"
tag: "latest"
jobName: text-file-validation
processId: p0001
jobId: j0001
institutionId: placeholder
recordSetId: placeholder
kafkaConfigs: prod-kafka-bootstrap-servers
sftpConfigs: internal-sftp-config
## Needs to be set to the directory on the sftp server.
## this is a relative path built like this:
## "./{INSTITUTION_ID}/{RECORD_SET_ID}"
appDirectory: placeholderValue
...@@ -20,11 +20,12 @@ package org.memobase ...@@ -20,11 +20,12 @@ package org.memobase
import java.io.File import java.io.File
import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import org.memobase.settings.SettingsLoader import org.memobase.settings.SettingsLoader
import org.memobase.sftp.SftpClient import org.memobase.sftp.SftpClient
class Service(fileName: String = "app.yml") { class Service(fileName: String = "app.yml") {
val log = LogManager.getLogger("TextFileValidationService") private val log: Logger = LogManager.getLogger("TextFileValidationService")
val settings = val settings =
SettingsLoader( SettingsLoader(
......
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