Skip to content

Commit

Permalink
chore: complete merge
Browse files Browse the repository at this point in the history
  • Loading branch information
eschrewe committed Jul 9, 2024
1 parent 9127f17 commit dc0be2f
Show file tree
Hide file tree
Showing 38 changed files with 628 additions and 369 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-image-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ env:
IMAGE_NAME: "app-puris-backend"

jobs:
docker:
docker-backend:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
Expand All @@ -59,6 +59,7 @@ jobs:
cp ./LICENSE ./backend/LICENSE
cp ./NOTICE.md ./backend/NOTICE.md
cp ./SECURITY.md ./backend/SECURITY.md
cp ./LICENSE_non_code ././frontend/LICENSE_non_code
# Needed to create multi-platfrom image
- name: Set up Docker Buildx
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-image-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ env:
REPOSITORY: "${{ github.repository }}"

jobs:
docker:
docker-frontend:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -91,6 +91,7 @@ jobs:
cp ./LICENSE ./frontend/LICENSE
cp ./NOTICE.md ./frontend/NOTICE.md
cp ./SECURITY.md ./frontend/SECURITY.md
cp ./LICENSE_non_code ././frontend/LICENSE_non_code
# Needed to create multi-platfrom image
- name: Set up Docker Buildx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze CodeQl
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
fi
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }}
run: ct lint --validate-maintainers=false --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }}

- name: Run chart-testing (install)
run: |
Expand All @@ -126,3 +126,11 @@ jobs:
helm dependency update charts/puris
helm upgrade puris charts/puris
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'

# check version increment should fail separately
# we don't directly release a chart and thus maybe don't need to increase the version.
# to enable this behaviour otterdog has been reconfigured
- name: Run chart-testing (version update)
id: version-check
run: |
ct lint --validate-maintainers=false --check-version-increment=true --target-branch ${{ github.event.repository.default_branch }}
2 changes: 1 addition & 1 deletion .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze KICS
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ Catena-X alliance focusing on parts traceability.

* https://projects.eclipse.org/projects/automotive.tractusx

## Project licenses

The Tractus-X project uses the following licenses:

* Apache-2.0 for code
* CC-BY-4.0 for non-code

## Terms of Use

This repository is subject to the Terms of Use of the Eclipse Foundation

* https://www.eclipse.org/legal/termsofuse.php

## Developer resources

Information regarding source code management, builds, coding standards, and
Expand Down
15 changes: 12 additions & 3 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ source code repository logs.

## Declared Project Licenses

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.
The Tractus-X project uses the following licenses:

- Apache-2.0 for code
- CC-BY-4.0 for non-code

Apache-2.0:
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.
SPDX-License-Identifier: Apache-2.0

CC-BY-4.0:
The materials in this repository are made available under the terms of the Creative Commons Attribution 4.0 International License, which is available at https://spdx.org/licenses/CC-BY-4.0.html.
SPDX-License-Identifier: CC-BY-4.0



## Source Code

The project maintains the following source code repositories
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY src/ /app/src/
RUN mvn clean package -DskipTests

# Copy Legal information for distributions, the star ones are copied by workflow
COPY DOCKER_NOTICE.md README.md NOTICE.md* SECURITY.md* LICENSE* DEPENDENCIES* /app/legal/
COPY DOCKER_NOTICE.md README.md NOTICE.md* SECURITY.md* LICENSE* DEPENDENCIES* LICENSE_non_code* /app/legal/

FROM eclipse-temurin:21-jre-alpine
RUN mkdir /opt/app
Expand Down
24 changes: 12 additions & 12 deletions backend/NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ source code repository logs.

## Declared Project Licenses

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.
The Tractus-X project uses the following licenses:

- Apache-2.0 for code
- CC-BY-4.0 for non-code

Apache-2.0:
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.
SPDX-License-Identifier: Apache-2.0

CC-BY-4.0:
The materials in this repository are made available under the terms of the Creative Commons Attribution 4.0 International License, which is available at https://spdx.org/licenses/CC-BY-4.0.html.
SPDX-License-Identifier: CC-BY-4.0

## Source Code

The project maintains the following source code repositories
Expand All @@ -32,16 +39,9 @@ in the GitHub organization https://github.com/eclipse-tractusx:

## Third-party Content

This project leverages the following third party content.

See `DEPENDENCIES_FRONTEND` and `DEPENDENCIES_BACKEND` file. Further, the following third-party content is used that
isn't listed in any DEPENDENCIES file:
This project leverages the following third party content:

