Skip to content

Commit

Permalink
Merge pull request #307 from H2-invent/master
Browse files Browse the repository at this point in the history
Master to dev
  • Loading branch information
holzi1005 authored Feb 9, 2025
2 parents 2ed6054 + 2a645fd commit 89e7d03
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 80 deletions.
60 changes: 27 additions & 33 deletions .github/workflows/pipeline-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ on:
push:
branches:
- development
- feature/docker*

jobs:
artifact:
uses: h2-invent/open-datenschutzcenter/.github/workflows/task-artifact.yml@master

create_dev_release:
needs:
- artifact
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -31,31 +28,28 @@ jobs:
change_path: .
version_format: "${major}.${minor}.${patch}-${increment}"

- uses: actions/download-artifact@v4
with:
name: artifact_${{github.run_number}}

- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact

- name: Set laF_version in .env
run: |
sed -i 's/^laF_version=.*/laF_version=${{ steps.version.outputs.version }}/' .env
artifact:
uses: ./.github/workflows/task-artifact.yml

- name: Archive Release for application
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'application.zip'
exclusions: '*.git* *.github* /*node_modules/* /*var/* .editorconfig'
directory: artifact
prerelease:
needs:
- artifact
- version
uses: ./.github/workflows/task-release.yml
with:
version: ${{ needs.version.outputs.version }}
prerelease: true

- name: Create new Release with semantic-version tag
uses: ncipollo/release-action@v1
id: create_release
with:
prerelease: true
name: DEV Release ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.version }}
artifacts: artifact/application.zip
artifactContentType: application/zip
bodyFile: RELEASE_NOTE.md
docker:
needs:
- version
uses: ./.github/workflows/task-docker.yml
with:
reponame: 'git.h2-invent.com/datenschutzcenter/application'
version: ${{ needs.version.outputs.version }}
dockerfile_path: './Dockerfile'
directory: '.'
tags: 'git.h2-invent.com/datenschutzcenter/application:${{ needs.version.outputs.version }},git.h2-invent.com/datenschutzcenter/application:development'
secrets:
docker_password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
docker_username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
59 changes: 26 additions & 33 deletions .github/workflows/pipeline-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ on:
- master

jobs:
artifact:
uses: h2-invent/open-datenschutzcenter/.github/workflows/task-artifact.yml@master

create_release:
needs:
- artifact
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -32,31 +28,28 @@ jobs:
change_path: .
version_format: "${major}.${minor}.${patch}"

- uses: actions/download-artifact@v4
with:
name: artifact_${{github.run_number}}

- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact

- name: Set laF_version in .env
run: |
sed -i 's/^laF_version=.*/laF_version=${{ steps.version.outputs.version }}/' .env
artifact:
uses: ./.github/workflows/task-artifact.yml

- name: Archive Release for application
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'application.zip'
exclusions: '*.git* *.github* /*node_modules/* /*nodejs/* /*var/* .editorconfig'
directory: artifact
release:
needs:
- artifact
- version
uses: ./.github/workflows/task-release.yml
with:
version: ${{ needs.version.outputs.version }}
prerelease: false

- name: Create new Release with semantic-version tag
uses: ncipollo/release-action@v1
id: create_release
with:
prerelease: false
name: Release ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.version }}
artifacts: artifact/application.zip
artifactContentType: application/zip
bodyFile: RELEASE_NOTE.md
docker:
needs:
- version
uses: ./.github/workflows/task-docker.yml
with:
reponame: 'git.h2-invent.com/datenschutzcenter/application'
version: ${{ needs.version.outputs.version }}
dockerfile_path: './Dockerfile'
directory: '.'
tags: 'git.h2-invent.com/datenschutzcenter/application:${{ needs.version.outputs.version }},git.h2-invent.com/datenschutzcenter/application:latest'
secrets:
docker_password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
docker_username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
9 changes: 9 additions & 0 deletions .github/workflows/pipeline-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Run Code Analysis on push

on:
push:

jobs:

artifact:
uses: ./.github/workflows/task-test.yml
57 changes: 57 additions & 0 deletions .github/workflows/task-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish Docker image

on:
workflow_call:
inputs:
reponame:
description: 'the image name of the docker hub image'
default: 'h2invent/jitsi-admin-main'
required: true
type: string
directory:
description: 'the dir of the Dockerfile image'
default: '.'
required: true
type: string
dockerfile_path:
description: 'the name of the Dockerfile image'
default: './Dockerfile'
required: true
type: string
version:
description: 'the version/tag of the Dockerfile image'
required: true
type: string
tags:
description: 'the tags of the Dockerfile image'
required: true
type: string
secrets:
docker_username:
required: true
docker_password:
required: true

jobs:
push_to_registry:
name: Build and Push Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Registry
uses: docker/login-action@v3
with:
registry: git.h2-invent.com
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ${{ inputs.directory }}
file: ${{ inputs.dockerfile_path }}
push: true
build-args: VERSION=${{ inputs.version }}
tags: ${{ inputs.tags }}
50 changes: 50 additions & 0 deletions .github/workflows/task-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish new Release

on:
workflow_call:
inputs:
version:
description: 'release version'
default: true
type: string
prerelease:
description: 'publish releases as preprelease'
default: true
type: boolean
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
with:
name: artifact_${{github.run_number}}

- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact

