Skip to content

Commit

Permalink
Merge pull request #13 from catenax-ng/main
Browse files Browse the repository at this point in the history
Update main to align with release 1.1.0
  • Loading branch information
mkanal committed Feb 6, 2023
2 parents fdc6342 + eec4151 commit 9b76bb9
Show file tree
Hide file tree
Showing 138 changed files with 2,868 additions and 1,026 deletions.
2 changes: 1 addition & 1 deletion .chglog/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/catenax-ng/product-traceability-foss-frontend
repository_url: https://github.com/catenax-ng/tx-traceability-foss-frontend
options:
commits:
filters:
Expand Down
53 changes: 10 additions & 43 deletions .github/workflows/chart-release.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,21 @@
name: Release Charts
name: Release Chart

on:
workflow_dispatch:
push:
paths:
- 'charts/**'
branches:
- main
tags:
- '*'

jobs:
Get-helm-charts-versions:
outputs:
latest_version: ${{ steps.step1.outputs.latest_version }}
current_version: ${{ steps.step2.outputs.current_version }}
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get helm charts latest tag version
id: step1
run: |
latestVersion=$(git tag | grep "helm-charts-" | tail -1)
echo "::set-output name=latest_version::$latestVersion"
echo "Exported $latestVersion latest helm charts version"
- name: Get helm charts current version
id: step2
run: |
chartVersion=helm-charts-$(cat ./charts/product-traceability-foss-frontend/Chart.yaml | grep "version:" | head -1 | cut -d ":" -d " " -f2)
echo "::set-output name=current_version::$chartVersion"
echo "Exported $chartVersion helm charts version"
Release-helm-charts:
needs: "Get-helm-charts-versions"
if: needs.Get-helm-charts-versions.outputs.latest_version != needs.Get-helm-charts-versions.outputs.current_version
permissions:
contents: write
runs-on: ubuntu-latest
env:
RELEASE_VERSION: "${{needs.Get-helm-charts-versions.outputs.current_version}}"
steps:
- run: echo "Releasing helm charts with ${{ env.RELEASE_VERSION }} version"

- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -56,19 +25,17 @@ jobs:
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Add Helm repos
- name: Update helm dependencies for trace-x
run: |
cd charts/tx-traceability-foss-frontend
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add runix https://helm.runix.net
helm dependency update
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.4.1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "${{ env.RELEASE_VERSION }}"
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-for-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:latest , ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.sha }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.RELEASE_VERSION }}
142 changes: 142 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: E2E Tests

on:
push:
branches: [ main ]
pull_request:

jobs:
install:
runs-on: ubuntu-latest
container:
# if you need to change image please make sure use the same version in all places
# (here and in cypress/Dockerfile)
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
options: --user 1001

# Install YARN dependencies, cache them correctly
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Run yarn install
uses: Borales/actions-yarn@v4.2.0
with:
cmd: install # will run `yarn install` command

cypress-run-chrome:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
options: --user 1001
needs: install

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cypress run all tests
uses: cypress-io/github-action@v5.0.7 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome

- name: Archive cypress artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: cypress generated files - chrome
path: |
cypress/videos/
cypress/screenshots/
cypress-run-firefox:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
options: --user 1001
needs: install

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cypress run all tests
uses: cypress-io/github-action@v5.0.7 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: firefox

- name: Archive cypress artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: cypress generated files - firefox
path: |
cypress/videos/
cypress/screenshots/
cypress-run-webkit:
timeout-minutes: 15
runs-on: ubuntu-latest
needs: install

steps:
- name: Checkout
uses: actions/checkout@v3

# commented because if we use it here, we face with that problem:
# "http://localhost:4200 timed out on retry 151 of 5, elapsed 150449ms, limit 150000ms
# Error: connect ECONNREFUSED 127.0.0.1:4200"

# - name: Use Node.js 18.x
# uses: actions/setup-node@v3
# with:
# node-version: 18.x

- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

# https://docs.cypress.io/guides/guides/launching-browsers#Linux-Dependencies
- name: Install additional dependencies
run: npx playwright install --with-deps webkit

- name: Cypress run all tests
uses: cypress-io/github-action@v5.0.7 # use the explicit version number
with:
start: npm start
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: webkit

- name: Archive cypress artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: cypress generated files - webkit
path: |
cypress/videos/
cypress/screenshots/
5 changes: 5 additions & 0 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "KICS"

on:
workflow_dispatch:
push:
branches: [main, master]
# pull_request:
Expand Down Expand Up @@ -29,6 +30,10 @@ jobs:
with:
# Scanning directory .
path: "."
# Excluded paths:
# - docker-compose.yml - used only on local env
# - in cypress dir docker related files used only on local env
exclude_paths: "docker-compose.yml,cypress/docker-compose.yml,cypress/Dockerfile"
# Fail on HIGH severity results
fail_on: high
# Disable secrets detection - we use GitGuardian
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Unit Tests

on:
push:
Expand All @@ -10,16 +10,12 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 18.x
- name: Install chrome
uses: browser-actions/setup-chrome@latest
- name: Run yarn install
Expand All @@ -28,7 +24,19 @@ jobs:
cmd: install # will run `yarn install` command
- name: Run npm test:ci
run: CHROMIUM_BIN=$(which chrome) npm run test:ci # will run `test:ci` command
- uses: SonarSource/sonarcloud-github-action@master
- name: Run SonarCloud with organzation and project key from environment
uses: SonarSource/sonarcloud-github-action@master
if: ${{ vars.SONAR_ORGANIZATION != '' && vars.SONAR_PROJECT_KEY != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=${{ vars.SONAR_ORGANIZATION }}
-Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }}
- name: Run SonarCloud with hardcoded organization and project key
uses: SonarSource/sonarcloud-github-action@master # Fallback for the catenax-ng/tx-traceability-foss-frontend
if: ${{ vars.SONAR_ORGANIZATION == '' || vars.SONAR_PROJECT_KEY == '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
20 changes: 20 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#Authors

The following people have contributed to this repository:

- Blazej Kepa,doubleSlash Net-Business GmbH,https://github.com/ds-ext-bkepa
- Dirk Blank,evia consulting GmbH,https://github.com/dblankevia
- Fabian Bedarf,evia consulting GmbH,https://github.com/evia-fbedarf
- Jedrzej Serwa,doubleSlash Net-Business GmbH,https://github.com/ds-ext-jserwa
- Martin Kanal,doubleSlash Net-Business GmbH,https://github.com/mkanal
- Anton Kononenko,doubleSlash Net-Business GmbH,https://github.com/ds-ext-akononenko
- Sebastian Scherer,Mercedes-Benz Group AG,https://github.com/the-tatanka
- Ivan Emelianov,T-Systems International GmbH,https://github.com/Anacin
- Sebastian Bezold,Mercedes-Benz Group AG,https://github.com/SebastianBezold
- Gregor Stelzer,msg DAVID GmbH,https://github.com/gregors101
- Darek Skrzypczak,doubleSlash Net-Business GmbH,https://github.com/ds-ext-dskrzypczak
- Nobert Geczi,msg Systems Romania SRL,https://github.com/norbertgeczi
- Markus Kreuz,FEV Consulting GmbH,https://github.com/CXkreuz
- Thomas Braun,ZF Friedrichshafen AG,https://github.com/tbraun-zf


0 comments on commit 9b76bb9

Please sign in to comment.