Skip to content

Commit

Permalink
Merge branch 'eclipse-tractusx:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-crehm authored Jun 21, 2024
2 parents 700b9f2 + 41de9db commit ec89a5b
Show file tree
Hide file tree
Showing 87 changed files with 1,335 additions and 17,218 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/e2e-tests-xray_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,29 @@ jobs:
with:
node-version: 20.x

- name: Install Angular CLI
run: npm install -g @angular/cli

- name: Run yarn install
uses: Borales/actions-yarn@v5
with:
cmd: install # will run `yarn install` command
dir: frontend

- name: Start Frontend Application
working-directory: frontend
run: |
npm run start:auth:e2ea &
sleep 60 &&
curl http://localhost:4200 -I
- name: Cypress run all tests
uses: cypress-io/[email protected].0 # use the explicit version number
uses: cypress-io/[email protected].1 # use the explicit version number
with:
start: npm run start:auth:e2ea
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
working-directory: frontend
# using wait-on parameter causes "Error: connect ECONNREFUSED 127.0.0.1:4200"
env:
CYPRESS_SUPERVISOR_LOGIN: ${{ secrets.TRACE_X_SUPERVISOR_LOGIN }}
CYPRESS_SUPERVISOR_PW: ${{ secrets.TRACE_X_SUPERVISOR_PW }}
Expand Down Expand Up @@ -165,7 +180,7 @@ jobs:
# node-version: 18.x
#
# - name: Cypress run all tests
# uses: cypress-io/[email protected].0 # use the explicit version number
# uses: cypress-io/[email protected].1 # use the explicit version number
# with:
# start: npm start
# wait-on: "http://localhost:4200"
Expand Down Expand Up @@ -228,7 +243,7 @@ jobs:
# run: npx playwright install --with-deps webkit
#
# - name: Cypress run all tests
# uses: cypress-io/[email protected].0 # use the explicit version number
# uses: cypress-io/[email protected].1 # use the explicit version number
# with:
# start: npm start:auth:e2ea
# wait-on: "http://localhost:4200"
Expand Down
42 changes: 13 additions & 29 deletions .github/workflows/pull-request_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,6 @@ env:
BACKEND_IMAGE_DOCKER_HUB: traceability-foss

jobs:
Check-Changelog-update:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'chore') || startsWith(github.head_ref, 'feature')
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Check if CHANGELOG is updated
id: updated-changelog
uses: tj-actions/changed-files@v44
with:
# Avoid using single or double quotes for multiline patterns
files: |
CHANGELOG.md
- name: request changes
uses: ntsd/auto-request-changes-action@v3
if: steps.updated-changelog.outputs.any_changed == 'false'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
review-message: "Please add a short description of the feature/fix to the Changelog.md."
Check-Pom-for-snapshot-versions:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -98,7 +77,7 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "/home/runner/work/tx-traceability-foss/tx-traceability-foss/tx-backend/target/failsafe-reports/TEST-*.xml"
files: "${{ github.workspace }}/tx-backend/target/failsafe-reports/TEST-*.xml"
check_name: "Integration Test Results"

- name: Publish unit test results
Expand All @@ -108,20 +87,25 @@ jobs:
files: "**/surefire-reports/TEST-*.xml"
check_name: "Unit Test Results"

- name: Clean working directories
run: |
rm -rf .scannerwork
rm -rf .sonar
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

# - name: Verify Sonar Scan
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
# SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
# SONAR_PROJECT_KEY: ${{ vars.SONAR_PROJECT_KEY_BACKEND }}
# run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=/home/runner/work/traceability-foss/tx-traceability-foss/tx-coverage/target/site/jacoco-aggregate/jacoco.xml -Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY_BACKEND }} -Dsonar.organization=${{ vars.SONAR_ORGANIZATION }}
- name: Verify Sonar Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_PROJECT_KEY: ${{ vars.SONAR_PROJECT_KEY_BACKEND }}
run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${{ github.workspace }}/tx-coverage/target/site/jacoco-aggregate/jacoco.xml -Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY_BACKEND }} -Dsonar.organization=${{ vars.SONAR_ORGANIZATION }}

Publish-docker-image:
# needs: [ "Test-and-Sonar" ]
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,42 @@ jobs:
run: echo HELM_VERSION=$(cat charts/traceability-foss/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV

- name: Update Chart.yaml appVersion
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/Chart.yaml

- name: Update Chart.yaml version
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml

- name: Update frontend dependency version in Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.dependencies[0].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml

- name: Update backend dependency version in Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.dependencies[1].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml

- name: Update frontend version in frontend/Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/frontend/Chart.yaml

- name: Update frontend appVersion in frontend/Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/frontend/Chart.yaml

- name: Update backend version in backend/Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/backend/Chart.yaml

- name: Update backend appVersion in frontend/Chart.yaml
uses: mikefarah/[email protected].1
uses: mikefarah/[email protected].2
with:
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/backend/Chart.yaml

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: docker build -t localhost:5000/traceability-foss:fe_${{ github.sha }} -f ./frontend/Dockerfile .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.22.0
uses: aquasecurity/trivy-action@0.23.0
with:
trivyignores: "./.github/workflows/.trivyignore"
image-ref: 'localhost:5000/traceability-foss:fe_${{ github.sha }}'
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
ref: ${{needs.prepare-env.outputs.check_sha}}

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.22.0
uses: aquasecurity/trivy-action@0.23.0
with:
trivyignores: "./.github/workflows/.trivyignore"
scan-type: "config"
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
tags: localhost:5000/traceability-foss:trivy

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.22.0
uses: aquasecurity/trivy-action@0.23.0
with:
image-ref: localhost:5000/traceability-foss:trivy
trivyignores: "./.github/workflows/.trivyignore"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha
## [UNRELEASED - DD.MM.YYYY]
### Changed
- #965 Implement proxy functionality of the IRS policy store
- #962 Changed notification model to new one in frontend/backend
- #753 Refactored message history in notification detail view

### Added
- #832 added policymanagement list view, creator and editor
Expand Down
Loading

0 comments on commit ec89a5b

Please sign in to comment.