Skip to content

Commit

Permalink
Merge branch 'main' into fix/bugfix-for-release-2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann authored Apr 21, 2023
2 parents 82a6ca2 + ac7e82b commit 3976afd
Show file tree
Hide file tree
Showing 255 changed files with 15,648 additions and 3,531 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
fetch-depth: 0

- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v1
uses: container-tools/kind-action@v2

- name: Build image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand All @@ -36,7 +36,7 @@ jobs:
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1
uses: helm/chart-testing-action@v2.4.0

- name: Run chart-testing (list-changed)
id: list-changed
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/irs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
mvn clean verify --batch-mode
analyze_with_Sonar:
# No need to run if we cannot use the sonar token
if: >-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -117,14 +121,20 @@ jobs:
- name: Log in to registry
env:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
if: env.DOCKER_HUB_USER == ''
if: >-
env.DOCKER_HUB_USER == '' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image (GHCR)
env:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
if: env.DOCKER_HUB_USER == ''
if: >-
env.DOCKER_HUB_USER == '' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}
# Change all uppercase to lowercase
Expand Down Expand Up @@ -170,6 +180,9 @@ jobs:
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}

trigger-trivy-image-scan:
if: >-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
needs:
- build_images
uses: ./.github/workflows/trivy-image-scan.yml
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/irs-load-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Cache maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Run Gatling tests
env:
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/jira-publish-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Jira release publishing

on:
workflow_dispatch: # Trigger manually
inputs:
version:
required: true
type: string
description: Version that will be released in Jira, eg. 2.0.0

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Echo current date
run: echo $NOW

- name: Get Version Id Of Release
env:
JIRA_USERNAME: ${{ secrets.RELEASE_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.RELEASE_IRS_JIRA_PASSWORD }}
run: |
versionId=$(curl --request GET --url 'https://jira.catena-x.net/rest/api/latest/project/10211/versions' \
--user $JIRA_USERNAME:$JIRA_PASSWORD --header 'Accept: application/json' | jq '.[] | select(.name == "NEXT_RELEASE").id')
echo "Exported $versionId as version id to release"
- name: Release Version in Jira
env:
JIRA_USERNAME: ${{ secrets.RELEASE_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.RELEASE_IRS_JIRA_PASSWORD }}
VERSION: ${{ github.event.inputs.version }}
run: |
curl --request PUT --url 'https://jira.catena-x.net/rest/api/latest/version/$versionId' \
--user $JIRA_USERNAME:$JIRA_PASSWORD \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"archived": false,
"description": "$VERSION",
"id": "$versionId",
"name": "$VERSION",
"releaseDate": "$NOW",
"released": true,
"overdue": false,
"projectId": 10211
}'
- name: Create NEXT_RELEASE Version in Jira
env:
JIRA_USERNAME: ${{ secrets.RELEASE_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.RELEASE_IRS_JIRA_PASSWORD }}
run: |
curl --request POST --url 'https://jira.catena-x.net/rest/api/latest/version' \
--user $JIRA_USERNAME:$JIRA_PASSWORD \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"archived": false,
"name": "NEXT_RELEASE",
"projectId": 10211,
"released": false
}'
2 changes: 1 addition & 1 deletion .github/workflows/publish-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
mv docs/src/diagram-replacer/assets/ docs/target/generated-docs/assets/
- name: GitHub Pages action
uses: peaceiris/[email protected].2
uses: peaceiris/[email protected].3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "./docs/target/generated-docs"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
options:
- 'https://irs.int.demo.catena-x.net'
- 'https://irs.dev.demo.catena-x.net'
irs-ess-host:
type: string
description: IRS-ESS environment to test
default: 'https://irs-ess.int.demo.catena-x.net'
required: true
global-asset-id:
type: string
description: Global Asset ID to use for the tests
Expand Down Expand Up @@ -45,6 +50,7 @@ jobs:
- name: Run tests
env:
IRS_HOST: ${{ github.event.inputs.irs-host || 'https://irs.int.demo.catena-x.net' }}
IRS_ESS_HOST: ${{ github.event.inputs.irs-ess-host || 'https://irs-ess.int.demo.catena-x.net' }}
KEYCLOAK_HOST: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_TOKEN_URI }}
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_ID }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_SECRET }}
Expand All @@ -58,10 +64,10 @@ jobs:
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
TEST_EXECUTION_TICKET: ${{ github.event.inputs.execution-ticket || 'TRI-910' }}
# Remove tokens and upload the tavern results to JIRA Test execution TRI-910
# Remove tokens and upload the tavern results to JIRA Test execution
run: |
sed "s/access_tok.*:s = '.*'//g" tavern-results.xml | sed "s/Authorization: Bearer .*/Authorization:/g" | uniq > result.xml
curl -H "Content-Type: multipart/form-data" \
-u $JIRA_USERNAME:$JIRA_PASSWORD \
-F '[email protected]' \
"https://jira.catena-x.net/rest/raven/1.0/import/execution/junit?testExecKey=$TEST_EXECUTION_TICKET"
"https://jira.catena-x.net/rest/raven/1.0/import/execution/junit?testExecKey=$TEST_EXECUTION_TICKET"
14 changes: 10 additions & 4 deletions .github/workflows/xray-cucumber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: IRS Cucumber Xray execution
on:
workflow_dispatch: # Trigger manually
push:
branches: main
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request:
branches: main
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'
Expand All @@ -26,6 +28,10 @@ on:

