Skip to content

Commit

Permalink
Merge pull request #48 from catenax-ng/main
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
mkanal authored Mar 21, 2023
2 parents f1093a5 + f3e6552 commit 2c58805
Show file tree
Hide file tree
Showing 992 changed files with 68,442 additions and 789 deletions.
17 changes: 16 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
charset = utf-8
end_of_line = lf
Expand Down Expand Up @@ -648,7 +650,7 @@ ij_html_keep_whitespaces_inside = span,pre,textarea
ij_html_line_comment_at_first_column = true
ij_html_new_line_after_last_attribute = never
ij_html_new_line_before_first_attribute = never
ij_html_quote_style = single
ij_html_quote_style = double
ij_html_remove_new_line_before_tags = br
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
Expand Down Expand Up @@ -687,6 +689,7 @@ ij_markdown_wrap_text_inside_blockquotes = true

[{*.yaml,*.yml}]
indent_size = 2
indent_style = space
ij_yaml_align_values_properties = do_not_align
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_block_mapping_on_new_line = false
Expand All @@ -697,3 +700,15 @@ ij_yaml_sequence_on_new_line = false
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true

# .editorconfig keeps breaking helmchart templating braces
# thus we need to exclude the folder from formatting
[/chart/**]
ij_formatter_enabled = false

[{*.kt, *.kts}]
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_continuation_indent_size = 8

[*.md]
max_line_length = 999
6 changes: 6 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: "TraceX CodeQL config"

# Exclude "Unused classes and interfaces"
query-filters:
- exclude:
id: java/unused-reference-type
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ updates:
day: "wednesday"
time: "03:00"

- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "03:00"

4 changes: 2 additions & 2 deletions .github/scripts/eclipse_dash.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
java -jar org.eclipse.dash.licenses-0.0.1-20221105.055038-599.jar yarn.lock -project automotive.tractusx -summary DASH_SUMMARY
grep -E '(restricted, #)|(restricted$)' DASH_SUMMARY | if test $(wc -l) -gt 0; then exit 1; fi
java -jar /home/runner/work/tx-traceability-foss-frontend/tx-traceability-foss-frontend/org.eclipse.dash.licenses-0.0.1-20221105.055038-599.jar yarn.lock -project automotive.tractusx -summary /home/runner/work/tx-traceability-foss-frontend/tx-traceability-foss-frontend/frontend/DASH_SUMMARY
grep -E '(restricted, #)|(restricted$)' /home/runner/work/tx-traceability-foss-frontend/tx-traceability-foss-frontend/frontend/DASH_SUMMARY | if test $(wc -l) -gt 0; then exit 1; fi
2 changes: 2 additions & 0 deletions .github/workflows/.trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ref https://github.com/catenax-ng/product-traceability-foss-backend/security/code-scanning/1419
CVE-2022-25857
41 changes: 0 additions & 41 deletions .github/workflows/chart-release.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL code analysis"

on:
push:
branches: main
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request:
branches: main
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '.husky/**'
- 'cypress/**'
- 'charts/**'
- 'dev/**'
- 'docs/**'
- 'frontend/charts/**'
- 'backend/charts/**'
- 'backend/ci/**'
- 'backend/collection/**'
- 'backend/openapi/**'
- 'README.md'
- 'CHANGELOG.md'
schedule:
- cron: '0 1 * * 1-5' # At 01:00 on every day-of-week from Monday through Friday.

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# The queries security-extended and security-and-quality are built into CodeQL.
config-file: ./.github/codeql/codeql-config.yml
queries: +security-and-quality,security-extended

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

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- name: Build Package
run: |
mvn clean package --batch-mode -DskipTests
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build&Push Docker image for branch
on: [ pull_request ]
name: Frontend Build&Push Docker image for branch
on:
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/**'

env:
REGISTRY: ghcr.io
Expand All @@ -8,6 +12,9 @@ jobs:

build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

permissions:
contents: read
Expand All @@ -29,5 +36,6 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: frontend/
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}-frontend:${{ github.event.pull_request.head.sha }}
38 changes: 38 additions & 0 deletions .github/workflows/docker-image-main_backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Backend Build&Push Docker image on main

on:
push:
branches: [ main ]

env:
REGISTRY: ghcr.io
JAVA_VERSION: 17
COMMIT_SHA: ${{ github.sha }}

jobs:
Publish-docker-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'temurin'
cache: 'maven'

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push docker image ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.COMMIT_SHA }}
run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode -DskipTests=true install jib:build -Dimage=${{ env.REGISTRY }}/${{ github.repository }}:${{ env.COMMIT_SHA }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build&Push Docker image
name: Backend Build&Push Docker image on main
on:
push:
branches: [ main ]
branches: main

env:
REGISTRY: ghcr.io
Expand All @@ -10,6 +10,9 @@ jobs:

build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

permissions:
contents: read
Expand All @@ -29,5 +32,6 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: frontend/
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:latest , ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.sha }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}-frontend:latest , ${{ env.REGISTRY }}/${{ github.repository }}-frontend:${{ github.sha }}
81 changes: 81 additions & 0 deletions .github/workflows/docker-image-tag-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Release Frontend&Backend on Tag

on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

env:
TAG_NAME: "${{ github.ref_name }}"
REGISTRY: ghcr.io
JAVA_VERSION: 17
COMMIT_SHA: ${{ github.sha }}

jobs:
Release-docker-image-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
permissions:
contents: read
packages: write

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

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push ${{ env.REGISTRY }}/${{ github.repository }}-frontend:${{ env.TAG_NAME }} and :latest
uses: docker/build-push-action@v4
with:
context: frontend
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}-frontend:${{ env.TAG_NAME }}, ${{ env.REGISTRY }}/${{ github.repository }}-frontend:latest

Release-docker-image-backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'temurin'
cache: 'maven'

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

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push docker image ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG_NAME }}
run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode -DskipTests=true install jib:build -Dimage=${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG_NAME }}

- name: Tag docker image ${{ env.REGISTRY }}/${{ github.repository }}:latest
run: docker tag ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG_NAME }} ${{ env.REGISTRY }}/${{ github.repository }}:latest

- name: Push docker image ${{ env.REGISTRY }}/${{ github.repository }}:latest
run: docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest
Loading

0 comments on commit 2c58805

Please sign in to comment.