Skip to content

Commit

Permalink
Mdas 335 eai komponente für statusabfrage und logging (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
martind260 committed Apr 15, 2024
1 parent c8efaa6 commit 35f6c81
Show file tree
Hide file tree
Showing 166 changed files with 6,589 additions and 2,176 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Integration compliance check and build test

on:
push:
branches-ignore:
- 'sprint'
- 'main'
paths:
- 'mobidam-sst-management-integration/**'
- '.github/workflows/**'
pull_request:
types: [ opened, reopened ]

jobs:
compliance:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Advance Security Policy as Code
uses: advanced-security/policy-as-code@v2.4.1
with:
policy: it-at-m/policy-as-code
policy-path: default.yaml
token: ${{ secrets.GITHUB_TOKEN }}
argvs: "--disable-dependabot --disable-secret-scanning --disable-code-scanning --display"

build-maven:
needs: compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: "maven"

- name: Build with Maven
run: mvn --update-snapshots -f mobidam-sst-management-integration/pom.xml verify
64 changes: 64 additions & 0 deletions .github/workflows/release-build-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build integration release

on:
workflow_dispatch:
inputs:
branch:
description: "Branch to release from ?"
required: true
default: "main"
release-version:
description: "Release version ?"
required: true
release-tag:
description: "Release tag ?"
required: true
development-version:
description: "Next Development version ?"
required: true

jobs:
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Git checkout to main branch # Releases are published on main branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Setup git user
uses: fregante/setup-git-user@v2

- name: Set up JDK and OSSRH auth / GPG signing
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: "maven"
server-id: "central"
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.gpg_private_key }}
gpg-passphrase: SIGN_KEY_PASS

- name: Perform maven release
run: >
mvn --batch-mode --no-transfer-progress release:prepare release:perform
-DreleaseVersion=${{ github.event.inputs.release-version }}
-DdevelopmentVersion=${{ github.event.inputs.development-version }}
-Dtag=${{ github.event.inputs.release-tag }}
-Darguments="-DskipTests"
env:
SIGN_KEY_PASS: ${{ secrets.gpg_passphrase }}
CENTRAL_USERNAME: ${{ secrets.sonatype_username }}
CENTRAL_PASSWORD: ${{ secrets.sonatype_password }}

- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.release-tag }}
draft: false
prerelease: false
generate_release_notes: false
5 changes: 5 additions & 0 deletions docs/src/dokumentation/RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Release-Notes

## Sprint 8 (26.03.2024 - 16.04.2024)
### Verbessert
- integration-starter publishing

## Sprint 8 (05.03.2024 - 26.03.2024)
### Hinzugefügt
- SSO aktiviert und Backend abgesichert
- integration-starter

### Verbessert
- Tabellen auf deutsch
Expand Down
28 changes: 27 additions & 1 deletion docs/src/technisches-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,30 @@ So können beispielsweise über den jeweiligen Controller `POST`, `GET` und `DEL

Die API kann nach dem Starten des Backends über den Link http://localhost:39146/swagger-ui/index.html#/ erreicht werden.

Weitere Informationen zur Swagger UI sind unter https://swagger.io/tools/swagger-ui/ zu finden.
Weitere Informationen zur Swagger UI sind unter https://swagger.io/tools/swagger-ui/ zu finden.

## Integration-starter
* Client-Projekt erstellen mit Dependency:
```
<dependency>
<groupId>de.muenchen.mobidam</groupId>
<artifactId>mobidam-sst-management-integration-starter</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
```
* Konfiguration
```
spring.security:
...
...
de.muenchen.mobidam.integration:
baseUrl: http://localhost:39146
```
* Verwendung
```
@Autowired
private SstManagementIntegrationService sstManagementIntegrationService;
...
boolean status = sstManagementIntegrationService.isActivated("04415b59-a35f-47e1-9567-4373713ad908");
```
32 changes: 16 additions & 16 deletions mobidam-sst-management-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#
# The MIT License
# Copyright © 2023 Landeshauptstadt München | it@M
# Copyright © 2023 Landeshauptstadt München | it@M
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

FROM registry.access.redhat.com/ubi9/openjdk-17:latest
Expand Down
32 changes: 16 additions & 16 deletions mobidam-sst-management-backend/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<!--
The MIT License
Copyright © 2023 Landeshauptstadt München | it@M
Copyright © 2023 Landeshauptstadt München | it@M
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!DOCTYPE module PUBLIC
Expand Down
20 changes: 0 additions & 20 deletions mobidam-sst-management-backend/header.txt

This file was deleted.

46 changes: 25 additions & 21 deletions mobidam-sst-management-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<!--
The MIT License
Copyright © 2023 Landeshauptstadt München | it@M
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Copyright © 2023 Landeshauptstadt München | it@M
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
Expand Down Expand Up @@ -63,7 +63,7 @@
<org.projectlombok.lombok.version>1.18.26</org.projectlombok.lombok.version>
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
<org.projectlombok.mapstructbinding.version>0.2.0</org.projectlombok.mapstructbinding.version>
<springdoc.version>2.2.0</springdoc.version>
<springdoc.version>2.4.0</springdoc.version>
</properties>


Expand Down Expand Up @@ -490,7 +490,11 @@
</execution>
</executions>
<configuration>
<header>header.txt</header>
<properties>
<owner>Landeshauptstadt München | it@M</owner>
<year>2023</year>
</properties>
<header>com/mycila/maven/plugin/license/templates/MIT.txt</header>
<failIfMissing>true</failIfMissing>
<useDefaultExcludes>true</useDefaultExcludes>
<excludes>
Expand Down
32 changes: 16 additions & 16 deletions mobidam-sst-management-backend/runLocal.bat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@REM
@REM The MIT License
@REM Copyright © 2023 Landeshauptstadt München | it@M
@REM Copyright © 2023 Landeshauptstadt München | it@M
@REM
@REM Permission is hereby granted, free of charge, to any person obtaining a copy
@REM of this software and associated documentation files (the "Software"), to deal
@REM in the Software without restriction, including without limitation the rights
@REM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@REM copies of the Software, and to permit persons to whom the Software is
@REM furnished to do so, subject to the following conditions:
@REM Permission is hereby granted, free of charge, to any person obtaining a copy
@REM of this software and associated documentation files (the "Software"), to deal
@REM in the Software without restriction, including without limitation the rights
@REM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@REM copies of the Software, and to permit persons to whom the Software is
@REM furnished to do so, subject to the following conditions:
@REM
@REM The above copyright notice and this permission notice shall be included in
@REM all copies or substantial portions of the Software.
@REM The above copyright notice and this permission notice shall be included in
@REM all copies or substantial portions of the Software.
@REM
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@REM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@REM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@REM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
@REM THE SOFTWARE.
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@REM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@REM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@REM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
@REM THE SOFTWARE.
@REM

mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local"
Loading

0 comments on commit 35f6c81

Please sign in to comment.