Skip to content

Commit

Permalink
Merge pull request #8 from apache/develop
Browse files Browse the repository at this point in the history
Version 20221010
  • Loading branch information
brandhuge authored Oct 9, 2022
2 parents 444a558 + a61e2d9 commit c80bd69
Show file tree
Hide file tree
Showing 3,253 changed files with 151,123 additions and 90,021 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 4 additions & 19 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
build/*
.gradle/*
# NB No ASF ASL header here due to FINERACT-1195
**/build/*
**/.gradle/*
**/bin/*

*.jar
*.war
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please make sure these boxes are checked before submitting your pull request - t

- [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

- [ ] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://issues.apache.org/jira/browse/FINERACT-1453
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
29 changes: 29 additions & 0 deletions .github/workflows/build-docker-mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Fineract Docker build - MariaDB

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build the image
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
- name: Start the stack
run: docker-compose up -d
- name: Wait for stack to come up
run: sleep 60
- name: Check health
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
- name: Check info
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
29 changes: 29 additions & 0 deletions .github/workflows/build-docker-postgresql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Fineract Docker build - PostgreSQL

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build the image
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
- name: Start the stack
run: docker-compose -f docker-compose-postgresql.yml up -d
- name: Wait for stack to come up
run: sleep 60
- name: Check health
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
- name: Check info
run: (( $(curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
32 changes: 32 additions & 0 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Fineract Documentation build
on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Documentation build
run: ./gradlew --no-daemon --console=plain doc
84 changes: 84 additions & 0 deletions .github/workflows/build-mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Fineract Build & Test - MariaDB
on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04

services:
mariad:
image: mariadb:10.9
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mysql
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3

mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.5.4
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'

env:
TZ: Asia/Kolkata
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast
- name: Archive test results
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: Archive server logs
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
84 changes: 84 additions & 0 deletions .github/workflows/build-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Fineract Build & Test - MySQL
on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04

services:
mariad:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: mysql
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3

mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.5.4
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'

env:
TZ: Asia/Kolkata
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=mysql
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=mysql
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=mysql
- name: Archive test results
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: Archive server logs
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
85 changes: 85 additions & 0 deletions .github/workflows/build-postgresql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Fineract Build & Test - PostgreSQL
on: [push, pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-20.04

services:
postgresql:
image: postgres:13.8
ports:
- 5432:5432
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: postgres
options: --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3

mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.5.4
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'

env:
TZ: Asia/Kolkata
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d # tag=v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Verify PostgreSQL connection
run: |
while ! pg_isready -d postgres -U root -h 127.0.0.1 -p 5432 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createPGDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createPGDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=postgresql
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=postgresql
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=postgresql
- name: Archive test results
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: Archive server logs
if: always()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
Loading

0 comments on commit c80bd69

Please sign in to comment.