Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release #30

Merged
merged 8 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .asciidoctorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:toc: top
:icons: font
:source-highlighter: rouge
:imagesdir: {src-dir}/documentation/pics
File renamed without changes.
43 changes: 19 additions & 24 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
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-case' : [ 2, "always", "kebab-case" ],
'scope-empty' : [ 2, "never" ],
'scope-enum' :
[
2, "always",
[
'workflow', 'unit-test', 'data-collect', 'wrist', 'readme'
]
],
'subject-empty' : [ 2, "never" ],
}
}
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-case": [2, "always", "kebab-case"],
"scope-empty": [2, "never"],
"scope-enum": [
2,
"always",
["workflow", "unit-test", "data-collect", "wrist", "readme", "webapp"],
],
"subject-empty": [2, "never"],
},
};
41 changes: 41 additions & 0 deletions .github/workflows/build_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Build Release Packages"
on:
workflow_dispatch:
release:
types:
- released

permissions:
contents: read

jobs:
container:
name: Publish Ball-Challenge App as Container Image
runs-on: ubuntu-latest
permissions:
packages: write
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: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build BallChallenge Image
run: ./gradlew -Pversion=${{ steps.release.outputs.tag}} :app:jibDockerBuild
- name: Push Image to Github Container Registry
run: docker push --all-tags ghcr.io/es-ude/elastic-ai.cloud.applications.ball_challenge
36 changes: 36 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Create Release"
on:
workflow_dispatch:
push:
branches:
- "main"

permissions:
contents: read

jobs:
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
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: "lts/*"
- name: Install NodeJS Dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
93 changes: 93 additions & 0 deletions .github/workflows/run_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Workflow requires Variables to be defined as follows:
# secrets.PUSH_TOKEN -> Password with rights to push to repository

name: "Tests"
on:
workflow_dispatch:
pull_request:
branches:
- "main"
- "develop"

jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0
- name: Lint Commits
uses: wagoid/commitlint-github-action@v6
with:
failOnWarnings: true
failOnErrors: true
prettier:
runs-on: ubuntu-latest
needs:
- lint-commits
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PUSH_TOKEN }}
- name: Setup NPM
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install NodeJS Dependencies
run: npm clean-install
- name: Run Prettier
run: npx prettier --write "**/*.{md,yaml,js,html,java,properties}"
- name: Commit Changes
id: auto-commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style(all): apply prettier to '${{ github.head_ref }}'"
commit_user_name: github-actions
commit_user_email: action@github.com
commit_author: github-actions <action@github.com>
- name: Check For Updated Files
id: check-further-execution
if: steps.auto-commit.outputs.changes_detected =='true'
run: |
echo "Updates detected. Abort Workflow execution!" |
exit 1
clang-format:
runs-on: ubuntu-latest
needs:
- lint-commits
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PUSH_TOKEN }}
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "17"
directory: ${{ runner.temp }}/llvm
- name: Get C Files
run: |
echo SRC=$(git ls-tree --full-tree -r HEAD | grep -e "\.\(c\|h\)\$" | cut -f 2 | grep -v ^extern) >> $GITHUB_ENV
- name: Apply clang-format to Files
run: |
clang-format --style=file --fallback-style=llvm -i $SRC
- name: Commit Changes
id: auto-commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style(all): apply clang-format to '${{ github.head_ref }}'"
commit_user_name: github-actions
commit_user_email: action@github.com
commit_author: github-actions <action@github.com>
- name: Check For Updated Files
id: check-further-execution
if: steps.auto-commit.outputs.changes_detected =='true'
run: |
echo "Updates detected. Abort Workflow execution!" |
exit 1
128 changes: 128 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,131 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Intellij template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

Loading
Loading