Skip to content

Commit

Permalink
Merge branch 'main' into ionos-main
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 16, 2024
2 parents bdb61ab + 9b49f85 commit f77730b
Show file tree
Hide file tree
Showing 252 changed files with 9,728 additions and 975 deletions.
16 changes: 12 additions & 4 deletions .ci/appsettings.override.postgres.docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
}
},
"Modules": {
"Announcements": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=announcements;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Challenges": {
"Infrastructure": {
"SqlDatabase": {
Expand Down Expand Up @@ -97,10 +105,7 @@
},
"Tags": {
"Application": {
"SupportedLanguages": [
"de",
"en"
],
"SupportedLanguages": ["de", "en"],
"TagsForAttributeValueTypes": {
"IdentityFileReference": {
"schulabschluss": {
Expand Down Expand Up @@ -166,6 +171,9 @@
}
},
"Tokens": {
"Application": {
"DidDomainName": "localhost"
},
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
Expand Down
16 changes: 12 additions & 4 deletions .ci/appsettings.override.postgres.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
}
},
"Modules": {
"Announcements": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
"ConnectionString": "User ID=announcements;Password=Passw0rd;Server=localhost;Port=5432;Database=enmeshed;"
}
}
},
"Challenges": {
"Infrastructure": {
"SqlDatabase": {
Expand Down Expand Up @@ -97,10 +105,7 @@
},
"Tags": {
"Application": {
"SupportedLanguages": [
"de",
"en"
],
"SupportedLanguages": ["de", "en"],
"TagsForAttributeValueTypes": {
"IdentityFileReference": {
"schulabschluss": {
Expand Down Expand Up @@ -166,6 +171,9 @@
}
},
"Tokens": {
"Application": {
"DidDomainName": "localhost"
},
"Infrastructure": {
"SqlDatabase": {
"Provider": "Postgres",
Expand Down
16 changes: 12 additions & 4 deletions .ci/appsettings.override.sqlserver.docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
}
},
"Modules": {
"Announcements": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "SqlServer",
"ConnectionString": "Server=sqlserver;Database=enmeshed;User Id=announcements;Password=Passw0rd;TrustServerCertificate=True"
}
}
},
"Challenges": {
"Infrastructure": {
"SqlDatabase": {
Expand Down Expand Up @@ -97,10 +105,7 @@
},
"Tags": {
"Application": {
"SupportedLanguages": [
"de",
"en"
],
"SupportedLanguages": ["de", "en"],
"TagsForAttributeValueTypes": {
"IdentityFileReference": {
"schulabschluss": {
Expand Down Expand Up @@ -166,6 +171,9 @@
}
},
"Tokens": {
"Application": {
"DidDomainName": "localhost"
},
"Infrastructure": {
"SqlDatabase": {
"Provider": "SqlServer",
Expand Down
16 changes: 12 additions & 4 deletions .ci/appsettings.override.sqlserver.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
}
},
"Modules": {
"Announcements": {
"Infrastructure": {
"SqlDatabase": {
"Provider": "SqlServer",
"ConnectionString": "Server=localhost;Database=enmeshed;User Id=announcements;Password=Passw0rd;TrustServerCertificate=True"
}
}
},
"Challenges": {
"Infrastructure": {
"SqlDatabase": {
Expand Down Expand Up @@ -97,10 +105,7 @@
},
"Tags": {
"Application": {
"SupportedLanguages": [
"de",
"en"
],
"SupportedLanguages": ["de", "en"],
"TagsForAttributeValueTypes": {
"IdentityFileReference": {
"schulabschluss": {
Expand Down Expand Up @@ -166,6 +171,9 @@
}
},
"Tokens": {
"Application": {
"DidDomainName": "localhost"
},
"Infrastructure": {
"SqlDatabase": {
"Provider": "SqlServer",
Expand Down
12 changes: 6 additions & 6 deletions .ci/compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
consumer-api:
container_name: consumer-api-test
hostname: consumer-api
image: consumer-api:0.0.1
image: ghcr.io/nmshd/backbone-consumer-api:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
Expand All @@ -21,7 +21,7 @@ services:
admin-ui:
container_name: admin-ui-test
hostname: admin-ui
image: admin-ui:0.0.1
image: ghcr.io/nmshd/backbone-admin-ui:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
Expand All @@ -37,7 +37,7 @@ services:

event-handler-service:
container_name: event-handler-service-test
image: event-handler-service:0.0.1
image: ghcr.io/nmshd/backbone-event-handler:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
depends_on:
Expand All @@ -51,7 +51,7 @@ services:

sse-server:
container_name: sse-server-test
image: sse-server:0.0.1
image: ghcr.io/nmshd/backbone-sse-server:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
depends_on:
Expand All @@ -65,7 +65,7 @@ services:

database-migrator:
container_name: database-migrator-test
image: database-migrator:0.0.1
image: ghcr.io/nmshd/backbone-database-migrator:0.0.1
depends_on:
seed-database:
condition: service_completed_successfully
Expand Down Expand Up @@ -101,7 +101,7 @@ services:

admin-cli:
container_name: admin-cli-test
image: admin-cli:0.0.1
image: ghcr.io/nmshd/backbone-admin-cli:0.0.1
depends_on:
consumer-api:
condition: service_healthy
Expand Down
3 changes: 2 additions & 1 deletion .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pull_request_rules:
- name: update pull request
conditions:
- label!=wip
- label != wip
- author != renovate[bot]
actions:
update:
9 changes: 8 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
{
// the docker images in this list are created and used by our pipelines and can therefore not to be updated by renovate
matchDatasources: ["docker"],
packageNames: ["consumer-api", "admin-ui", "event-handler-service", "sse-server", "database-migrator", "admin-cli"],
packageNames: [
"ghcr.io/nmshd/backbone-consumer-api",
"ghcr.io/nmshd/backbone-admin-ui",
"ghcr.io/nmshd/backbone-event-handler",
"ghcr.io/nmshd/backbone-sse-server",
"ghcr.io/nmshd/backbone-database-migrator",
"ghcr.io/nmshd/backbone-admin-cli"
],
enabled: false
},
{
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2.17.0
uses: subosito/flutter-action@v2.18.0
- name: Run checks
run: ./.ci/aui/runChecks.sh

Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
image: database-migrator

- dockerfile: Applications/EventHandlerService/src/EventHandlerService/Dockerfile
image: event-handler-service
image: event-handler

- dockerfile: Applications/FilesSanityCheck/src/FilesSanityCheck/Dockerfile
image: files-sanity-check
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-${{ matrix.image }}-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-${{ matrix.image }}-cache-new
outputs: type=docker,dest=/tmp/${{ matrix.image }}.tar
tags: ${{ matrix.image }}:0.0.1
tags: ghcr.io/nmshd/backbone-${{ matrix.image }}:0.0.1

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -306,6 +306,8 @@ jobs:
NMSHD_TEST_CLIENTSECRET: test
NMSHD_TEST_BASEURL_ADMIN_API: http://localhost:5173
NMSHD_TEST_ADMIN_API_KEY: test
APPSETTINGS_OVERRIDE_LOCATION: ${{ github.workspace }}/backbone/.ci/appsettings.override.${{matrix.database}}.docker.json
BACKBONE_VERSION: 0.0.1
run: npm run test:local:lokijs

- name: Save Docker Logs
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ Generated_Code/
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
Expand Down
32 changes: 16 additions & 16 deletions .run/SSE Server.run.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SSE Server" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/Applications/SseServer/src/SseServer/SseServer.csproj"/>
<option name="LAUNCH_PROFILE_TFM" value="net8.0"/>
<option name="LAUNCH_PROFILE_NAME" value="Default"/>
<option name="USE_EXTERNAL_CONSOLE" value="0"/>
<option name="USE_MONO" value="0"/>
<option name="RUNTIME_ARGUMENTS" value=""/>
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1"/>
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0"/>
<option name="SEND_DEBUG_REQUEST" value="1"/>
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value=""/>
<method v="2">
<option name="Build"/>
</method>
</configuration>
</component>
<configuration default="false" name="SSE Server" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/Applications/SseServer/src/SseServer/SseServer.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net9.0" />
<option name="LAUNCH_PROFILE_NAME" value="Default" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
7 changes: 4 additions & 3 deletions Applications/AdminApi/src/AdminApi/AdminApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.1.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="5.8.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.24.0" />
<PackageReference Include="ReHackt.Extensions.Options.Validation" Version="9.0.0" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.1.2" />
<PackageReference Include="Serilog.Enrichers.Demystifier" Version="1.0.3" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.1" />
Expand All @@ -29,6 +28,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\BuildingBlocks\src\BuildingBlocks.API\BuildingBlocks.API.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Announcements\src\Announcements.Application\Announcements.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Announcements\src\Announcements.Infrastructure\Announcements.Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.Application\Challenges.Application.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Challenges\src\Challenges.Infrastructure\Challenges.Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\Modules\Devices\src\Devices.Application\Devices.Application.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ public class AdminConfiguration

public CorsConfiguration Cors { get; set; } = new();

public SwaggerUiConfiguration SwaggerUi { get; set; } = new();

[Required]
public AdminInfrastructureConfiguration Infrastructure { get; set; } = new();

Expand All @@ -30,12 +28,6 @@ public class CorsConfiguration
public bool AccessControlAllowCredentials { get; set; } = false;
}

public class SwaggerUiConfiguration
{
[Required]
public bool Enabled { get; set; } = false;
}

public class AdminInfrastructureConfiguration
{
[Required]
Expand All @@ -46,6 +38,9 @@ public class AdminInfrastructureConfiguration

public class ModulesConfiguration
{
[Required]
public AnnouncementsConfiguration Announcements { get; set; } = new();

[Required]
public DevicesConfiguration Devices { get; set; } = new();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
using Backbone.Modules.Announcements.Application;

namespace Backbone.AdminApi.Configuration;

public class AnnouncementsConfiguration
{
[Required]
public ApplicationOptions Application { get; set; } = new();

[Required]
public InfrastructureConfiguration Infrastructure { get; set; } = new();

public class InfrastructureConfiguration
{
[Required]
public SqlDatabaseConfiguration SqlDatabase { get; set; } = new();

public class SqlDatabaseConfiguration
{
[Required]
[MinLength(1)]
[RegularExpression("SqlServer|Postgres")]
public string Provider { get; set; } = string.Empty;

[Required]
[MinLength(1)]
public string ConnectionString { get; set; } = string.Empty;

[Required]
public bool EnableHealthCheck { get; set; } = true;
}
}
}
Loading

0 comments on commit f77730b

Please sign in to comment.