- name: Set laF_version in .env
run: |
sed -i 's/^laF_version=.*/laF_version=${{ inputs.version }}/' .env
- name: Archive Release for application
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'application.zip'
exclusions: '*.git* *.github* /*node_modules/* /*var/* .editorconfig'
directory: artifact

- name: Create new Release with semantic-version tag
uses: ncipollo/release-action@v1
id: create_release
with:
prerelease: ${{ inputs.prerelease }}
name: Release ${{ inputs.version }}
tag: ${{ inputs.version }}
artifacts: artifact/application.zip
artifactContentType: application/zip
bodyFile: RELEASE_NOTE.md
24 changes: 24 additions & 0 deletions .github/workflows/task-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Code Analysis

on: workflow_call

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ vars.PHP_VERSION }}

- name: Install dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --prefer-dist

- name: Run script
run: vendor/bin/phpstan analyse
15 changes: 15 additions & 0 deletions .github/workflows/todo-to-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Run TODO to Issue"

on: [ "push" ]

jobs:
create_issues:
runs-on: "ubuntu-latest"
permissions:
issues: write
steps:
- name: Checkout Repository
uses: "actions/checkout@v4"

- name: "TODO to Issue"
uses: alstr/todo-to-issue-action@v5
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
__Open Source Datenschutzmanagement System__

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
[![Create Release](https://github.com/H2-invent/open-datenschutzcenter/actions/workflows/pipeline-release.yml/badge.svg)](https://github.com/H2-invent/open-datenschutzcenter/actions/workflows/pipeline-release.yml)
[![Run Code Analysis on push](https://github.com/H2-invent/open-datenschutzcenter/actions/workflows/pipeline-test.yml/badge.svg)](https://github.com/H2-invent/open-datenschutzcenter/actions/workflows/pipeline-test.yml)

Der Open Datenschutzcenter (ODC) ist ein Open Source Datenschutzmanagement-System für Unternehmen und Datenschutzbeauftragte. Der ODC wird kontinuierlich mit einer aktiven Community von Unternehmen, Datenschutzbeauftragten und Informationssicherheitsbeauftragten weiterentwickelt. Open Source bedeutet, dass der Quellcode der Software öffentlich zugänglich zur Verfügung steht. Unternehmen können den ODC auf einem eigenen Server betrieben, eigene Funktionen entwickeln und die Funktionalität erweitern. Die H2 Invent GmbH ist das Unternehmen hinter dem Open Datenschutzcenter und verwaltet das Repository, das Wiki und die Releases. H2 Invent entwickelt für Unternehmen neue ODC Funktionen um diesen den Anforderungen des Unternehmens anzupassen.

Expand Down Expand Up @@ -78,14 +80,6 @@ Das bereitgestellte Docker-Compose-File installiert das ODC im Produktionsmodus

Zusätzlich zum ODC-Container werden ein Traefik Load Balancer, eine MySQL-Datenbank und ein Keycloak-Server eingerichtet. Alle Anwendungen können auch ohne das Docker Compose-File in Umgebungen wie Swarm oder Helm betrieben werden.

# Migrations
#### von 1.12.X auf 2.X
* nach einer Umstellung des Default Teams muss eine Migration der Datenbank vorgenommen werden. Für die Migration muss einmal der Command über die CLI durchgeführt werden.
Danach werden alle Audit Ziele vom Default Team 1 auf null umgestellt.
````
php bin/console app:migrate:defaultTeam
````

# Kooperation
In Kooperation mit der [Professur "Datenschutz und Compliance"](https://www.unibw.de/datcom) des Forschungsinstituts Cyber Defence (CODE) der [Universität der Bundeswehr München](https://www.unibw.de/home) wurden:
* das Open Datenschutzcenter im Rahmen der [Masterarbeit](docs/Masterarbeit_loeschkonzepte.pdf) von Herrn Juister um die Funktion zum Dokumentieren von Löschkonzepten ergänzt.
Expand Down
13 changes: 7 additions & 6 deletions RELEASE_NOTE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Release 4.0.0
# Release 4.0.1

> Dieses Release wird als Docker Image auf git.h2-invent.com/datenschutzcenter/application öffentlich bereitgestellt.
>
> Dieses Release wird als ZIP Artifact mit Webpack CSS und JS Files und Composer Vendor Files auf Github für eine manuelle Installation auf einem Webserver bereitgestellt.
## Neue Funktionen und Verbesserungen
* In den TOM Formularen können jetzt die technischen und organisatorischen Maßnahmen mit einem WYSIWYG Editor beschrieben werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/217)
* Der neue Assistent unterstützt beim Erstellen von Verarbeitungen und allen notwendigen Datensätzen. Dieser Assistent erleichtert die Erfassung von neuen Verarbeitungen. (https://github.com/H2-invent/open-datenschutzcenter/pull/204)
* Ab sofort können Datenschutzelemente von einem Team in Kinderteams vererbt werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/205)
* Add new Dockerfile for the ODC
* New Github Action with Docker build

## Bug fixes


## Update Anleitung
* Die Anleitung zum Installieren des ODCs mit hilfe Docker Compose wurde angepasst (https://github.com/H2-invent/open-datenschutzcenter/wiki/Get-Started)
* Docker Images Updated with Github Action

0 comments on commit 89e7d03

Please sign in to comment.