-
Notifications
You must be signed in to change notification settings - Fork 2.8k
FINERACT-2843: Resurrect Fineract client and avro schema publishing #6472
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
Open
adamsaghy
wants to merge
1
commit into
apache:develop
Choose a base branch
from
adamsaghy:FINERACT-2843
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+109
−25
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: Fineract Publish Client and Avro Snapshots to Apache Nexus | ||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| secrets: | ||
| DEVELOCITY_ACCESS_KEY: | ||
| required: false | ||
| NEXUS_USER: | ||
| required: false | ||
| NEXUS_PW: | ||
| required: false | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| publish: | ||
| # Snapshots only, and only from develop. Releases are staged and promoted through a PMC vote, | ||
| # so they are never pushed from CI. | ||
| if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }} | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 90 | ||
| env: | ||
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | ||
| steps: | ||
| - name: Set up JDK 25 | ||
| uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 | ||
| with: | ||
| java-version: '25' | ||
| distribution: 'zulu' | ||
|
|
||
| - name: Download workspace | ||
| id: download-workspace | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | ||
| continue-on-error: true | ||
| with: | ||
| name: fineract-workspace-${{ github.run_id }} | ||
| path: . | ||
|
|
||
| - name: Extract workspace | ||
| if: steps.download-workspace.outcome == 'success' | ||
| run: tar -xf fineract-workspace.tar | ||
|
|
||
| - name: Checkout | ||
| if: steps.download-workspace.outcome != 'success' | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| fetch-tags: true | ||
|
|
||
| - name: Build workspace fallback | ||
| if: steps.download-workspace.outcome != 'success' | ||
| uses: $/.github/actions/setup-and-build-fineract | ||
| with: | ||
| cache-read-only: false | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 | ||
|
|
||
| - name: Apply Gradle memory budget | ||
| uses: $/.github/actions/gradle-memory-budget | ||
| with: | ||
| max-heap: '4g' | ||
| workers-max: '2' | ||
|
|
||
| # ASF Nexus credentials are provisioned by INFRA and are not available on forks or to | ||
| # pull requests. Without them the publish would fail with a 401, so skip instead. | ||
| - name: Check for Nexus credentials | ||
| id: creds | ||
| env: | ||
| NEXUS_USER: ${{ secrets.NEXUS_USER }} | ||
| run: | | ||
| if [ -z "$NEXUS_USER" ]; then | ||
| echo "available=false" >> "$GITHUB_OUTPUT" | ||
| echo "::notice::NEXUS_USER is not set — skipping the snapshot publish." | ||
| else | ||
| echo "available=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| # Only the three consumer-facing artifacts are published. Everything else in | ||
| # fineractPublishProjects stays buildable but is not pushed to Nexus. | ||
| # | ||
| # '-x buildJavaSdk' is required: the OpenAPI generator needs an 8g heap, and this job runs | ||
| # under the 4g budget above. The generated sources arrive already built in the workspace | ||
| # artifact (see .github/scripts/gradle-memory-budget.sh). | ||
| - name: Publish snapshots to Apache Nexus | ||
| if: steps.creds.outputs.available == 'true' | ||
| env: | ||
| NEXUS_USER: ${{ secrets.NEXUS_USER }} | ||
| NEXUS_PW: ${{ secrets.NEXUS_PW }} | ||
| run: | | ||
| ./gradlew --no-daemon --console=plain \ | ||
| :fineract-avro-schemas:publishMavenJavaPublicationToApacheRepository \ | ||
| :fineract-client:publishMavenJavaPublicationToApacheRepository \ | ||
| :fineract-client-feign:publishMavenJavaPublicationToApacheRepository \ | ||
| -PnoSign=true \ | ||
| -Pfineract.config.username="$NEXUS_USER" \ | ||
| -Pfineract.config.password="$NEXUS_PW" \ | ||
| -x buildJavaSdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamsaghy they are required to be published independently in order to be imported in projects. The fineract-client-feign brings everything, and we build more lighter apps. I will ask to keep all the libraries published + the fineract-client-feign
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IOhacker I am not sure i follow you on this one.
The built fineract-client / fineract-client-feign / fineract-avro-schemas are not depending on anything but its own files.
I see no reason to publish all fineract modules since it is not designed to be used as dependencies in any project, but their sole purpose to be modularized internally.
Any project who is intended to communicate with Fineract via fineract-client-feign, just add it as a jar dependency and use it. They dont need any of the other modules or anything further.