Skip to content

Commit

Permalink
Aligned jvm folder schema and reviewed workflows (#476)
Browse files Browse the repository at this point in the history
* Update folder and class packages

* Workflow review

* Removed JCOBridge version

* Indentation fix in POM.xml
  • Loading branch information
masesdevelopers authored Jun 3, 2024
1 parent 150622e commit 1ca18a0
Show file tree
Hide file tree
Showing 41 changed files with 351 additions and 386 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
# only trigger on branches, not on tags
branches: '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# This workflow contains two jobs called "check_changes", "build_windows"
jobs:
# Verify if a build is needed
Expand Down Expand Up @@ -86,10 +82,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down Expand Up @@ -158,10 +150,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ on:
# schedule:
# - cron: '26 23 * * 3'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Verify if a check is needed
check_changes:
Expand Down Expand Up @@ -118,12 +114,7 @@ jobs:

- name: Maven preparation (step 1)
if: matrix.language == 'java'
run: dotnet build --no-incremental --configuration Release --framework net8.0 /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" ./src/net/KNet.sln

- name: Maven preparation (step 2)
if: matrix.language == 'java'
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash
run: dotnet build --no-incremental --configuration Release --framework net8.0 /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" ./src/net/KNet/KNet.csproj

- if: matrix.language == 'java'
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down Expand Up @@ -111,10 +107,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
default: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# This workflow contains one job called "build_documentation"
jobs:
build_documentation:
Expand Down
70 changes: 56 additions & 14 deletions .github/workflows/generateclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ on:
required: true
default: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
UseLatestJNetReflector:
description: 'Shall use latest unpublished version of JNetReflector'
required: true
default: false
type: boolean

# This workflow contains one job called "build_documentation"
jobs:
Expand All @@ -36,6 +37,12 @@ jobs:
fetch-depth: '1'
submodules: 'true'

- uses: actions/checkout@v4
if: ${{ inputs.UseLatestJNetReflector == true }}
with:
repository: masesgroup/JNet
path: JNet

- name: Pre compile
run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src\net\KNet\KNet.csproj

Expand All @@ -51,10 +58,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand All @@ -68,21 +71,60 @@ jobs:
- name: Clear Java generated files
run: Remove-Item .\src\jvm\knet\src\main\java\org\mases\knet\generated\* -Recurse -Force -Exclude README.md

- run: dotnet tool update --version 2.5.1 -g MASES.JNetReflector
- name: Prebuild JNetReflector
if: ${{ inputs.UseLatestJNetReflector == true }}
run: dotnet build --no-incremental --configuration Release JNet\src\net\JNetReflector\JNetReflector.csproj

- name: Create Jars of JNetReflector
if: ${{ inputs.UseLatestJNetReflector == true }}
run: mvn "-Djcobridgepath=../../../binReflector/net8.0/JCOBridge.jar" --file ./JNet/src/jvm/jnet/pom.xml --no-transfer-progress package
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Download latest published version of JNetReflector
run: dotnet tool update --version 2.5.1 -g MASES.JNetReflector
if: ${{ inputs.UseLatestJNetReflector == false }}

- name: Build classes with unpublished JNetReflector
if: ${{ inputs.UseLatestJNetReflector == true }}
shell: cmd
run: |
cd JNet\binReflector\net8.0
MASES.JNetReflector.exe -TraceLevel 0 -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}

- name: Build classes
- name: Build classes with latest published version of JNetReflector
if: ${{ inputs.UseLatestJNetReflector == false }}
shell: cmd
run: jnetreflector -TraceLevel 0 -OriginRootPath .\jars -DestinationRootPath .\src\ -ConfigurationFile .\src\configuration.json
run: jnetreflector -TraceLevel 0 -OriginRootPath %GITHUB_WORKSPACE%\jars -DestinationRootPath %GITHUB_WORKSPACE%\src\ -ConfigurationFile %GITHUB_WORKSPACE%\src\configuration.json
env:
JCOBRIDGE_LicensePath: ${{ secrets.JCOBRIDGE_ONLINE }}


- name: Request a PR to commit changes made with unpublished version of JNetReflector
if: ${{ github.repository_owner == 'masesgroup' && inputs.GeneratePR == true && inputs.UseLatestJNetReflector == true }} #do not push any changes outside main repo or GeneratePR is false
uses: peter-evans/create-pull-request@v6
with:
branch-suffix: short-commit-hash
add-paths: src/*.*
commit-message: Update generated classes using last unpublished version of JNetReflector
title: Changes by GitHub action
body: |
Automated changes by GitHub action, fix #92
reviewers: masesdevelopers
assignees: masesdevelopers
labels: java, .NET, enhancement

- name: Extract commit SHA
if: ${{ github.repository_owner == 'masesgroup' && inputs.GeneratePR == true && inputs.UseLatestJNetReflector == false }}
run: |
echo "GITHUB_COMMIT_MESSAGE=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
shell: bash

- name: Request a PR to commit changes
if: ${{ github.repository_owner == 'masesgroup' && inputs.GeneratePR == true }} #do not push any changes outside main repo or GeneratePR is false
- name: Request a PR to commit changes made with latest published version of JNetReflector
if: ${{ github.repository_owner == 'masesgroup' && inputs.GeneratePR == true && inputs.UseLatestJNetReflector == false }} #do not push any changes outside main repo or GeneratePR is false
uses: peter-evans/create-pull-request@v6
with:
branch-suffix: short-commit-hash
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
pull_request:
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Verify if a build is needed
check_changes:
Expand Down Expand Up @@ -84,10 +80,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down Expand Up @@ -138,10 +130,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Install local file to be used within Javadoc plugin of generated POM
run: mvn install:install-file -DgroupId=JCOBridge -DartifactId=JCOBridge -Dversion=2.5.13 -Dpackaging=jar -Dfile=../../../bin/net8.0/JCOBridge.jar -f ./src/jvm/knet/pom.xml
shell: bash

- name: Create Jars
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package
env:
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ title: APIs of .NET suite for Apache Kafka
_description: Describes the current available APIs of .NET suite for Apache Kafka
---

# KNet: .NET gateway for Apache Kafka APIs
# KNet: .NET suite for Apache Kafka

Open left menu to browse API
Loading

0 comments on commit 1ca18a0

Please sign in to comment.