jobs:
build:
# This job does not need to run unless we can access the credentials
if: >-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest

steps:
Expand All @@ -49,8 +55,8 @@ jobs:
env:
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
# JIRA filter 11349: project = TRI AND type = Test AND "Test Type" = Cucumber
# Downloads all feature files of cucumber tests inside TRI project
# JIRA filter 11349: project = TRI AND type = Test AND "Test Type" = Cucumber
# Downloads all feature files of cucumber tests inside TRI project
run: |
export HTTP_RESULT=$(curl -s --show-error -w "%{http_code}" -u $JIRA_USERNAME:$JIRA_PASSWORD "https://jira.catena-x.net/rest/raven/1.0/export/test?filter=11349&fz=true" -o features.zip)
[[ $HTTP_RESULT == 200 || $HTTP_RESULT == 400 ]]
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Known knowns
- PLACEHOLDER REMOVE IF EMPTY: risks that were introduced or discovered in the release and are known but not resolved


## [2.5.0] - 2023-04-17
### Added
- Introduced Batch processing API endpoints. Batch Order is registered and executed for a bunch of globalAssetIds in one call.
- API Endpoint POST Register Batch Order {{IRS_HOST}}/irs/orders
- API Endpoint GET Batch Order {{IRS_HOST}}/irs/orders/:orderId
- API Endpoint GET Batch {{IRS_HOST}}/irs/orders/:orderId/batches/:batchId
- Introduced Environmental- and Social Standards processing API endpoints.
- API Endpoint POST Register job to start an investigation if a given bpn is contained in a part chain {{IRS_HOST}}/ess/bpn/investigations
- API Endpoint GET BPN Investigation {{IRS_HOST}}/ess/bpn/investigations/:id
- API Endpoint POST EDC Notification receive {{IRS_HOST}}/ess/notification/receive


## [2.4.1] - 2023-04-21
### Fixed
- Updated spring-boot version to 3.0.6 to fix security issue
- change GID in Dockerfile to fix https://github.com/eclipse-tractusx/item-relationship-service/issues/101


## [2.4.0] - 2023-03-30
### Added
- IRS is now able to cache the EDC catalog. Caching can be disabled via application config. Maximum amount of cached items and item time-to-live can be configured as well.
Expand Down Expand Up @@ -188,7 +202,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Unresolved
- **Select Aspects you need** You are able to select the needed aspects for which you want to collect the correct endpoint information.

