diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index c3452c6..5d418b3 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -59,8 +59,11 @@ jobs: - name: List packages run: dotnet list src package --include-transitive --interactive | grep ">" | grep -Pv "\s(Org.Eclipse.TractusX|Microsoft|NuGet|System|runtime|docker|Docker|NETStandard)" | sed -E -e "s/\s+> ([a-zA-Z\.\-]+).+\s([0-9]+\.[0-9]+\.[0-9]+)\s*/nuget\/nuget\/\-\/\1\/\2/g" | awk '!seen[$0]++' > PACKAGES + - name: Download Eclipse Dash Tool + run: curl -L --output ./org.eclipse.dash.licenses.jar 'https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST' + - name: Generate Dependencies file - run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.1.1.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true + run: java -jar ./org.eclipse.dash.licenses.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true - name: Check if dependencies were changed id: dependencies-changed diff --git a/.github/workflows/quality-gate-checks.yml b/.github/workflows/quality-gate-checks.yml new file mode 100644 index 0000000..b20a1fa --- /dev/null +++ b/.github/workflows/quality-gate-checks.yml @@ -0,0 +1,32 @@ +# +# Copyright (c) 2024 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: "Quality Checks (Release Guidelines)" + +on: + workflow_dispatch: + pull_request: + branches: + - main + +jobs: + check-quality: + name: Check quality guidelines + uses: eclipse-tractusx/sig-infra/.github/workflows/reusable-quality-checks.yaml@main + secrets: inherit \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4ab2e..bc2f419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.0.0](https://github.com/eclipse-tractusx/policy-hub/compare/v1.0.0-rc.2...v1.0.0) (2024-05-23) + + +### Bug Fixes + +* **helm:** change ingress to work without tls enabled ([fd7a634](https://github.com/eclipse-tractusx/policy-hub/commit/fd7a634125d2f3ae9313f541ffec0c352059c535)) + + +### Miscellaneous Chores + +* release 1.0.0 ([f289e1d](https://github.com/eclipse-tractusx/policy-hub/commit/f289e1d20ba8adee5e98de3b089188c8eae39e4d)) + ## [1.0.0-rc.2](https://github.com/eclipse-tractusx/policy-hub/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2024-05-16) diff --git a/README.md b/README.md index 5500c69..32d2cfe 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This repository contains the backend code for the Policy-Hub written in C#. +For **information about the policy hub**, please refer to the documentation, especially the context and scope section in the [architecture documentation](./docs/architecture). + For **installation** details, please refer to the [README.md](./charts/policy-hub/README.md) of the provided helm chart. ## How to build and run diff --git a/charts/policy-hub/Chart.yaml b/charts/policy-hub/Chart.yaml index 242c48f..394ff3c 100644 --- a/charts/policy-hub/Chart.yaml +++ b/charts/policy-hub/Chart.yaml @@ -20,8 +20,8 @@ apiVersion: v2 name: policy-hub type: application -version: 1.0.0-rc.2 -appVersion: 1.0.0-rc.2 +version: 1.0.0 +appVersion: 1.0.0 description: Helm chart for Policy Hub home: https://github.com/eclipse-tractusx/policy-hub dependencies: diff --git a/charts/policy-hub/README.md b/charts/policy-hub/README.md index f28b10a..58caadf 100644 --- a/charts/policy-hub/README.md +++ b/charts/policy-hub/README.md @@ -6,6 +6,12 @@ For further information please refer to [Technical Documentation](../../docs/tec The referenced container images are for demonstration purposes only. +## Prerequisites + +- [Kubernetes](https://kubernetes.io) 1.25.11+ +- [Helm](https://helm.sh) 3.9.3+ +- PV provisioner support in the underlying infrastructure + ## Installation To install the chart with the release name `policy-hub`: @@ -27,7 +33,7 @@ To use the helm chart as a dependency: dependencies: - name: policy-hub repository: https://eclipse-tractusx.github.io/charts/dev - version: 1.0.0-rc.2 + version: 1.0.0 ``` ## Requirements @@ -87,8 +93,7 @@ dependencies: | centralidp.address | string | `"https://centralidp.example.org"` | Provide centralidp base address (CX IAM), without trailing '/auth'. | | centralidp.useAuthTrail | bool | `true` | Flag if the api should be used with an leading /auth path | | ingress.enabled | bool | `false` | Policy Hub ingress parameters, enable ingress record generation for policy-hub. | -| ingress.tls[0] | object | `{"hosts":[""],"secretName":""}` | Provide tls secret. | -| ingress.tls[0].hosts | list | `[""]` | Provide host for tls secret. | +| ingress.tls | list | `[]` | Ingress TLS configuration | | ingress.hosts[0] | object | `{"host":"","paths":[{"path":"/api/policy-hub","pathType":"Prefix"}]}` | Provide default path for the ingress record. | | portContainer | int | `8080` | | | portService | int | `8080` | | diff --git a/charts/policy-hub/README.md.gotmpl b/charts/policy-hub/README.md.gotmpl index 42a9589..4a27da7 100644 --- a/charts/policy-hub/README.md.gotmpl +++ b/charts/policy-hub/README.md.gotmpl @@ -6,6 +6,12 @@ For further information please refer to [Technical Documentation](../../docs/tec The referenced container images are for demonstration purposes only. +## Prerequisites + +- [Kubernetes](https://kubernetes.io) 1.25.11+ +- [Helm](https://helm.sh) 3.9.3+ +- PV provisioner support in the underlying infrastructure + ## Installation To install the chart with the release name `{{ template "chart.name" . }}`: diff --git a/charts/policy-hub/values.yaml b/charts/policy-hub/values.yaml index c9a9a77..51746dd 100644 --- a/charts/policy-hub/values.yaml +++ b/charts/policy-hub/values.yaml @@ -155,12 +155,11 @@ ingress: # nginx.ingress.kubernetes.io/proxy-body-size: "8m" # # -- Provide CORS allowed origin. # nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.example.org" - tls: - # -- Provide tls secret. - - secretName: "" - # -- Provide host for tls secret. - hosts: - - "" + # -- Ingress TLS configuration + tls: [] + # - secretName: "" + # hosts: + # - "" hosts: # -- Provide default path for the ingress record. - host: "" diff --git a/consortia/argocd-app-templates/appsetup-beta.yaml b/consortia/argocd-app-templates/appsetup-beta.yaml index 07b2d1d..3f56806 100644 --- a/consortia/argocd-app-templates/appsetup-beta.yaml +++ b/consortia/argocd-app-templates/appsetup-beta.yaml @@ -28,7 +28,7 @@ spec: source: path: charts/policy-hub repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git' - targetRevision: policy-hub-1.0.0-rc.2 + targetRevision: policy-hub-1.0.0 plugin: env: - name: AVP_SECRET diff --git a/consortia/argocd-app-templates/appsetup-int.yaml b/consortia/argocd-app-templates/appsetup-int.yaml index f77dfc3..aa06b35 100644 --- a/consortia/argocd-app-templates/appsetup-int.yaml +++ b/consortia/argocd-app-templates/appsetup-int.yaml @@ -28,7 +28,7 @@ spec: source: path: charts/policy-hub repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git' - targetRevision: policy-hub-1.0.0-rc.2 + targetRevision: policy-hub-1.0.0 plugin: env: - name: AVP_SECRET diff --git a/consortia/argocd-app-templates/appsetup-pen.yaml b/consortia/argocd-app-templates/appsetup-pen.yaml index 921962e..dbb81f1 100644 --- a/consortia/argocd-app-templates/appsetup-pen.yaml +++ b/consortia/argocd-app-templates/appsetup-pen.yaml @@ -28,7 +28,7 @@ spec: source: path: charts/policy-hub repoURL: 'https://github.com/eclipse-tractusx/policy-hub.git' - targetRevision: policy-hub-1.0.0-rc.2 + targetRevision: policy-hub-1.0.0 plugin: env: - name: AVP_SECRET diff --git a/consortia/argocd-app-templates/appsetup-stable.yaml b/consortia/argocd-app-templates/appsetup-stable.yaml index 5e9ba3c..48487ba 100644 --- a/consortia/argocd-app-templates/appsetup-stable.yaml +++ b/consortia/argocd-app-templates/appsetup-stable.yaml @@ -29,7 +29,7 @@ spec: source: path: '' repoURL: 'https://eclipse-tractusx.github.io/charts/dev' - targetRevision: policy-hub-1.0.0-rc.2 + targetRevision: policy-hub-1.0.0 plugin: env: - name: HELM_VALUES diff --git a/scripts/check-dependencies.md b/scripts/check-dependencies.md deleted file mode 100644 index 8b9f8c1..0000000 --- a/scripts/check-dependencies.md +++ /dev/null @@ -1,17 +0,0 @@ -# Check dependencies - -Dependencies are checked by the [Eclipse Dash License Tool](https://github.com/eclipse/dash-licenses) with a GitHub workflow (dependencies.yaml). - -This workflow uses the executable jar in the download directory. - -In order to update the executable jar run the following command from the root directory: - - curl -L --output ./scripts/download/org.eclipse.dash.licenses-1.1.1.jar 'https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST' - -## NOTICE - -This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - -- SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation -- Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/scripts/download/org.eclipse.dash.licenses-1.1.1.jar b/scripts/download/org.eclipse.dash.licenses-1.1.1.jar deleted file mode 100644 index 2a031d6..0000000 Binary files a/scripts/download/org.eclipse.dash.licenses-1.1.1.jar and /dev/null differ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f9cbfd4..e1ebec3 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -20,6 +20,6 @@ 1.0.0 - rc.2 + diff --git a/src/database/PolicyHub.Entities/Entities/IActiveEntity.cs b/src/database/PolicyHub.Entities/Entities/IActiveEntity.cs index f95f029..3e6c594 100644 --- a/src/database/PolicyHub.Entities/Entities/IActiveEntity.cs +++ b/src/database/PolicyHub.Entities/Entities/IActiveEntity.cs @@ -1,3 +1,22 @@ +/******************************************************************************** + * Copyright (c) 2024 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 + ********************************************************************************/ + namespace Org.Eclipse.TractusX.PolicyHub.Entities.Entities; public interface IActiveEntity diff --git a/src/database/PolicyHub.Migrations/Seeder/BatchUpdateSeeder.cs b/src/database/PolicyHub.Migrations/Seeder/BatchUpdateSeeder.cs index c8a74b6..9450b2a 100644 --- a/src/database/PolicyHub.Migrations/Seeder/BatchUpdateSeeder.cs +++ b/src/database/PolicyHub.Migrations/Seeder/BatchUpdateSeeder.cs @@ -1,3 +1,22 @@ +/******************************************************************************** + * Copyright (c) 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 + ********************************************************************************/ + using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Org.Eclipse.TractusX.PolicyHub.Entities; diff --git a/tests/database/PolicyHub.DbAccess.Tests/HubRepositoriesTests.cs b/tests/database/PolicyHub.DbAccess.Tests/HubRepositoriesTests.cs index 2e01a2c..eac3053 100644 --- a/tests/database/PolicyHub.DbAccess.Tests/HubRepositoriesTests.cs +++ b/tests/database/PolicyHub.DbAccess.Tests/HubRepositoriesTests.cs @@ -1,3 +1,22 @@ +/******************************************************************************** + * Copyright (c) 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 + ********************************************************************************/ + using Org.Eclipse.TractusX.PolicyHub.DbAccess.Repositories; using Org.Eclipse.TractusX.PolicyHub.DbAccess.Tests.Setup; using Xunit.Extensions.AssemblyFixture;