Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(1.8.0-RC5): merge main into dev #493

Merged
merged 16 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/administration-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- 'src/notifications/**'
- 'src/portalbackend/**'
- 'src/provisioning/**'
- 'src/web/**'
# workflow file
- '.github/workflows/administration-service.yml'
# dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintenance-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ on:
push:
paths:
# service and transitive paths
- 'src/maintenance/Maintenance.App/**'
- 'src/framework/**'
- 'src/maintenance/Maintenance.App/**'
- 'src/portalbackend/PortalBackend.PortalEntities/**'
# workflow file
- '.github/workflows/maintenance-service.yml'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/marketplace-app-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ on:
paths:
# service and transitive paths
- 'src/marketplace/Apps.Service/**'
- 'src/marketplace/Offers.Library/**'
- 'src/framework/**'
- 'src/keycloak/**'
- 'src/mailing/**'
- 'src/notifications/**'
- 'src/portalbackend/**'
- 'src/web/**'
# workflow file
- '.github/workflows/marketplace-app-service.yml'
# dockerfile
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/notification-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
- 'src/framework/**'
- 'src/keycloak/**'
- 'src/portalbackend/**'
- 'src/web/**'
# workflow file
- '.github/workflows/notification-service.yml'
# dockerfile
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/nuget-package-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
###############################################################
# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: Push Nuget Packages and Tag

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['7.0']
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Install dependencies
run: dotnet restore src

- name: Build
run: dotnet build src --configuration Release --no-restore

- name: Check Package Suffix Versions
shell: bash
run: |
script_output=$(./scripts/no_suffix_check.sh)

if [ -z "$script_output" ]; then
echo "No version suffixes set"
else
echo "the following packages have a suffix version set, please remove them:"
echo "$script_output"
exit 1
fi

- name: Push nuget packages
shell: bash
run: |
bash ./scripts/pack_and_push_packages.sh --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

- name: Get new version
id: nugetPackageVersion
shell: bash
run: |
current_version=$(./scripts/get_current_version.sh)
echo "version=$current_version" >> "$GITHUB_OUTPUT"

- name: Create git tag
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.nugetPackageVersion.outputs.version }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################
# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
# Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -17,7 +17,9 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: Unit-Tests and Formatting
# This workflow builds all services and related projects, checks the formatting and if all tests are passing.
# If framework related code changed, all steps mentioned above will happen for framework related code as well as a check for a version update of the nuget packages will be made
name: Pre Checks

on:
push:
Expand All @@ -27,15 +29,32 @@ on:
workflow_dispatch:

jobs:
build:

