90 Commits

Author SHA1 Message Date
7ad52618fb bug fixed 2025-07-08 16:20:16 +02:00
2fbe2bf77e Merge branch 'development' into f047_Edit-der-Namen, bug gefixt 2025-07-08 16:16:42 +02:00
7c1b8669c0 Merge branch 'development' of ssh://gitea.innovation-hub-niedersachsen.de:4422/innohub/tatort into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit was not built
2025-07-04 10:11:46 +02:00
5f996e7007 added sonar to pipeline 2025-07-04 10:09:06 +02:00
f0df67fb86 Update Jenkinsfile
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit was not built
2025-07-02 08:12:56 +02:00
b63834eb51 Update Jenkinsfile
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-02 07:52:09 +02:00
e9eb2c1163 Update Jenkinsfile
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit was not built
2025-07-02 07:41:05 +02:00
3e926844b8 Merge pull request 'fixed tatort api route for deletion' (#16) from b038-check-api-route into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #16
2025-07-01 16:23:09 +02:00
ba4d810164 Merge pull request 'jenkins-docker' (#17) from jenkins-docker into development
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
Reviewed-on: #17
2025-07-01 13:30:25 +02:00
b6a52822f1 fixed merge conflicts
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 13:29:57 +02:00
b843e3abc0 push docker image only in dev branch
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 13:11:36 +02:00
7a25dbf68c change gitea user
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 13:07:02 +02:00
32d6245b5a get gitea json object
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 12:54:25 +02:00
45644c9695 get gitea json object
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 12:53:19 +02:00
0622fce790 get gitea json object
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 12:51:42 +02:00
0de66fe533 get gitea json object 2025-07-01 12:50:17 +02:00
0aa03aea19 fix pipeline 2025-07-01 12:39:24 +02:00
2ad9e5d86d added check if pipeline job was running 2025-07-01 09:58:38 +02:00
b57a30338e added check if pipeline job was running 2025-07-01 09:56:01 +02:00
eee820b39e added check if pipeline job was running 2025-07-01 09:52:45 +02:00
c25c8498f3 added check if pipeline job was running 2025-07-01 09:49:43 +02:00
95a9364391 added check if pipeline job was running
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 09:25:21 +02:00
49907da1b1 added check if pipeline job was running
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 09:21:44 +02:00
93be24a8de added check if pipeline job was running
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 09:19:09 +02:00
22fc1f490c activate post message
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 08:58:09 +02:00
0235b56637 deactivte post message 2025-07-01 08:55:53 +02:00
7ca8b295db no post statement
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 08:53:31 +02:00
abd756462b post statement only if changes 2025-07-01 08:47:45 +02:00
2939869816 renamed image tag
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 08:29:26 +02:00
3bd369c9e2 added params
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 08:13:51 +02:00
517654bfbf fixed config names
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-07-01 08:00:16 +02:00
739f67169e added confi for dev and prod
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:57:05 +02:00
2d003a619f set audit level to moderate
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:44:28 +02:00
bb5ade22c6 test jenkins pipeline
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:39:38 +02:00
be4e351217 test jenkins pipeline
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:34:58 +02:00
30b49029b2 fixed jenkinsfile
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:29:07 +02:00
890380609f added build id to image, set correct dockerfile
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:25:04 +02:00
2667db5755 added git ref to message
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:16:05 +02:00
021ec3d383 fixed jenkinsfile
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:11:01 +02:00
7018c74884 added webhook to get discrod message
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 07:07:07 +02:00
2b2fa7a82b added Dockerfile dev and prod
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-01 06:56:31 +02:00
fe9f8add88 fixed tatort api route for deletion
Some checks failed
InnoHub Processor/tatort/pipeline/pr-development There was a failure building this commit
2025-06-30 08:35:20 +02:00
de7b27bd71 Jenkinsfile aktualisiert
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Added additional Infos in pull request
2025-06-30 07:17:53 +02:00
f995b58d0f return user data
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-27 09:09:31 +02:00
efcbc4d60f test jenkins webhook
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-26 10:01:03 +02:00
02d4957315 test jenkins webhook
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-26 08:19:27 +02:00
de35986633 test jenkins webhook
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-26 08:12:03 +02:00
843c4ecaf4 test jenkins webhook 2025-06-26 08:11:40 +02:00
173f36fb50 test jenkins webhook
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-26 08:07:54 +02:00
35c5323a19 added options and test push event webhook 2025-06-26 08:06:15 +02:00
5a1cd22dc6 Jenkinsfile aktualisiert
Added options to delete old build
2025-06-26 08:04:19 +02:00
1fabe234e0 Merge pull request 'disord pull request test' (#14) from ci043-add-jenkins-ci into development
Reviewed-on: #14
2025-06-25 17:00:30 +02:00
036798d330 disord pull request test 2025-06-25 16:59:55 +02:00
fee152553b Merge pull request 'ci043-add-jenkins-ci' (#13) from ci043-add-jenkins-ci into development
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Reviewed-on: #13
2025-06-25 16:40:38 +02:00
2ed49394d7 Merge branch 'development' into ci043-add-jenkins-ci
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 16:40:13 +02:00
c74322228f activate ci and audit, deactivate docker 2025-06-25 16:34:17 +02:00
95936b09b5 fixed push image
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-06-25 15:47:14 +02:00
1d84b67a94 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:44:18 +02:00
083efb3aec fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:41:09 +02:00
fd17d10119 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:38:55 +02:00
9ad96abb77 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 15:26:26 +02:00
4dcd2e1a63 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 15:22:35 +02:00
331b9c22e1 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:18:54 +02:00
997ef6e30d fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:15:58 +02:00
1c394dff72 fixed push image
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:11:12 +02:00
8c29d39bf6 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:08:38 +02:00
0181fb288b fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:08:01 +02:00
1de66b11b3 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:06:17 +02:00
f2dd50c16e fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:05:31 +02:00
be61814b58 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 15:03:20 +02:00
62bca02625 fixed push image job 2025-06-25 14:59:31 +02:00
15529541ed fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:58:09 +02:00
b432554cca fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:25:28 +02:00
b991904921 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:21:47 +02:00
66794ef0f6 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:12:09 +02:00
b46852e385 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:11:19 +02:00
d0c6feee33 fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:09:05 +02:00
38f9f61e8a added push to gitea job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 14:06:31 +02:00
2effdb12c1 fixed typo
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-06-25 13:44:37 +02:00
0b4df7b714 added admin as submitter
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 13:25:29 +02:00
ea9b61fe79 added docker job
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 13:20:46 +02:00
8b276f9828 added docker
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
2025-06-25 11:50:13 +02:00
56cfd79687 added docker 2025-06-25 11:49:58 +02:00
b2e00eb030 added nodeJS as tool
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 10:50:26 +02:00
d5a7058f2d fixed node agent
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 10:41:00 +02:00
355e4f3287 fixed node agent
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 10:13:21 +02:00
7d15e0369d fixed node agent
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 10:07:31 +02:00
d6baaef992 fixed node agent
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 10:04:59 +02:00
533d94c6a5 fixed echo statement
Some checks failed
InnoHub Processor/tatort/pipeline/head Something is wrong with the build of this commit
2025-06-25 09:56:29 +02:00
41a98d3d1d added first Jenkins ci
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-06-25 09:52:46 +02:00
11 changed files with 192 additions and 90 deletions

17
Dockerfile.dev Normal file
View File

@@ -0,0 +1,17 @@
# --- Build stage ---
FROM node:22 AS build
ENV NODE_ENV=production
ENV ORIGIN=https://tatort-dev.innovation-hub-niedersachsen.de
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . ./
COPY config_dev.json ./config.json
RUN npm run build
# --- Production stage ---
FROM node:22-alpine3.20
COPY --from=build /app .
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["sh", "-c", "ORIGIN=https://tatort-dev.innovation-hub-niedersachsen.de node build/index.js"]

View File

@@ -6,6 +6,7 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . ./
COPY config_prod.json ./config.json
RUN npm run build
# --- Production stage ---
@@ -14,4 +15,3 @@ COPY --from=build /app .
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["sh", "-c", "ORIGIN=https://tatort.innovation-hub-niedersachsen.de node build/index.js"]

103
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,103 @@
/* groovylint-disable-next-line UnusedVariable */
@Library('InnoHub-Library') _
Boolean didRun = false
pipeline {
agent any
tools {
nodejs 'NodeJS-24.2.0'
}
environment {
REGISTRY = 'https://gitea.innovation-hub-niedersachsen.de/'
USER = 'jenkins'
TOKEN = credentials('JenkinsGitea')
}
parameters {
string(name: 'REPO_NAME', defaultValue: '', description: 'Repo Name')
string(name: 'GIT_REF', defaultValue: '', description: 'Git Ref')
}
options {
buildDiscarder(
BuildHistoryManager([
[ continueAfterMatch: false, matchAtMost: 5 ],
[ actions: [ DeleteBuild() ] ]
])
)
}
stages {
stage('Validate Repository') {
steps {
script {
checkRepoName(params.REPO_NAME, true)
}
}
}
stage('Install Dependencies') {
steps {
script {
didRun = true
}
sh 'npm ci'
}
}
stage('Test & Security Audit') {
steps {
script {
didRun = true
}
echo 'Start checking security vulnerabilities in npm packages'
sh 'npm audit --audit-level=moderate'
}
}
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv('sonarqube') {
sh 'sonar-scanner -Dsonar.projectKey=tatort -Dsonar.sources=src'
}
}
}
stage('Push image to gitea registry') {
when {
branch 'development'
}
steps {
script {
didRun = true
def tag = "innohub/tatort-dev:0.${env.BUILD_ID}"
docker.withRegistry('https://gitea.innovation-hub-niedersachsen.de', 'JenkinsGitea') {
docker.build(tag, '-f Dockerfile.dev .').push('latest')
}
}
}
}
}
post {
success {
script {
if (didRun) {
echo 'Pipeline erfolgreich!'
discordSend description: "Running ${env.BUILD_ID} on ${env.JENKINS_URL}, ${params.GIT_REF}", footer: 'Pipeline succeeded', link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: 'https://discordapp.com/api/webhooks/1389470542691831819/NdMO17sLBG2dplp_-oh6Ff0cbPOoADl0QwXKM9UzduxU44av_ZQkQjKTmpdK7YuwcZDc'
}
}
}
failure {
script {
if (didRun) {
echo 'Pipeline fehlgeschlagen!'
discordSend description: "Running ${env.BUILD_ID} on ${env.JENKINS_URL}, ${params.GIT_REF}", footer: 'Pipeline failed', link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: 'https://discordapp.com/api/webhooks/1389470542691831819/NdMO17sLBG2dplp_-oh6Ff0cbPOoADl0QwXKM9UzduxU44av_ZQkQjKTmpdK7YuwcZDc'
}
}
}
}
}

17
config_dev.json Normal file
View File

@@ -0,0 +1,17 @@
{
"minio": {
"endPoint": "sws3.innovation-hub-niedersachsen.de",
"port": 443,
"useSSL": true,
"accessKey": "wjpKrmaqXra99rX3D61H",
"secretKey": "fTPi0u0FR6Lv9Y9IKydWv6WM0EA5XrsK008HCt9u"
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 3600
},
"auth": {
"admin": { "password": "A-InnoHUB_2025!", "admin": true },
"user": { "password": "U-InnoHUB_2025!", "admin": false }
}
}

View File

@@ -8,7 +8,7 @@
},
"jwt": {
"secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB",
"expiresIn": 36000
"expiresIn": 3600
},
"auth": {
"admin": { "password": "A-InnoHUB_2025!", "admin": true },

View File

@@ -5,5 +5,6 @@ export const load: PageServerLoad = (event: ServerLoadEvent) => {
if (!event.locals.user && event.url.pathname !== '/anmeldung') throw redirect(303, '/anmeldung');
return {
user: event.locals.user
};
}

View File

@@ -143,29 +143,34 @@
}
async function handleDelete(tatort: string) {
let url = `/api/tatort/`;
// delete request
// --------------
console.log('Delete tatort: ', vorgang, tatort, data.caseId);
/* let url = new URL($page.url);
url.pathname += `/${filename}`;
try {
const response = await fetch(`/api${url.pathname}`, { method: 'DELETE' }); */
let url = new URL($page.url);
url.pathname += `/${tatort}`;
console.log('Delete tatort: ', `/api${url.pathname}`, url.pathname);
try {
const res = await fetch(url, {
const res = await fetch(`/api${url.pathname}`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ vorgang })
body: JSON.stringify({ vorgang, tatort })
});
console.log('res delete', res);
if (!res.ok) {
const msg = await res.text();
console.error('❌ Fehler beim Löschen:', msg);
} else if (res.status == 204) {
setTimeout(() => {
window.location.reload();
}, 500);
// await invalidate(url);
} else {
console.log('🗑️ Erfolgreich gelöscht:', vorgang);
console.log('🗑️ Erfolgreich gelöscht:', url.pathname);
}
} catch (err) {
console.error('⚠️ Netzwerkfehler beim Löschen:', err);
@@ -173,7 +178,6 @@
}
</script>
<div>Hallo</div>
<div class="-z-10 bg-white">
<div class="flex flex-col items-center justify-center w-full">
<h1 class="text-xl">Vorgang {vorgang}</h1>

View File

@@ -4,13 +4,7 @@ import { json } from '@sveltejs/kit';
/*
export const GET: RequestHandler = async ({ params }) => {
const { filename } = params;
// TODO: Datei lesen oder Datenbankabfrage
return json({ filename, list: mockList });
}; */
// rename operation
export async function PUT({ request }: {request: Request}) {

View File

@@ -0,0 +1,36 @@
import { BUCKET, client } from '$lib/minio';
import type { RequestHandler } from '@sveltejs/kit';
export async function GET() {
const stream = client.listObjectsV2(BUCKET, '', true);
const result = new ReadableStream({
start(controller) {
stream.on('data', (data) => {
controller.enqueue(`${JSON.stringify(data)}\n`);
});
stream.on('end', () => {
controller.close();
});
},
cancel() {
stream.destroy();
}
});
return new Response(result, {
headers: {
'content-type': 'text/event-stream'
}
});
}
export const DELETE: RequestHandler = async ({ request })=> { //body: {request}, keine params // params= de?param1=value&params2
const url_fragments = request.url.split('/');
const item = url_fragments.at(-1);
const vorgang = url_fragments.at(-2);
await client.removeObject(BUCKET, `${vorgang}/${item}`);
return new Response(null, { status: 204 });
}

View File

@@ -1,70 +0,0 @@
import { BUCKET, client } from '$lib/minio';
import type { RequestHandler } from '@sveltejs/kit';
export async function GET() {
const stream = client.listObjectsV2(BUCKET, '', true);
const result = new ReadableStream({
start(controller) {
stream.on('data', (data) => {
controller.enqueue(`${JSON.stringify(data)}\n`);
});
stream.on('end', () => {
controller.close();
});
},
cancel() {
stream.destroy();
}
});
return new Response(result, {
headers: {
'content-type': 'text/event-stream'
}
});
}
/* export async function DELETE({ request }: { request: Request }) {
const url_fragments = request.url.split('/');
const item = url_fragments.at(-1);
const vorgang = url_fragments.at(-2);
await client.removeObject(BUCKET, `${vorgang}/${item}`);
return new Response(null, { status: 204 });
} */
export const DELETE: RequestHandler = async ({ request,params })=> { //body: {request}, keine params // params= de?param1=value&params2
const token = params;
let {vorgang, tatort} = await request.json();
console.log("Server Delete ", vorgang, tatort, token );
const url_fragments = request.url.split('/');
tatort = url_fragments.at(-1);
vorgang = url_fragments.at(-2);
await client.removeObject(BUCKET, `${vorgang}/${tatort}?token=${token}`)
return new Response(null, { status: 204 });
// const vorgang = params.vorgang;
/*
const object_list:string[] = await new Promise((resolve, reject) => {
const res: string[] = [];
const items_str = client.listObjects('tatort', vorgang, true);
items_str.on('data', (obj) => {
if(obj.name) res.push(obj.name);
});
items_str.on('error', reject);
items_str.on('end', async () => {
resolve(res);
});
});
await client.removeObjects('tatort', object_list);
return new Response(null, { status: 204 }); */
}