feather (4.29)
* License: MIT License
* Licence Path: https://github.com/feathericons/feather/blob/master/LICENSE
* Project URL: https://feathericons.com/
* Source URL: https://github.com/feathericons/feather
See `DEPENDENCIES_BACKEND` file.

## Cryptography

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ private void setupCustomerRole() throws JsonProcessingException {
.directionCharacteristic(DirectionCharacteristic.INBOUND)
.requestType("ItemStock")
.sammVersion("2.0")
.responseCode(201)
.build();
mockRequest = erpAdapterRequestService.create(mockRequest);
log.info("Created mocked ErpAdapterRequest: \n{}", mockRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.tractusx.puris.backend.common.edc.domain.model.SubmodelType;
import org.eclipse.tractusx.puris.backend.common.edc.domain.model.AssetType;
import org.eclipse.tractusx.puris.backend.common.util.VariablesService;
import org.eclipse.tractusx.puris.backend.masterdata.domain.model.Material;
import org.eclipse.tractusx.puris.backend.masterdata.domain.model.MaterialPartnerRelation;
Expand Down Expand Up @@ -95,9 +95,9 @@ public JsonNode createMaterialRegistrationRequestBody(MaterialPartnerRelation ma
href = href.endsWith("/") ? href : href + "/";
href += materialPartnerRelation.getPartnerCXNumber() + "/";

submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.ITEM_STOCK.URN_SEMANTIC_ID, href + DirectionCharacteristic.INBOUND + "/", variablesService.getItemStockSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.DEMAND.URN_SEMANTIC_ID, href, variablesService.getDemandSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.DELIVERY.URN_SEMANTIC_ID, href, variablesService.getDeliverySubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.ITEM_STOCK_SUBMODEL.URN_SEMANTIC_ID, href + DirectionCharacteristic.INBOUND + "/", variablesService.getItemStockSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.DEMAND_SUBMODEL.URN_SEMANTIC_ID, href, variablesService.getDemandSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.DELIVERY_SUBMODEL.URN_SEMANTIC_ID, href, variablesService.getDeliverySubmodelApiAssetId()));

log.debug("Created body for material " + material.getOwnMaterialNumber() + "\n" + body.toPrettyString());
return body;
Expand Down Expand Up @@ -142,9 +142,9 @@ public JsonNode createProductRegistrationRequestBody(Material material, String p
href = href.endsWith("/") ? href : href + "/";
href += material.getMaterialNumberCx() + "/";

submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.ITEM_STOCK.URN_SEMANTIC_ID, href + DirectionCharacteristic.OUTBOUND + "/", variablesService.getItemStockSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.PRODUCTION.URN_SEMANTIC_ID, href, variablesService.getProductionSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(SubmodelType.DELIVERY.URN_SEMANTIC_ID, href, variablesService.getDeliverySubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.ITEM_STOCK_SUBMODEL.URN_SEMANTIC_ID, href + DirectionCharacteristic.OUTBOUND + "/", variablesService.getItemStockSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.PRODUCTION_SUBMODEL.URN_SEMANTIC_ID, href, variablesService.getProductionSubmodelApiAssetId()));
submodelDescriptorsArray.add(createSubmodelObject(AssetType.DELIVERY_SUBMODEL.URN_SEMANTIC_ID, href, variablesService.getDeliverySubmodelApiAssetId()));
submodelDescriptorsArray.add(createPartTypeSubmodelObject(material.getOwnMaterialNumber()));

log.debug("Created body for product " + material.getOwnMaterialNumber() + "\n" + body.toPrettyString());
Expand Down Expand Up @@ -238,7 +238,7 @@ private JsonNode createPartTypeSubmodelObject(String materialId) {
String href = variablesService.getEdcDataplanePublicUrl();
href = href.endsWith("/") ? href : href + "/";
href += Base64.getEncoder().encodeToString(materialId.getBytes(StandardCharsets.UTF_8));
return createSubmodelObject(SubmodelType.PART_TYPE_INFORMATION.URN_SEMANTIC_ID, href, variablesService.getPartTypeSubmodelApiAssetId());
return createSubmodelObject(AssetType.PART_TYPE_INFORMATION_SUBMODEL.URN_SEMANTIC_ID, href, variablesService.getPartTypeSubmodelApiAssetId());
}

}

This file was deleted.

Loading

0 comments on commit dc0be2f

Please sign in to comment.