changes:
name: Get changed paths
runs-on: ubuntu-latest
outputs:
framework: ${{ steps.changes.outputs.framework }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
framework:
- 'src/framework/**'

checkServices:
name: Build, check and test services
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['7.0']

steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v2
with:
Expand All @@ -50,3 +69,27 @@ jobs:
run: dotnet format src --verify-no-changes --no-restore
- name: Test
run: dotnet test src --filter FullyQualifiedName\!~Org.Eclipse.TractusX.Portal.Backend.EndToEnd.Tests --no-restore --verbosity normal

checkFramework:
name: Check nuget packages
needs: changes
if: ${{ needs.changes.outputs.framework == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Package Versions
shell: bash
run: |
script_output=$(./scripts/nuget_version_check.sh origin/${{ github.event.pull_request.base.ref }})

if [ -z "$script_output" ]; then
echo "Expected version updates were made"
else
echo "the following packages need a version update:"
echo "$script_output"
echo "Please see https://github.com/eclipse-tractusx/portal-backend/blob/main/src/framework/README.md for further information"
exit 1
fi
3 changes: 2 additions & 1 deletion .github/workflows/processes-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ on:
push:
paths:
# service and transitive paths
- 'src/framework/**'
- 'src/processes/Processes.ProcessIdentity/**'
- 'src/processes/Processes.Worker/**'
- 'src/processes/ApplicationChecklist.Library/**'
- 'src/processes/ApplicationChecklist.Executor/**'
- 'src/processes/NetworkRegistration.Library/**'
- 'src/processes/NetworkRegistration.Executor/**'
- 'src/externalsystems/**'
- 'src/framework/**'
- 'src/portalbackend/PortalBackend.PortalEntities/**'
# workflow file
- '.github/workflows/processes-worker.yml'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/registration-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ on:
push:
paths:
# service and transitive paths
- 'src/registration/**'
- 'src/framework/**'
- 'src/registration/**'
- 'src/keycloak/**'
- 'src/mailing/**'
- 'src/portalbackend/**'
- 'src/provisioning/**'
- 'src/web/**'
# workflow file
- '.github/workflows/registration-service.yml'
# dockerfile
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/services-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ on:
push:
paths:
# service and transitive paths
- 'src/framework/**'
- 'src/marketplace/Services.Service/**'
- 'src/marketplace/Offers.Library/**'
- 'src/framework/**'
- 'src/keycloak/**'
- 'src/notifications/**'
- 'src/portalbackend/**'
- 'src/web/**'
# workflow file
- '.github/workflows/services-service.yml'
# dockerfile
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ New features, fixed bugs, known defects and other noteworthy changes to each rel

## 1.8.0-RC4

### Change
* Registration Service
* adjust endpoint GET: /api/registration/applications to additionally response the registrationType

### Feature
* Mailing
* make the sender email configurable
* IdentityProvider
* add more metadata to identityProvider details

### Technical Support
* Nuget Packages
* Provide Framework Packages as Nuget Packages
* add new keycloak user to delete idps
* Bpdm Push
* ignore nullable values
* set the sharing state to ready
* Company Certificates
* add database structure for company certificates
* add seeding for company certificates

### Known Knowns
n/a

## 1.8.0-RC4

### Change
* updated response body of the GET: /api/administration/user/owncompany/users endpoint by changing the "role" section to an array to include role client information ![Tag](https://img.shields.io/static/v1?label=&message=BreakingChange&color=yellow&style=flat)
* pattern harmonization of 'company name' insert endpoints
Expand Down
2 changes: 2 additions & 0 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ nuget/nuget/-/Serilog.Extensions.Hosting/7.0.0, Apache-2.0, approved, #10078
nuget/nuget/-/Serilog.Extensions.Logging/7.0.0, Apache-2.0, approved, #10070
nuget/nuget/-/Serilog.Formatting.Compact/1.1.0, Apache-2.0, approved, #11115
nuget/nuget/-/Serilog.Settings.Configuration/7.0.0, Apache-2.0, approved, #10069
nuget/nuget/-/Serilog.Sinks.Console/4.0.1, Apache-2.0, approved, #12858
nuget/nuget/-/Serilog.Sinks.Console/4.1.0, Apache-2.0, approved, #8434
nuget/nuget/-/Serilog.Sinks.Debug/2.0.0, Apache-2.0, approved, clearlydefined
nuget/nuget/-/Serilog.Sinks.File/5.0.0, Apache-2.0, approved, #11116
nuget/nuget/-/Serilog/2.12.0, Apache-2.0, approved, #8435
nuget/nuget/-/Serilog/3.0.1, Apache-2.0, approved, #10063
nuget/nuget/-/SharpZipLib/1.4.2, MIT AND GFDL-1.3-or-later AND (Apache-2.0 AND MIT) AND WTFPL AND bzip2-1.0.6 AND LicenseRef-Permissive-license-with-conditions AND LicenseRef-Permission-Notice, approved, #10058
nuget/nuget/-/SshNet.Security.Cryptography/1.3.0, MIT, approved, clearlydefined
Expand Down
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ This application provides container images for demonstration purposes.

### DockerHub

* https://hub.docker.com/r/tractusx/portal-registration-service
* https://hub.docker.com/r/tractusx/portal-administration-service
* https://hub.docker.com/r/tractusx/portal-marketplace-app-service
* https://hub.docker.com/r/tractusx/portal-services-service
* https://hub.docker.com/r/tractusx/portal-notification-service
* https://hub.docker.com/r/tractusx/portal-processes-worker
* https://hub.docker.com/r/tractusx/portal-portal-migrations
* https://hub.docker.com/r/tractusx/portal-provisioning-migrations
* https://hub.docker.com/r/tractusx/portal-maintenance-service
* [portal-registration-service](https://hub.docker.com/r/tractusx/portal-registration-service)
* [portal-administration-service](https://hub.docker.com/r/tractusx/portal-administration-service)
* [portal-marketplace-app-service](https://hub.docker.com/r/tractusx/portal-marketplace-app-service)
* [portal-services-service](https://hub.docker.com/r/tractusx/portal-services-service)
* [portal-notification-service](https://hub.docker.com/r/tractusx/portal-notification-service)
* [portal-processes-worker](https://hub.docker.com/r/tractusx/portal-processes-worker)
* [portal-portal-migrations](https://hub.docker.com/r/tractusx/portal-portal-migrations)
* [portal-provisioning-migrations](https://hub.docker.com/r/tractusx/portal-provisioning-migrations)
* [portal-maintenance-service](https://hub.docker.com/r/tractusx/portal-maintenance-service)

### Base images

Expand All @@ -60,6 +60,29 @@ mcr.microsoft.com/dotnet/runtime:7.0-alpine:
* GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker)
* DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime)

## Notice for Nuget Packages

This application provides nuget packages to share functionalities across different repos. To see how the development and update of nuget packages is working please have a look at the [documentation](/docs/nuget/update-nuget-packages.md).

### Nuget

* [Org.Eclipse.TractusX.Portal.Backend.Framework.Async](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Async/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Cors](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Cors/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DBAccess/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.DependencyInjection/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Library/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling.Web/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.IO](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.IO/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Linq](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Linq/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Logging](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Logging/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Models](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Models/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Swagger/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Token](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Token/)
* [Org.Eclipse.TractusX.Portal.Backend.Framework.Web](https://www.nuget.org/packages/Org.Eclipse.TractusX.Portal.Backend.Framework.Web/)

## License

Distributed under the Apache 2.0 License.
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile-administration-service
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ WORKDIR /src/administration/Administration.Service
RUN dotnet publish "Administration.Service.csproj" -c Release -o /app/publish

FROM base AS final
ENV COMPlus_EnableDiagnostics=0
WORKDIR /app
COPY --from=publish /app/publish .
ENV ASPNETCORE_URLS http://+:8080
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile-iam-seeding
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine-amd64 AS publish
WORKDIR /
COPY LICENSE NOTICE.md DEPENDENCIES /
COPY /src/framework/Framework.Async /src/framework/Framework.Async
COPY /src/framework/Framework.ErrorHandling.Library /src/framework/Framework.ErrorHandling.Library
COPY /src/framework/Framework.ErrorHandling /src/framework/Framework.ErrorHandling
COPY /src/framework/Framework.Linq /src/framework/Framework.Linq
COPY /src/framework/Framework.Logging /src/framework/Framework.Logging
COPY /src/framework/Framework.Models /src/framework/Framework.Models
Expand All @@ -35,6 +35,7 @@ WORKDIR /src/keycloak/Keycloak.Seeding
RUN dotnet publish "Keycloak.Seeding.csproj" -c Release -o /app/publish

FROM base AS final
ENV COMPlus_EnableDiagnostics=0
WORKDIR /app
COPY --from=publish /app/publish .
RUN chown -R 1000:3000 /app
Expand Down
10 changes: 4 additions & 6 deletions docker/Dockerfile-maintenance-service
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,22 @@ COPY LICENSE NOTICE.md DEPENDENCIES /
COPY src/maintenance/Maintenance.App/ src/maintenance/Maintenance.App/
COPY src/portalbackend/PortalBackend.DBAccess/ src/portalbackend/PortalBackend.DBAccess/
COPY src/portalbackend/PortalBackend.PortalEntities/ src/portalbackend/PortalBackend.PortalEntities/
COPY src/framework/Framework.BaseDependencies/ src/framework/Framework.BaseDependencies/
COPY src/framework/Framework.DBAccess/ src/framework/Framework.DBAccess/
COPY src/framework/Framework.Linq/ src/framework/Framework.Linq/
COPY src/framework/Framework.Models/ src/framework/Framework.Models/
COPY src/framework/Framework.Logging/ src/framework/Framework.Logging/
COPY src/framework/Framework.Seeding/ src/framework/Framework.Seeding/
COPY src/framework/Framework.ErrorHandling.Library/ src/framework/Framework.ErrorHandling.Library/
COPY src/framework/Framework.ProcessIdentity/ src/framework/Framework.ProcessIdentity/
COPY /src/framework/Framework.DateTimeProvider /src/framework/Framework.DateTimeProvider
COPY src/framework/Framework.ErrorHandling/ src/framework/Framework.ErrorHandling/
COPY src/framework/Framework.DateTimeProvider/ src/framework/Framework.DateTimeProvider/
COPY src/processes/Processes.ProcessIdentity/ src/processes/Processes.ProcessIdentity/
RUN dotnet restore "src/maintenance/Maintenance.App/Maintenance.App.csproj"
WORKDIR /src/maintenance/Maintenance.App
RUN dotnet publish "Maintenance.App.csproj" -c Release -o /app/publish

FROM base AS final
ENV COMPlus_EnableDiagnostics=0
WORKDIR /app
COPY --from=publish /app/publish .
ENV ASPNETCORE_URLS http://+:8080
EXPOSE 8080
RUN chown -R 1000:3000 /app
USER 1000:3000
ENTRYPOINT ["dotnet", "Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.dll"]
Loading
Loading