[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.4.0...HEAD
[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.5.0...HEAD
[2.5.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.4.0...2.5.0
[2.4.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.4.0...2.4.1
[2.4.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.3.2...2.4.0
[2.3.2]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.3.1...2.3.2
Expand Down
12 changes: 7 additions & 5 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
maven/mavencentral/ch.qos.logback/logback-classic/1.4.7, EPL-1.0 OR LGPL-2.1-only, approved, #3435
maven/mavencentral/ch.qos.logback/logback-core/1.4.7, EPL-1.0 OR LGPL-2.1-only, approved, #3373
maven/mavencentral/com.carrotsearch.thirdparty/simple-xml-safe/2.7.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.13.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.13.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.2, Apache-2.0, approved, #5303
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.13.2, Apache-2.0, approved, #2133
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.13.4, Apache-2.0, approved, #2133
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.14.2, Apache-2.0 AND MIT, approved, #4303
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.13.4.2, Apache-2.0, approved, #2134
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2.0, approved, #4105
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.2, Apache-2.0, approved, #5933
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.14.2, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -54,7 +53,7 @@ maven/mavencentral/io.micrometer/micrometer-commons/1.10.6, Apache-2.0 AND (Apac
maven/mavencentral/io.micrometer/micrometer-core/1.10.6, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #6977
maven/mavencentral/io.micrometer/micrometer-observation/1.10.6, Apache-2.0, approved, #7331
maven/mavencentral/io.micrometer/micrometer-registry-prometheus/1.10.4, Apache-2.0, approved, #4721
maven/mavencentral/io.minio/minio/8.4.5, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.minio/minio/8.5.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.prometheus/simpleclient/0.16.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.prometheus/simpleclient_common/0.16.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.prometheus/simpleclient_tracer_common/0.16.0, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -104,7 +103,10 @@ maven/mavencentral/org.eclipse.dataspaceconnector/contract-spi/0.0.1-milestone-6
maven/mavencentral/org.eclipse.dataspaceconnector/core-spi/0.0.1-milestone-6, Apache-2.0, approved, #5189
maven/mavencentral/org.eclipse.dataspaceconnector/policy-evaluator/0.0.1-milestone-6, Apache-2.0, approved, #5188
maven/mavencentral/org.eclipse.dataspaceconnector/policy-spi/0.0.1-milestone-6, Apache-2.0, approved, #5192
maven/mavencentral/org.eclipse.tractusx.irs/edc-client/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/ess/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-api/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-common/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-models/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.hamcrest/hamcrest-core/2.2, BSD-3-Clause, approved, clearlydefined
maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined
Expand All @@ -121,7 +123,7 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.6.20, Apache-2.0, approv
maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.7.22, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jetbrains/annotations/15.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jsoup/jsoup/1.15.3, MIT, approved, #3272
maven/mavencentral/org.jsoup/jsoup/1.15.4, MIT, approved, #3272
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.9.2, EPL-2.0, approved, #3133
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.9.2, EPL-2.0, approved, #3134
maven/mavencentral/org.junit.jupiter/junit-jupiter/5.9.2, EPL-2.0, approved, #6972
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ COPY api api
COPY .mvn .mvn
COPY pom.xml .

COPY ess ess
COPY integration-tests integration-tests
COPY irs-api irs-api
COPY irs-common irs-common
COPY edc-client edc-client
COPY irs-models irs-models
COPY irs-parent-spring-boot irs-parent-spring-boot
COPY irs-testing irs-testing
Expand All @@ -45,7 +48,7 @@ RUN --mount=type=cache,target=/root/.m2 mvn -B clean package -pl :$BUILD_TARGET


# Copy the jar and build image
FROM eclipse-temurin:19-jre-alpine AS irs-api
FROM eclipse-temurin:20-jre-alpine AS irs-api

RUN apk upgrade --no-cache libssl3 libcrypto3

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Eclipse Tractus-X product(s) installed within the image:
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/item-relationship-service/blob/main/LICENSE)

**Used base image**
- [eclipse-temurin:19-jre-alpine](https://github.com/adoptium/containers)
- [eclipse-temurin:20-jre-alpine](https://github.com/adoptium/containers)
- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin
- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin
- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin
Expand Down
Loading

0 comments on commit 3976afd

Please sign in to comment.