Skip to content

Commit

Permalink
Merge pull request #130 from es-ude/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DavidFederl authored Dec 19, 2024
2 parents 748e979 + f94a3a2 commit 16d55e1
Show file tree
Hide file tree
Showing 123 changed files with 5,183 additions and 4,999 deletions.
19 changes: 19 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-empty": [2, "never"],
"type-case": [2, "always", "lower-case"],
"type-enum": [
2,
"always",
["build", "ci", "feat", "fix", "docs", "style", "refactor", "revert", "chore", "wip", "perf"],
],
"scope-empty": [2, "never"],
"scope-case": [2, "always", "kebab-case"],
"scope-enum": [
2,
"always",
["all", "application", "runtime", "workflow", "readme", "kubernetes", "docker", "gradle"],
],
},
};
43 changes: 0 additions & 43 deletions .github/workflows/build_container.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Build Release Packages"
on:
workflow_dispatch:
release:
types:
- released
permissions:
contents: read
packages: write
jobs:
maven_package:
name: Publish runtime as Maven Package
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Get Release Version
id: release
uses: GuillaumeFalourd/get-release-or-tag@v2
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 22
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Push Package
env:
ACTOR: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion=${{ steps.release.outputs.tag }} :runtime:publish
container_image:
name: Publish Monitor as Container Image
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Get Release Version
id: release
uses: GuillaumeFalourd/get-release-or-tag@v2
- name: Get Release Artifacts
uses: Itsblue/download-release-assets-action@v4
with:
version: ${{ steps.release.outputs.tag }}
file: "monitor.jar"
path: "monitor/build/libs"
- name: Build Monitor Image
working-directory: ./monitor
env:
RELEASE_TAG: ${{ steps.release.outputs.tag }}
run: |
docker build --file Dockerfile --tag ghcr.io/$GITHUB_REPOSITORY:$RELEASE_TAG --tag ghcr.io/$GITHUB_REPOSITORY:latest .
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Image to Github Container Registry
run: |
docker push --all-tags ghcr.io/$GITHUB_REPOSITORY
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
# Workflow requires Variables to be defined as follows:
# secrets.PUSH_TOKEN -> Password with rights to push to repository

name: "Create Release"
on:
workflow_dispatch:
push:
branches:
- 'main'

- "main"
permissions:
contents: read
jobs:
semantic_release:
release:
name: Generate Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Build bootJar
run: |
./gradlew :monitor:bootJar
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: "lts/*"
- name: Install semantic-release Plugin
- name: Install NodeJS Dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
- name: Verify the integrity and registry signatures for dependencies
run: npm audit signatures
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
61 changes: 25 additions & 36 deletions .github/workflows/run_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:
workflow_dispatch:
pull_request:
branches:
- 'main'

- "main"
jobs:
lint-commits:
name: Commitlint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -20,15 +18,14 @@ jobs:
persist-credentials: false
fetch-depth: 0
- name: Lint Commits
uses: wagoid/commitlint-github-action@v5

uses: wagoid/commitlint-github-action@v6
with:
failOnWarnings: true
failOnErrors: true
prettier:
name: Beautify
runs-on: ubuntu-latest
needs:
- lint-commits
outputs:
new_sha: ${{ steps.sha.outputs.SHA }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -39,30 +36,25 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install Prettier
run: npm ci
- name: Install NodeJS Dependencies
run: npm clean-install
- name: Run Prettier
run: npx prettier --write ./**/*.{java,md}
- name: Publish Changes
id: commit-and-push
uses: EndBug/add-and-commit@v9.1.4
run: npx prettier --write "**/*.{md,yaml,js,html,java,properties}"
- name: Commit Changes
id: auto-commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
committer_name: "Prettier Action"
committer_email: "[email protected]"
message: "refactor(style): beautify ${{ github.head_ref }}"
push: true
- name: Update SHA
id: sha
commit_message: "style(all): apply prettier to '${{ github.head_ref }}'"
commit_user_name: github-actions
commit_user_email: [email protected]
commit_author: github-actions <[email protected]>
- name: Check For Updated Files
id: check-further-execution
if: steps.auto-commit.outputs.changes_detected =='true'
run: |
if [[ "${{ steps.commit-and-push.outputs.pushed }}" == "true" ]]; then
new_sha="${{ steps.commit-and-push.outputs.commit_long_sha }}"
else
new_sha="${{ github.head_ref }}"
fi
echo "SHA=$new_sha" >> $GITHUB_OUTPUT
echo "Updates detected. Abort Workflow execution!" |
exit 1
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
needs:
- prettier
Expand All @@ -73,37 +65,34 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ needs.prettier.outputs.new_sha }}
ref: ${{ github.head_ref }}
- name: Setup Java environment
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 22
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Clean Build Artifacts
run: ./gradlew clean
- name: Run All Integration Tests
run: ./gradlew test

integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
needs:
- prettier
- unit-tests
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ needs.prettier.outputs.new_sha }}
ref: ${{ github.head_ref }}
- name: Setup Java Environment
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 22
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
- name: Clean Build Artifacts
run: ./gradlew clean
- name: Run Integration Tests
Expand Down
22 changes: 17 additions & 5 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/git_toolbox_blame.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/prettier.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16d55e1

Please sign in to comment.